Created
April 26, 2018 12:00
-
-
Save shaktiprakash099/14fff9b6c1f2b121e7386ef5e38e8237 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
import 'package:flutter/material.dart'; | |
class BasicList extends StatelessWidget { | |
@override | |
Widget build(BuildContext context) { | |
print('i m in vbaaiscvclass '); | |
// TODO: implement build | |
final title = 'Basic lists'; | |
return new MaterialApp( | |
title: title, | |
home: new Scaffold( | |
appBar: new AppBar( | |
title: new Text(title), | |
), | |
body: new ListView( | |
children: <Widget>[ | |
new ListTile( | |
leading: new Icon(Icons.map), | |
title: new Text('Map'), | |
onTap: () { | |
final snackBar = new SnackBar( | |
content: new Text('Yay! A SnackBar!'), | |
action: new SnackBarAction( | |
label: 'Undo', | |
onPressed: () { | |
// Some code to undo the change! | |
}, | |
), | |
); | |
// Find the Scaffold in the Widget tree and use it to show a SnackBar! | |
Scaffold.of(context).showSnackBar(snackBar); | |
}), | |
new ListTile( | |
leading: new Icon(Icons.photo_album), | |
title: new Text('Album'), | |
), | |
new ListTile( | |
leading: new Icon(Icons.phone), | |
title: new Text('Phone'), | |
), | |
], | |
), | |
), | |
); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment