-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.dart
49 lines (36 loc) · 896 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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
import 'package:firebase_core/firebase_core.dart';
import 'package:flutter/material.dart';
import 'package:bhavya/home_screen.dart';
import 'package:provider/provider.dart';
import 'cart_model.dart';
Future<void> main() async
{
try{
WidgetsFlutterBinding.ensureInitialized();
await Firebase.initializeApp();
}
catch(errorMsg)
{
print("Error:" + errorMsg.toString());
}
runApp(
ChangeNotifierProvider(
create: (context) => CartModel(),
child: MyApp(),
),
);
}
class MyApp extends StatelessWidget {
const MyApp({super.key});
@override
Widget build(BuildContext context) {
return MaterialApp(
title: 'Flutter EcomAR',
theme: ThemeData(
primarySwatch: Colors.purple,
),
debugShowCheckedModeBanner: false,
home: const HomeScreen(),
);
}
}