Skip to content

Commit 407c29e

Browse files
committed
Fix routing errors on web
1 parent 9956149 commit 407c29e

File tree

3 files changed

+1
-7
lines changed

3 files changed

+1
-7
lines changed

lib/main.dart

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,7 @@ class MyApp extends StatelessWidget {
77
@override
88
Widget build(BuildContext context) {
99
return MaterialApp(
10-
initialRoute: HomePage.id,
11-
routes: {
12-
HomePage.id : (context)=> HomePage(),
13-
DetailsPage.id : (context) => DetailsPage(),
14-
},
10+
home: HomePage(),
1511
);
1612
}
1713
}

lib/screens/detail_page.dart

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ import 'package:poke_dex/utilities/colors.dart';
44
import 'package:fl_chart/fl_chart.dart';
55

66
class DetailsPage extends StatelessWidget {
7-
static final id = 'details';
87
final Pokemon pokemon;
98
DetailsPage({this.pokemon});
109

lib/screens/home_page.dart

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ import 'package:poke_dex/utilities/colors.dart';
77
import 'package:url_launcher/url_launcher.dart';
88

99
class HomePage extends StatefulWidget {
10-
static const id = 'homepage';
1110

1211
@override
1312
_HomePageState createState() => _HomePageState();

0 commit comments

Comments
 (0)