Created
July 1, 2018 11:09
-
-
Save rahichesoft/5eca1e0738944f0c71ed466c1dcc7d18 to your computer and use it in GitHub Desktop.
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
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