File tree 1 file changed +6
-4
lines changed
1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -60,8 +60,9 @@ class _DartPadAppState extends State<DartPadApp> {
60
60
builder: _homePageBuilder,
61
61
),
62
62
GoRoute (
63
- path: '/flutter' ,
64
- builder: _homePageBuilder,
63
+ path: '/:gistId' ,
64
+ builder: (context, state) => _homePageBuilder (context, state,
65
+ gist: state.pathParameters['gistId' ]),
65
66
),
66
67
],
67
68
);
@@ -116,9 +117,10 @@ class _DartPadAppState extends State<DartPadApp> {
116
117
});
117
118
}
118
119
119
- Widget _homePageBuilder (BuildContext context, GoRouterState state) {
120
+ Widget _homePageBuilder (BuildContext context, GoRouterState state,
121
+ {String ? gist}) {
120
122
final path = state.path;
121
- final gistId = state.uri.queryParameters['id' ];
123
+ final gistId = gist ?? state.uri.queryParameters['id' ];
122
124
final builtinSampleId = state.uri.queryParameters['sample' ];
123
125
final flutterSampleId = state.uri.queryParameters['sample_id' ];
124
126
final channelParam = state.uri.queryParameters['channel' ];
You can’t perform that action at this time.
0 commit comments