Created
October 30, 2020 02:40
-
-
Save datasciencemonkey/4f83faefc6ddaa4e7b181a58c8f0471f to your computer and use it in GitHub Desktop.
carousel_slider
This file contains hidden or 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
CarouselSlider( | |
options: CarouselOptions( | |
height: _deviceHeight * 0.1, | |
viewportFraction: 1.0, | |
autoPlay: true, | |
enlargeCenterPage: true, | |
aspectRatio: 2.0, | |
onPageChanged: (index, reason) { | |
setState(() { | |
_current = index; | |
}); | |
}), | |
items: insightText | |
.map( | |
(item) => Container( | |
alignment: Alignment.topCenter, | |
width: _deviceWidth * .8, | |
child: Center( | |
child: Text( | |
item.toString(), | |
style: TextStyle(fontSize: 20.0), | |
textAlign: TextAlign.center, | |
), | |
), | |
color: Colors.white, | |
), | |
) | |
.toList(), | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment