OLD | NEW |
1 library stocksapp; | 1 library stocksapp; |
2 | 2 |
3 import '../fn/lib/fn.dart'; | 3 import '../fn/lib/fn.dart'; |
4 import '../fn/widgets/widgets.dart'; | 4 import '../fn/widgets/widgets.dart'; |
5 import 'dart:collection'; | 5 import 'dart:collection'; |
6 import 'dart:math'; | 6 import 'dart:math'; |
7 import 'dart:sky' as sky; | 7 import 'dart:sky' as sky; |
8 | 8 |
9 part 'companylist.dart'; | 9 part 'companylist.dart'; |
10 part 'stockarrow.dart'; | 10 part 'stockarrow.dart'; |
(...skipping 19 matching lines...) Expand all Loading... |
30 | 30 |
31 static Style _titleStyle = new Style(''' | 31 static Style _titleStyle = new Style(''' |
32 flex: 1; | 32 flex: 1; |
33 margin: 0 4px;''' | 33 margin: 0 4px;''' |
34 ); | 34 ); |
35 | 35 |
36 StocksApp() : super(); | 36 StocksApp() : super(); |
37 | 37 |
38 Node render() { | 38 Node render() { |
39 var drawer = new Drawer( | 39 var drawer = new Drawer( |
40 onPositionChanged: _drawerAnimation.onPositionChanged, | 40 animation: _drawerAnimation, |
41 handleMaskFling: _drawerAnimation.handleFlingStart, | |
42 handleMaskTap: _drawerAnimation.handleMaskTap, | |
43 handlePointerCancel: _drawerAnimation.handlePointerCancel, | |
44 handlePointerDown: _drawerAnimation.handlePointerDown, | |
45 handlePointerMove: _drawerAnimation.handlePointerMove, | |
46 handlePointerUp: _drawerAnimation.handlePointerUp, | |
47 children: [ | 41 children: [ |
48 new DrawerHeader( | 42 new DrawerHeader( |
49 children: [new Text('Stocks')] | 43 children: [new Text('Stocks')] |
50 ), | 44 ), |
51 new MenuItem( | 45 new MenuItem( |
52 key: 'Inbox', | 46 key: 'Inbox', |
53 icon: 'content/inbox', | 47 icon: 'content/inbox', |
54 children: [new Text('Inbox')] | 48 children: [new Text('Inbox')] |
55 ), | 49 ), |
56 new MenuDivider( | 50 new MenuDivider( |
(...skipping 12 matching lines...) Expand all Loading... |
69 key: 'Help & Feedback', | 63 key: 'Help & Feedback', |
70 icon: 'action/help', | 64 icon: 'action/help', |
71 children: [new Text('Help & Feedback')] | 65 children: [new Text('Help & Feedback')] |
72 ) | 66 ) |
73 ] | 67 ] |
74 ); | 68 ); |
75 | 69 |
76 var toolbar = new Toolbar( | 70 var toolbar = new Toolbar( |
77 children: [ | 71 children: [ |
78 new Icon(key: 'menu', style: _iconStyle, | 72 new Icon(key: 'menu', style: _iconStyle, |
79 onClick: _drawerAnimation.toggle, | |
80 size: 24, | 73 size: 24, |
81 type: 'navigation/menu_white'), | 74 type: 'navigation/menu_white') |
| 75 ..events.listen('click', _drawerAnimation.toggle), |
82 new Container( | 76 new Container( |
83 style: _titleStyle, | 77 style: _titleStyle, |
84 children: [new Text('I am a stocks app')] | 78 children: [new Text('I am a stocks app')] |
85 ), | 79 ), |
86 new Icon(key: 'search', style: _iconStyle, | 80 new Icon(key: 'search', style: _iconStyle, |
87 size: 24, | 81 size: 24, |
88 type: 'action/search_white'), | 82 type: 'action/search_white'), |
89 new Icon(key: 'more_white', style: _iconStyle, | 83 new Icon(key: 'more_white', style: _iconStyle, |
90 size: 24, | 84 size: 24, |
91 type: 'navigation/more_vert_white') | 85 type: 'navigation/more_vert_white') |
(...skipping 10 matching lines...) Expand all Loading... |
102 key: 'Content', | 96 key: 'Content', |
103 style: _style, | 97 style: _style, |
104 children: [toolbar, new Stocklist(stocks: oracle.stocks)] | 98 children: [toolbar, new Stocklist(stocks: oracle.stocks)] |
105 ), | 99 ), |
106 fab, | 100 fab, |
107 drawer, | 101 drawer, |
108 ] | 102 ] |
109 ); | 103 ); |
110 } | 104 } |
111 } | 105 } |
OLD | NEW |