36 lines
914 B
Dart
36 lines
914 B
Dart
import 'package:flutter/material.dart';
|
|
import 'package:firebase_core/firebase_core.dart';
|
|
import 'splash_screen.dart';
|
|
import 'dashboard.dart';
|
|
import 'firebase_options.dart';
|
|
|
|
void main() async {
|
|
WidgetsFlutterBinding.ensureInitialized();
|
|
await Firebase.initializeApp(
|
|
options: DefaultFirebaseOptions.currentPlatform,
|
|
);
|
|
runApp(const MyApp());
|
|
}
|
|
|
|
class MyApp extends StatelessWidget {
|
|
const MyApp({super.key});
|
|
|
|
// This widget is the root of your application.
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
return MaterialApp(
|
|
title: 'Smart Farm',
|
|
theme: ThemeData(
|
|
colorScheme: ColorScheme.fromSeed(seedColor: Colors.green),
|
|
useMaterial3: true,
|
|
),
|
|
debugShowCheckedModeBanner: false,
|
|
initialRoute: '/',
|
|
routes: {
|
|
'/': (context) => const SplashScreen(),
|
|
'/home': (context) => const DashboardPage(),
|
|
},
|
|
);
|
|
}
|
|
}
|