setup method
Implementation
Future<void> setup() async {
if (_instance != null) {
return;
}
try {
await Database.setup();
await OdinConfiguration.setup();
/**
* Register all services.
*/
Service.register(CookieService());
Service.register(CacheService());
Service.register(PlatformService());
/**
* Register all providers.
*/
await Provider.register(CookieProvider());
await Provider.register(PlatformProvider());
_instance = await onSetup();
} catch (e) {
print(e);
}
}