File tree Expand file tree Collapse file tree 2 files changed +19
-6
lines changed
Expand file tree Collapse file tree 2 files changed +19
-6
lines changed Original file line number Diff line number Diff line change 11import 'package:flutter/material.dart' ;
22import 'package:flutter_riverpod/flutter_riverpod.dart' ;
33import 'app_theme.dart' ;
4+ import 'router.dart' ;
45
56void main () {
67 runApp (const ProviderScope (child: MyApp ()));
@@ -11,14 +12,10 @@ class MyApp extends StatelessWidget {
1112
1213 @override
1314 Widget build (BuildContext context) {
14- return MaterialApp (
15+ return MaterialApp . router (
1516 title: 'LectureQ' ,
1617 theme: AppTheme .lightTheme,
17- home: const Scaffold (
18- body: Center (
19- child: Text ('LectureQ' ),
20- ),
21- ),
18+ routerConfig: router,
2219 );
2320 }
2421}
Original file line number Diff line number Diff line change 1+ import 'package:go_router/go_router.dart' ;
2+ import 'package:flutter/material.dart' ;
3+
4+ final GoRouter router = GoRouter (
5+ initialLocation: '/' ,
6+ routes: [
7+ GoRoute (
8+ path: '/' ,
9+ builder: (context, state) => const Scaffold (
10+ body: Center (
11+ child: Text ('LectureQ' ),
12+ ),
13+ ),
14+ ),
15+ ],
16+ );
You can’t perform that action at this time.
0 commit comments