app static method

FusabaseApp app(
  1. {String name = globals.defaultAppName}
)

Returns the FusabaseApp with the given name (or the default FusabaseApp if no name specified).

Parameters:

Returns:

Throws:

  • Exception if no app with the given name exists.

Example:

final app = Fusabase.app(name: 'my-app');

Implementation

static FusabaseApp app({String name = globals.defaultAppName}) {
  FusabaseApp? app = _apps[name];
  if (app == null) {
    throw Exception("$name app doesn't exist!");
  }
  return app;
}