Skip to content

Commit d0530a7

Browse files
author
yangshangzhi
committed
feat:修改导航栏内容
1 parent 4e394bb commit d0530a7

File tree

1 file changed

+56
-45
lines changed

1 file changed

+56
-45
lines changed

lib/components/widgetComp.dart

Lines changed: 56 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -125,6 +125,17 @@ class IndexState extends State<Index> {
125125

126126
getActions(context, model) {
127127
return [
128+
IconButton(
129+
icon: Icon(
130+
Icons.insert_link,
131+
),
132+
onPressed: () async {
133+
FluroRouter.router.navigateTo(
134+
context,
135+
'/webview?url=${Uri.encodeComponent(this.originCodeUrl)}',
136+
);
137+
},
138+
),
128139
IconButton(
129140
icon: Icon(
130141
Icons.code,
@@ -141,51 +152,51 @@ class IndexState extends State<Index> {
141152
AppShare.shareText(msg);
142153
},
143154
),
144-
PopupMenuButton(
145-
offset: Offset(0, 80),
146-
onSelected: (index) {
147-
switch (index) {
148-
case 0:
149-
FluroRouter.router.navigateTo(
150-
context,
151-
'/webview?url=${Uri.encodeComponent('https://github.com/efoxTeam/flutter-ui')}',
152-
);
153-
break;
154-
case 1:
155-
FluroRouter.router.navigateTo(
156-
context,
157-
'/webview?url=${Uri.encodeComponent(this.originCodeUrl)}',
158-
);
159-
break;
160-
}
161-
},
162-
itemBuilder: (context) {
163-
return [
164-
PopupMenuItem(
165-
child: Row(children: [
166-
Icon(
167-
Icons.home,
168-
color: Color(AppTheme.greyColor),
169-
),
170-
Text(" "),
171-
Text('Flutter-UI'),
172-
]),
173-
value: 0,
174-
),
175-
PopupMenuItem(
176-
child: Row(children: [
177-
Icon(
178-
Icons.code,
179-
color: Color(AppTheme.greyColor),
180-
),
181-
Text(" "),
182-
Text(this.title),
183-
]),
184-
value: 1,
185-
),
186-
];
187-
},
188-
),
155+
// PopupMenuButton(
156+
// offset: Offset(0, 80),
157+
// onSelected: (index) {
158+
// switch (index) {
159+
// case 0:
160+
// FluroRouter.router.navigateTo(
161+
// context,
162+
// '/webview?url=${Uri.encodeComponent('https://github.com/efoxTeam/flutter-ui')}',
163+
// );
164+
// break;
165+
// case 1:
166+
// FluroRouter.router.navigateTo(
167+
// context,
168+
// '/webview?url=${Uri.encodeComponent(this.originCodeUrl)}',
169+
// );
170+
// break;
171+
// }
172+
// },
173+
// itemBuilder: (context) {
174+
// return [
175+
// PopupMenuItem(
176+
// child: Row(children: [
177+
// Icon(
178+
// Icons.home,
179+
// color: Color(AppTheme.greyColor),
180+
// ),
181+
// Text(" "),
182+
// Text('Flutter-UI'),
183+
// ]),
184+
// value: 0,
185+
// ),
186+
// PopupMenuItem(
187+
// child: Row(children: [
188+
// Icon(
189+
// Icons.code,
190+
// color: Color(AppTheme.greyColor),
191+
// ),
192+
// Text(" "),
193+
// Text(this.title),
194+
// ]),
195+
// value: 1,
196+
// ),
197+
// ];
198+
// },
199+
// ),
189200
];
190201
}
191202

0 commit comments

Comments
 (0)