Created
July 1, 2018 11:09
-
-
Save rahichesoft/d8005b2847929b975b977616ebbdf2ed to your computer and use it in GitHub Desktop.
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
void main() => runApp(MaterialApp( | |
home: new MyApp(), | |
)); | |
class MyApp extends StatefulWidget { | |
@override | |
_MyAppState createState() => new _MyAppState(); | |
} | |
class _MyAppState extends State<MyApp> { | |
var index=0; | |
@override | |
Widget build(BuildContext context) { | |
return new Scaffold( | |
appBar: new AppBar(), | |
body: Padding( | |
padding: const EdgeInsets.all(8.0), | |
child: new Column(children: <Widget>[ | |
new Container(height: 200.0,color: Colors.grey,), | |
Container(height: 100.0, | |
child: new Swiper.children( | |
autoplay: true, | |
scrollDirection: Axis.horizontal, | |
index: index, | |
children: <Widget>[ | |
Container(height:100.0,color: Colors.red), | |
Container(height:100.0,color: Colors.purple), | |
Container(height:100.0,color: Colors.grey), | |
],), | |
) | |
],), | |
), | |
); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment