2026-02-25 10:57:43 +08:00
|
|
|
import 'package:flutter/material.dart';
|
2026-03-27 19:07:39 +08:00
|
|
|
import 'core/config/env.dart';
|
2026-04-01 14:18:22 +08:00
|
|
|
import 'core/logging/logger.dart';
|
|
|
|
|
import 'core/logging/log_service.dart';
|
|
|
|
|
import 'core/logging/error_handler.dart';
|
2026-04-01 18:35:32 +08:00
|
|
|
import 'core/analytics/tracker.dart';
|
2026-03-27 14:05:03 +08:00
|
|
|
import 'app/di/injection.dart';
|
|
|
|
|
import 'app/app.dart';
|
2026-02-25 15:25:31 +08:00
|
|
|
|
|
|
|
|
void main() async {
|
|
|
|
|
WidgetsFlutterBinding.ensureInitialized();
|
2026-04-01 14:18:22 +08:00
|
|
|
|
|
|
|
|
final logService = await LogService.create();
|
|
|
|
|
Logger.setLogService(logService);
|
|
|
|
|
|
|
|
|
|
AppErrorHandler().register();
|
|
|
|
|
|
2026-02-25 15:25:31 +08:00
|
|
|
await configureDependencies();
|
2026-03-27 19:07:39 +08:00
|
|
|
await Env.init();
|
2026-03-20 18:47:50 +08:00
|
|
|
|
2026-04-01 18:35:32 +08:00
|
|
|
await AnalyticsTracker.init(
|
|
|
|
|
endpoint: Env.analyticsEndpoint,
|
|
|
|
|
deviceId: Env.deviceId,
|
|
|
|
|
);
|
|
|
|
|
|
2026-04-01 14:18:22 +08:00
|
|
|
getLogger(
|
|
|
|
|
'app',
|
|
|
|
|
).info(message: 'App starting...', extra: {'version': Env.version});
|
|
|
|
|
|
2026-03-27 19:07:39 +08:00
|
|
|
runApp(const LinksyApp());
|
2026-02-25 10:57:43 +08:00
|
|
|
}
|