Created
April 23, 2020 12:01
-
-
Save ScottS2017/6c9f73ef9e5b981d79ffead4d8eed903 to your computer and use it in GitHub Desktop.
ListWheelScrollView as seen in https://medium.com/flutter-community/flutter-listview-and-scrollphysics-a-detailed-look-7f0912df2754
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FixedExtentScrollController fixedExtentScrollController = | |
new FixedExtentScrollController(); | |
ListWheelScrollView( | |
controller: fixedExtentScrollController, | |
physics: FixedExtentScrollPhysics(), | |
children: monthsOfTheYear.map((month) { | |
return Card( | |
child: Row( | |
children: <Widget>[ | |
Expanded( | |
child: Padding( | |
padding: const EdgeInsets.all(8.0), | |
child: Text( | |
month, | |
style: TextStyle(fontSize: 18.0), | |
), | |
)), | |
], | |
)); | |
}).toList(), | |
itemExtent: 60.0, | |
), |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment