This repository has been archived on 2023-08-16. You can view files and clone it, but cannot push or open issues or pull requests.
LocalSpend-Tracker/lib/main.dart

51 lines
1.5 KiB
Dart
Raw Normal View History

2019-01-22 20:20:10 +00:00
import 'package:flutter/material.dart';
import 'package:local_spend/pages/home_page.dart';
import 'package:local_spend/pages/login_page.dart';
import 'package:local_spend/pages/map_page.dart';
2019-08-05 08:33:39 +00:00
import 'package:local_spend/pages/receipt_page_2.dart';
import 'package:local_spend/pages/spash_screen.dart';
import 'package:local_spend/pages/more_page.dart';
import 'package:flutter_localizations/flutter_localizations.dart';
2019-08-27 10:00:57 +00:00
import 'package:local_spend/common/apifunctions/get_graph_data.dart';
2019-01-22 20:20:10 +00:00
void main() {
runApp(MyApp());
}
2019-01-22 20:20:10 +00:00
void loadGraphs() {}
2019-08-27 10:00:57 +00:00
class GraphWithTitle {
GraphWithTitle({this.graph, this.title});
2019-08-27 10:00:57 +00:00
GraphData graph;
String title;
}
2019-01-22 20:20:10 +00:00
class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
// TODO: load graphs on app login and send to graph widgets
2019-08-27 10:00:57 +00:00
return new MaterialApp(
debugShowCheckedModeBanner: false,
localizationsDelegates: [
GlobalMaterialLocalizations.delegate,
GlobalWidgetsLocalizations.delegate,
],
supportedLocales: [Locale("en")],
title: "Local Spend Tracker",
2019-05-10 11:51:11 +00:00
theme: new ThemeData(
primarySwatch: Colors.blueGrey,
),
routes: <String, WidgetBuilder>{
"/HomePage": (BuildContext context) => HomePage(),
"/LoginPage": (BuildContext context) => LoginPage(),
'/MapPage': (BuildContext context) => MapPage(),
2019-08-05 08:33:39 +00:00
"/ReceiptPage": (BuildContext context) => ReceiptPage2(),
"/MorePage": (BuildContext context) => MorePage(),
},
home: SplashScreen(),
2019-01-22 20:20:10 +00:00
);
}
}