FirebaseException constructor

FirebaseException({
  1. required String plugin,
  2. String? message,
  3. String? code,
  4. StackTrace? stackTrace,
})

A generic class which provides exceptions in a Firebase-friendly format to users.

try {
  await Firebase.initializeApp();
} catch (e) {
  print(e.toString());
}

Implementation

FirebaseException({
  required this.plugin,
  this.message,
  String? code,
  this.stackTrace,
  // ignore: unnecessary_this
}) : this.code = code ?? 'unknown';