cims_apps/lib/main.dart

89 lines
2.6 KiB
Dart

import 'package:cims_apps/application/theme/color_palette.dart';
import 'package:cims_apps/core/route/route.dart';
import 'package:cims_apps/core/utils/size_config.dart';
import 'package:flutter/material.dart';
void main() {
WidgetsFlutterBinding.ensureInitialized();
runApp(const MyApp());
}
class MyApp extends StatelessWidget {
const MyApp({super.key});
// This widget is the root of your application.
@override
Widget build(BuildContext context) {
SizeConfig.initOnStartUp(context);
return MaterialApp(
title: 'CIMS',
debugShowCheckedModeBanner: false,
theme: ThemeData(
appBarTheme: const AppBarTheme(
centerTitle: true,
backgroundColor: Colors.white,
elevation: 1,
foregroundColor: Colors.black,
titleTextStyle: TextStyle(
fontSize: 20,
fontWeight: FontWeight.w700,
fontFamily: 'Manrope',
color: ColorPalette.slate800,
)),
fontFamily: 'Manrope',
scaffoldBackgroundColor: Colors.white,
textTheme: const TextTheme(
displaySmall: TextStyle(
fontSize: 14,
fontWeight: FontWeight.w500,
color: ColorPalette.slate800,
),
displayMedium: TextStyle(
fontSize: 16,
fontWeight: FontWeight.w600,
color: ColorPalette.slate800,
),
displayLarge: TextStyle(
fontSize: 16,
fontWeight: FontWeight.bold,
color: ColorPalette.slate800,
),
bodyMedium: TextStyle(
fontSize: 14,
fontWeight: FontWeight.w600,
color: ColorPalette.slate500,
),
bodyLarge: TextStyle(
fontSize: 16,
fontWeight: FontWeight.bold,
color: ColorPalette.slate500,
),
headlineSmall: TextStyle(
fontSize: 16,
fontWeight: FontWeight.bold,
color: ColorPalette.slate800,
),
headlineLarge: TextStyle(
fontSize: 28,
fontWeight: FontWeight.bold,
color: ColorPalette.slate800,
),
),
colorScheme: const ColorScheme.light().copyWith(
primary: const Color(0xff2563EB),
onPrimary: const Color(0xFFFF9130),
secondary: const Color(0xFFFECDA6),
onBackground: const Color(0xFFA9A9A9),
),
// useMaterial3: true,
),
initialRoute: initialRoute,
onGenerateRoute: generateRoutes,
navigatorObservers: [
NavigatorObserver(),
],
);
}
}