1
0
mirror of https://github.com/nisrulz/flutter-examples.git synced 2026-08-25 01:05:36 +00:00
Files
flutter-examples/expense_planner/lib/main.dart
Nishant Srivastava bcb3629907 refactor: split app wrapper from focused example code (complex apps)
Convert the final 12 multi-screen apps to the validated pattern:
lib/main.dart keeps only the MaterialApp bootstrap (plus firebase init where
that is genuine bootstrap), and a new lib/example.dart holds the entry screen
and focused example code, importing existing supporting files. firebase_crash
keeps its runZonedGuarded bootstrap in main.dart and extracts only CrashApp.

Apps: bmi_calculator, covid19_mobile_app, expense_planner,
firebase_crash_reporting, firebase_google_authentication, lunch_app,
navigation_drawer, news_memes_app, save_data_locally_with_sqlite,
todo_list_using_provider, unit_testing, using_firebase_db
2026-08-18 00:55:18 +02:00

38 lines
1.1 KiB
Dart

import 'package:flutter/material.dart';
import 'example.dart';
void main() => runApp(const MyApp());
class MyApp extends StatelessWidget {
const MyApp({super.key});
@override
Widget build(BuildContext context) {
return MaterialApp(
title: 'Personal Expenses',
theme: ThemeData(
primarySwatch: Colors.purple,
colorScheme: ColorScheme.fromSwatch(primarySwatch: Colors.purple)
.copyWith(secondary: Colors.amber),
fontFamily: 'Quicksand',
textTheme: ThemeData.light().textTheme.copyWith(
titleMedium: TextStyle(
fontFamily: 'OpenSans',
fontWeight: FontWeight.bold,
fontSize: 18,
),
labelLarge: TextStyle(color: Colors.white),
),
appBarTheme: AppBarTheme(
titleTextStyle: TextStyle(
fontFamily: 'OpenSans',
fontSize: 20,
fontWeight: FontWeight.bold,
),
)),
home: const Example(),
);
}
}