initialize static method

Future<void> initialize(
  1. FirebaseOptions options,
  2. String appId
)

Implementation

static Future<void> initialize(FirebaseOptions options, String appId) async {
  _appId = appId;
  if (_initialized) return;
  _initialized = true;
  try {
    await _initializeInternal(options, appId);
  } catch (_) {
    // Let a later call retry instead of leaving FCM dead until the next
    // app restart (the flag used to stay set after a failure).
    _initialized = false;
    rethrow;
  }
}