Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import 'package:flutter/material.dart';
- void main() => runApp(new MyApp());
- class MyApp extends StatefulWidget {
- @override
- State<StatefulWidget> createState() {
- return new MyAppState();
- }
- }
- class MyAppState extends State<MyApp> with TickerProviderStateMixin {
- @override
- Widget build(BuildContext context) {
- Drawer drawer = new Drawer(
- child: new Column(
- children: <Widget>[
- new Expanded(
- child: new ListView(
- padding: const EdgeInsets.only(top: 8.0),
- children: <Widget>[
- new Column(
- mainAxisSize: MainAxisSize.min,
- crossAxisAlignment: CrossAxisAlignment.stretch,
- children: [
- new ListTile(
- dense: true,
- leading: new Icon(Icons.home),
- title: new Text("Test"),
- onTap: () {},
- ),
- new ListTile(
- dense: true,
- leading: new Icon(Icons.category),
- title: new Text("Test"),
- trailing: new Chip(
- backgroundColor: Colors.red,
- label: new Text(
- "52",
- style: new TextStyle(color: Colors.white),
- ),
- ),
- onTap: () {},
- ),
- new ListTile(
- dense: true,
- leading: new Icon(Icons.card_giftcard),
- title: new Text("Test"),
- onTap: () {},
- ),
- new ListTile(
- dense: true,
- leading: new Icon(Icons.shopping_basket),
- title: new Text("Test"),
- onTap: () {},
- ),
- ],
- ),
- ],
- ),
- ),
- ],
- ),
- );
- return new MaterialApp(
- home: new Scaffold(
- appBar: new AppBar(),
- drawer: drawer,
- body: new Container(),
- ),
- );
- }
- }
Add Comment
Please, Sign In to add comment