28 lines
697 B
Dart
28 lines
697 B
Dart
|
import 'package:fluro/fluro.dart';
|
||
|
|
||
|
import 'package:imagini/core/app_routes.dart';
|
||
|
import 'package:imagini/api/api_provider.dart';
|
||
|
import 'package:imagini/api/imagini_api_repository.dart';
|
||
|
|
||
|
class ImaginiApplication {
|
||
|
FluroRouter router;
|
||
|
ImaginiAPIRepository imaginiAPI;
|
||
|
|
||
|
Future<void> onCreate() async {
|
||
|
_initRouter();
|
||
|
_initAPIRepository();
|
||
|
}
|
||
|
|
||
|
Future<void> onTerminate() async {}
|
||
|
|
||
|
_initRouter() {
|
||
|
router = new FluroRouter();
|
||
|
AppRoutes.configureRoutes(router);
|
||
|
}
|
||
|
|
||
|
_initAPIRepository() {
|
||
|
APIProvider apiProvider = new APIProvider(server: "http://localhost:8484");
|
||
|
imaginiAPI = ImaginiAPIRepository(apiProvider);
|
||
|
}
|
||
|
}
|