Skip to content

Commit

Permalink
Merge pull request #68 from mario-bermonti:remove-firebase-init
Browse files Browse the repository at this point in the history
refactor: Remove FirebaseDB.init
  • Loading branch information
mario-bermonti authored Mar 26, 2024
2 parents 02906ab + b9188f5 commit 24c2e93
Showing 1 changed file with 0 additions and 21 deletions.
21 changes: 0 additions & 21 deletions lib/databases/firebase_db/firebase_db.dart
Original file line number Diff line number Diff line change
Expand Up @@ -19,27 +19,6 @@ class FirebaseDB implements DB {
required this.taskName,
});

/// Initializes the db with data required by all methods.
/// Behaves as a constructor to facilitate [FirebaseDB] usage. The params
/// [participantID], [sessionID], and [taskID] are used by methods to
/// interact with the db since data is structured hierarchically.
/// [firebaseFirestore] has to be an instance of [FirebaseFirestore],
/// e.g., FirebaseFirestore.instance.
static FirebaseDB init(
FirebaseFirestore firebaseFirestore, {
required participantID,
required sessionID,
required taskID,
}) {
final FirebaseDB db = FirebaseDB(
firebaseFirestore,
participantID: participantID,
sessionID: sessionID,
taskName: taskID,
);
return db;
}

/// Adds [device] metadata to [FirebaseFirestore].
/// Stores the [device] metadata in an independent doc inside a collection
/// named `deviceMetadata`. It will override previous [device] metadata for
Expand Down

0 comments on commit 24c2e93

Please sign in to comment.