Skip to content

Instantly share code, notes, and snippets.

@shaktiprakash099
Created April 26, 2018 12:00
Show Gist options
  • Save shaktiprakash099/14fff9b6c1f2b121e7386ef5e38e8237 to your computer and use it in GitHub Desktop.
Save shaktiprakash099/14fff9b6c1f2b121e7386ef5e38e8237 to your computer and use it in GitHub Desktop.
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