Guest User

Untitled

a guest
Jun 23rd, 2018
94
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.18 KB | None | 0 0
  1. import 'package:flutter/material.dart';
  2.  
  3. void main() => runApp(new MyApp());
  4.  
  5. class MyApp extends StatefulWidget {
  6. @override
  7. State<StatefulWidget> createState() {
  8. return new MyAppState();
  9. }
  10. }
  11.  
  12. class MyAppState extends State<MyApp> with TickerProviderStateMixin {
  13. @override
  14. Widget build(BuildContext context) {
  15. Drawer drawer = new Drawer(
  16. child: new Column(
  17. children: <Widget>[
  18. new Expanded(
  19. child: new ListView(
  20. padding: const EdgeInsets.only(top: 8.0),
  21. children: <Widget>[
  22. new Column(
  23. mainAxisSize: MainAxisSize.min,
  24. crossAxisAlignment: CrossAxisAlignment.stretch,
  25. children: [
  26. new ListTile(
  27. dense: true,
  28. leading: new Icon(Icons.home),
  29. title: new Text("Test"),
  30. onTap: () {},
  31. ),
  32. new ListTile(
  33. dense: true,
  34. leading: new Icon(Icons.category),
  35. title: new Text("Test"),
  36. trailing: new Chip(
  37. backgroundColor: Colors.red,
  38. label: new Text(
  39. "52",
  40. style: new TextStyle(color: Colors.white),
  41. ),
  42. ),
  43. onTap: () {},
  44. ),
  45. new ListTile(
  46. dense: true,
  47. leading: new Icon(Icons.card_giftcard),
  48. title: new Text("Test"),
  49. onTap: () {},
  50. ),
  51. new ListTile(
  52. dense: true,
  53. leading: new Icon(Icons.shopping_basket),
  54. title: new Text("Test"),
  55. onTap: () {},
  56. ),
  57. ],
  58. ),
  59. ],
  60. ),
  61. ),
  62. ],
  63. ),
  64. );
  65.  
  66. return new MaterialApp(
  67. home: new Scaffold(
  68. appBar: new AppBar(),
  69. drawer: drawer,
  70. body: new Container(),
  71. ),
  72. );
  73. }
  74. }
Add Comment
Please, Sign In to add comment