mirror of
https://github.com/kuhyx/screen-locker.git
synced 2026-07-04 13:23:13 +02:00
- Add sqflite_common_ffi + very_good_analysis; tighten analysis_options - Add BackupService for JSON export/import of exercise state - Add full test coverage: models, screens, services, widgets - Add scripts/check_flutter_coverage.sh to enforce 100% line coverage - Add docstrings to ExerciseState fields and storage service - Minor fixes across screens, widgets, and sync/HTTP services Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01VuiPt6GPWkxpLbJFrnfy8U
37 lines
1.1 KiB
Dart
37 lines
1.1 KiB
Dart
import 'package:flutter/material.dart';
|
|
import 'package:workout_app/screens/home_screen.dart';
|
|
import 'package:workout_app/services/backup_service.dart';
|
|
import 'package:workout_app/services/http_server_service.dart';
|
|
import 'package:workout_app/services/storage_service.dart';
|
|
|
|
void main() async {
|
|
WidgetsFlutterBinding.ensureInitialized();
|
|
await BackupService.instance.requestStoragePermission();
|
|
await StorageService.init();
|
|
await StorageService.instance.restoreFromBackupIfNeeded();
|
|
await HttpServerService.instance.start();
|
|
runApp(const WorkoutApp());
|
|
}
|
|
|
|
/// Root widget that bootstraps the app with Material 3 dark theming.
|
|
class WorkoutApp extends StatelessWidget {
|
|
/// Creates the root app widget.
|
|
const WorkoutApp({super.key});
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
return MaterialApp(
|
|
title: 'Workout Tracker',
|
|
debugShowCheckedModeBanner: false,
|
|
theme: ThemeData(
|
|
colorScheme: ColorScheme.fromSeed(
|
|
seedColor: Colors.indigo,
|
|
brightness: Brightness.dark,
|
|
),
|
|
useMaterial3: true,
|
|
),
|
|
home: const HomeScreen(),
|
|
);
|
|
}
|
|
}
|