Integrate logging system into Flutter app with service registration and testing setup

This commit is contained in:
2025-09-21 11:03:06 +02:00
parent daaaed47c4
commit 5572c66b10
9 changed files with 273 additions and 12 deletions

View File

@@ -1,6 +1,18 @@
import 'package:flutter/material.dart';
import 'package:fluttery/fluttery.dart';
import 'package:fluttery/logger/logger.dart';
Future<void> main() async {
// Ensures that the Flutter engine and widget binding
// are initialized before using async services or plugins
WidgetsFlutterBinding.ensureInitialized();
// any services
App.registerDefaultServices();
final logger = App.service<Logger>();
logger.debug("[MAIN] Registered all default services");
void main() {
runApp(const MyApp());
}

View File

@@ -31,6 +31,8 @@ environment:
dependencies:
flutter:
sdk: flutter
fluttery:
path: ../fluttery
# The following adds the Cupertino Icons font to your application.
# Use with the CupertinoIcons class for iOS style icons.