v2.0.2
smooth_list_view
實現使用滑鼠和方向鍵滾動時的平滑捲動的 ListView 建構函數。
35喜歡 354近 30 天下載150Pub 分數
AndroidiOSWebmacOSWindowsLinux
Flutter 中 ListView 的流暢實作。
以下為英文專案原文快照,最新內容請造訪 GitHub。
A flutter plugin to implement smooth scrolling on desktop and web.
ListView but betterSmoothListView(...) : behave exactly like a classic ListView(...)
except that it makes scrolling with a mouse wheel smoother.SmoothListView.builder(...) : behave exactly like a classic
ListView.builder(...) except that it makes scrolling with a mouse wheel
smoother.SmoothListView.adapative(...) : behave exactly like a classic
ListView(...) except that it allows you to easily switch between
smooth scroll and classic scroll.SmoothListView.adaptiveBuilder(...) : behave exactly like a classic
ListView.builder(...) except that it allows you to easily switch between
smooth scroll and classic scroll.First, add the package to your pubspec.yaml :
flutter pub add smooth_list_view
Then import it inside your Dart code :
import 'package:smooth_list_view/smooth_list_view.dart';
Import the package :
import 'package:smooth_list_view/smooth_list_view.dart';
Replace :
// ...
@override
Widget build(BuildContext context) {
return ListView(...);
}
// ...
With :
// ...
@override
Widget build(BuildContext context) {
// You can keep the exact same parameters
return SmoothListView(...);
}
// ...
Replace :
// ...
@override
Widget build(BuildContext context) {
return ListView.builder(...);
}
// ...
With :
// ...
@override
Widget build(BuildContext context) {
// You can keep the exact same parameters
return SmoothListView.builder(...);
}
// ...
Replace :
// ...
@override
Widget build(BuildContext context) {
return ListView.separated(...);
}
// ...
With :
// ...
@override
Widget build(BuildContext context) {
// You can keep the exact same parameters
return SmoothListView.separated(...);
}
// ...
Replace :
// ...
@override
Widget build(BuildContext context) {
return ListView.custom(...);
}
// ...
With :
// ...
@override
Widget build(BuildContext context) {
// You can keep the exact same parameters
return SmoothListView.custom(...);
}
// ...
Feel free to check the Example panel for a richer implementation.
If you encounter any issue feel free to open one on GitHub :)
依賴清單 3 項
{"sdk":"flutter"}{"sdk":"flutter"}^5.0.0先依使用情境篩選,再比較專案活躍情況,最後到原始儲存庫確認使用要求。
“A repository is the most basic element of GitHub.”
GitHub Docs — About repositories ↗