diff --git a/test_flutter_slider_100/lib/main.dart b/test_flutter_slider_100/lib/main.dart index 28118d121b8ec23dba61b6913c4f7b35f2c45ad9..0ad4c3c89ff0a492e501bb07914790ccbdaa39d4 100644 --- a/test_flutter_slider_100/lib/main.dart +++ b/test_flutter_slider_100/lib/main.dart @@ -45,7 +45,7 @@ class MyHomePage extends StatefulWidget { } class _MyHomePageState extends State { - double _currentSliderValue = 0.5; + double _currentSliderValue = 50; void onSliderChanged(double value) { setState(() { @@ -68,7 +68,19 @@ class _MyHomePageState extends State { crossAxisCount: 4, // Generate 100 widgets that display their index in the List. children: List.generate(100, (index) { - return Slider(value: _currentSliderValue, onChanged: onSliderChanged); + return Flex( + direction: Axis.horizontal, + children: [ + Expanded( + flex: 1, + child: Slider(min: 0, max: 100, value: _currentSliderValue, onChanged: onSliderChanged), + ), + SizedBox( + width: 26, + child: Text(_currentSliderValue.toStringAsFixed(0)), + ), + ], + ); }), ), ); diff --git a/test_flutter_slider_100/test_flutter_slider_100.arm64.apk b/test_flutter_slider_100/test_flutter_slider_100.arm64.apk index eaf2be92d511357ff7a95584f442cd3de3b7f595..e8678c12370aeafcb1908b6e004ddaab23052b19 100644 Binary files a/test_flutter_slider_100/test_flutter_slider_100.arm64.apk and b/test_flutter_slider_100/test_flutter_slider_100.arm64.apk differ