Skip to content

Instantly share code, notes, and snippets.

@vemarav
Last active October 25, 2018 07:48
Show Gist options
  • Save vemarav/01f3de5317840278f2efab883cb68c9a to your computer and use it in GitHub Desktop.
Save vemarav/01f3de5317840278f2efab883cb68c9a to your computer and use it in GitHub Desktop.
Flutter Navigation Drawer
import 'package:flutter/material.dart';
void main() => runApp(new Keeper());
class Keeper extends StatelessWidget {
@override
Widget build(BuildContext context) {
return new MaterialApp(
title: 'Keeper',
home: new KeeperDrawer(),
);
}
}
class KeeperDrawer extends StatelessWidget {
Drawer drawer = new Drawer();
@override
Widget build(BuildContext context) {
return new Scaffold(
drawer: drawer,
appBar: new AppBar(
title: new Text('Keeper'),
),
body: new Center(
child: new Text('Hello World!')
)
);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment