Skip to content

Commit fcda088

Browse files
committed
update example
1 parent 52a9146 commit fcda088

File tree

1 file changed

+4
-7
lines changed

1 file changed

+4
-7
lines changed

example/home.dart

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,10 @@ class ExampleHome extends StatelessWidget {
6666
onPressed: example == null
6767
? null
6868
: () {
69-
push(context, example);
69+
Navigator.of(context)
70+
.push(MaterialPageRoute(builder: (_) {
71+
return example;
72+
}));
7073
},
7174
child: Text(
7275
keyList[index],
@@ -95,10 +98,4 @@ class ExampleHome extends StatelessWidget {
9598
),
9699
);
97100
}
98-
99-
void push(BuildContext context, Widget widget) {
100-
Navigator.of(context).push(MaterialPageRoute(builder: (_) {
101-
return widget;
102-
}));
103-
}
104101
}

0 commit comments

Comments
 (0)