36 lines
862 B
Dart
36 lines
862 B
Dart
import 'package:flutter/material.dart';
|
|
import 'package:provider/provider.dart';
|
|
|
|
import 'pages/flood_station_page.dart';
|
|
import 'pages/landing_page.dart';
|
|
import 'services/flood_station_provider.dart';
|
|
|
|
void main() {
|
|
runApp(
|
|
ChangeNotifierProvider(
|
|
create: (context) => FloodStationProvider(),
|
|
child: const MyApp(),
|
|
),
|
|
);
|
|
}
|
|
|
|
class MyApp extends StatelessWidget {
|
|
const MyApp({super.key});
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
return MaterialApp(
|
|
title: 'Floodwatch',
|
|
theme: ThemeData(
|
|
colorScheme: ColorScheme.fromSeed(seedColor: Colors.deepPurple),
|
|
useMaterial3: true,
|
|
),
|
|
initialRoute: LandingPage.routeName,
|
|
routes: {
|
|
LandingPage.routeName: (context) => LandingPage(),
|
|
FloodStationPage.routeName: (context) => FloodStationPage(),
|
|
},
|
|
);
|
|
}
|
|
}
|