Skip to content

Instantly share code, notes, and snippets.

@rahichesoft
Created July 1, 2018 11:09
Show Gist options
  • Save rahichesoft/d8005b2847929b975b977616ebbdf2ed to your computer and use it in GitHub Desktop.
Save rahichesoft/d8005b2847929b975b977616ebbdf2ed to your computer and use it in GitHub Desktop.
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