You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
37 lines
1.2 KiB
Dart
37 lines
1.2 KiB
Dart
// import 'package:firebase_crashlytics/firebase_crashlytics.dart';
|
|
// import 'package:flutter/material.dart';
|
|
|
|
import 'package:mohem_flutter_app/config/background_loader.dart';
|
|
import 'package:mohem_flutter_app/repo/account_repository.dart';
|
|
import 'package:injector/injector.dart';
|
|
|
|
class AppDependencies {
|
|
static void addDependencies() {
|
|
Injector injector = Injector.appInstance;
|
|
|
|
//add dependencies as needed
|
|
injector.registerSingleton<IAcRepository>(() => AcRepository());
|
|
|
|
// injector.registerSingleton<IAcRepository>((injector) => AcRepository());
|
|
|
|
_addCrashlytics();
|
|
_loadBackgroundTasksNonBlocking();
|
|
}
|
|
|
|
static void _addCrashlytics() {
|
|
// Set `enableInDevMode` to true to see reports while in debug mode
|
|
// This is only to be used for confirming that reports are being
|
|
// submitted as expected. It is not intended to be used for everyday
|
|
// development.
|
|
//Crashlytics.instance.enableInDevMode = true;
|
|
|
|
// Pass all uncaught errors from the framework to Crashlytics.
|
|
// FlutterError.onError = Crashlytics.instance.recordFlutterError;
|
|
}
|
|
|
|
static void _loadBackgroundTasksNonBlocking() {
|
|
final backgroundLoader = BackgroundLoader();
|
|
backgroundLoader.loadBackgroundData();
|
|
}
|
|
}
|