98 lines
3.1 KiB
Dart
98 lines
3.1 KiB
Dart
import 'package:flutter/material.dart';
|
|
import 'package:provider/provider.dart';
|
|
import 'services/ble_service.dart';
|
|
import 'screens/main_shell.dart';
|
|
|
|
void main() {
|
|
runApp(const SIABApp());
|
|
}
|
|
|
|
class SIABApp extends StatelessWidget {
|
|
const SIABApp({super.key});
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
final colorScheme = ColorScheme.fromSeed(
|
|
seedColor: const Color(0xFF2563EB),
|
|
brightness: Brightness.light,
|
|
);
|
|
|
|
return ChangeNotifierProvider(
|
|
create: (_) => BLEService(),
|
|
child: MaterialApp(
|
|
title: 'SIAB',
|
|
theme: ThemeData(
|
|
colorScheme: colorScheme,
|
|
scaffoldBackgroundColor: const Color(0xFFF4F8FF),
|
|
useMaterial3: true,
|
|
appBarTheme: const AppBarTheme(
|
|
centerTitle: false,
|
|
backgroundColor: Color(0xFFF8FBFF),
|
|
foregroundColor: Color(0xFF0F172A),
|
|
elevation: 0,
|
|
surfaceTintColor: Colors.transparent,
|
|
),
|
|
cardTheme: CardThemeData(
|
|
color: Colors.white,
|
|
elevation: 0,
|
|
margin: EdgeInsets.zero,
|
|
shape: RoundedRectangleBorder(
|
|
borderRadius: BorderRadius.circular(18),
|
|
),
|
|
),
|
|
filledButtonTheme: FilledButtonThemeData(
|
|
style: FilledButton.styleFrom(
|
|
backgroundColor: const Color(0xFF2563EB),
|
|
foregroundColor: Colors.white,
|
|
shape: RoundedRectangleBorder(
|
|
borderRadius: BorderRadius.circular(16),
|
|
),
|
|
),
|
|
),
|
|
elevatedButtonTheme: ElevatedButtonThemeData(
|
|
style: ElevatedButton.styleFrom(
|
|
backgroundColor: const Color(0xFF2563EB),
|
|
foregroundColor: Colors.white,
|
|
elevation: 0,
|
|
shape: RoundedRectangleBorder(
|
|
borderRadius: BorderRadius.circular(16),
|
|
),
|
|
),
|
|
),
|
|
outlinedButtonTheme: OutlinedButtonThemeData(
|
|
style: OutlinedButton.styleFrom(
|
|
foregroundColor: const Color(0xFF2563EB),
|
|
side: const BorderSide(color: Color(0x663B82F6)),
|
|
shape: RoundedRectangleBorder(
|
|
borderRadius: BorderRadius.circular(16),
|
|
),
|
|
),
|
|
),
|
|
textButtonTheme: TextButtonThemeData(
|
|
style: TextButton.styleFrom(
|
|
foregroundColor: const Color(0xFF2563EB),
|
|
shape: RoundedRectangleBorder(
|
|
borderRadius: BorderRadius.circular(14),
|
|
),
|
|
),
|
|
),
|
|
snackBarTheme: SnackBarThemeData(
|
|
behavior: SnackBarBehavior.floating,
|
|
backgroundColor: const Color(0xFF0F172A),
|
|
contentTextStyle: const TextStyle(
|
|
color: Colors.white,
|
|
fontWeight: FontWeight.w600,
|
|
),
|
|
shape: RoundedRectangleBorder(
|
|
borderRadius: BorderRadius.circular(16),
|
|
),
|
|
),
|
|
),
|
|
themeMode: ThemeMode.light,
|
|
home: const MainShell(),
|
|
debugShowCheckedModeBanner: false,
|
|
),
|
|
);
|
|
}
|
|
}
|