Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: Remove FirebaseDB.init #68

Merged
merged 1 commit into from
Mar 26, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading