app method
Returns a FirebaseAppPlatform
instance.
If no name is provided, the default app instance is returned. Throws if the app does not exist.
Implementation
@override
FirebaseAppPlatform app([String name = defaultFirebaseAppName]) {
firebase.App app;
try {
app = firebase.app(name);
} catch (e) {
if ((e.toString().contains('Cannot read property') ||
e.toString().contains('Cannot read properties')) &&
e.toString().contains("'app'")) {
throw coreNotInitialized();
}
if (_getJSErrorCode(e) == 'app/no-app') {
throw noAppExists(name);
}
throw _catchJSError(e);
}
return _createFromJsApp(app);
}