-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.dart
31 lines (29 loc) · 940 Bytes
/
main.dart
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
import 'package:flutter/material.dart';
import 'package:provider/provider.dart';
import 'package:testing_flutter_app/models/favorites_model.dart';
import 'package:testing_flutter_app/screens/favorites.dart';
import 'package:testing_flutter_app/screens/home.dart';
void main() {
runApp(TestingApp());
}
class TestingApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return ChangeNotifierProvider<Favorites>(
create: (context) => Favorites(),
child: MaterialApp(
title: 'Testing Sample',
theme: ThemeData(
primarySwatch: Colors.blue,
visualDensity: VisualDensity.adaptivePlatformDensity,
),
routes: {
HomePage.routeName: (context) => HomePage(),
FavoritesPage.routeName: (context) => FavoritesPage(),
},
debugShowCheckedModeBanner: false,
initialRoute: HomePage.routeName,
),
);
}
}