Skip to content

Commit

Permalink
Fixed lint error
Browse files Browse the repository at this point in the history
  • Loading branch information
vitormpp committed May 29, 2024
1 parent 490fa98 commit fef984a
Show file tree
Hide file tree
Showing 11 changed files with 28 additions and 28 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -106,10 +106,10 @@ class AppBusStopDatabase extends AppDatabase<Map<String, BusStopData>> {
}

/// Replaces all the bus stops in this database with entries
/// from [stops].
/// from [data].
@override
Future<void> saveToDatabase(Map<String, BusStopData> stops) async {
Future<void> saveToDatabase(Map<String, BusStopData> data) async {
await deleteBusStops();
await _insertBusStops(stops);
await _insertBusStops(data);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,11 @@ class CalendarDatabase extends AppDatabase<List<CalendarEvent>> {
}

@override
Future<void> saveToDatabase(List<CalendarEvent> calendar) async {
Future<void> saveToDatabase(List<CalendarEvent> data) async {
final db = await getDatabase();
await db.transaction((txn) async {
await txn.delete('CALENDAR');
for (final event in calendar) {
for (final event in data) {
await txn.insert('CALENDAR', event.toMap());
}
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,8 @@ class AppCourseUnitsDatabase extends AppDatabase<List<CourseUnit>> {
}

@override
Future<void> saveToDatabase(List<CourseUnit> courseUnits) async {
Future<void> saveToDatabase(List<CourseUnit> data) async {
await deleteCourseUnits();
await _insertCourseUnits(courseUnits);
await _insertCourseUnits(data);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -77,10 +77,10 @@ class AppCoursesDatabase extends AppDatabase<List<Course>> {
await batch.commit();
}

/// Replaces all of the data in this database with the data from [courses].
/// Replaces all of the data in this database with the data from [data].
@override
Future<void> saveToDatabase(List<Course> courses) async {
Future<void> saveToDatabase(List<Course> data) async {
await deleteCourses();
await _insertCourses(courses);
await _insertCourses(data);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -70,10 +70,10 @@ CREATE TABLE exams(id TEXT, subject TEXT, begin TEXT, end TEXT,
await batch.commit();
}

/// Replaces all of the data in this database with [exams].
/// Replaces all of the data in this database with [data].
@override
Future<void> saveToDatabase(List<Exam> exams) async {
Future<void> saveToDatabase(List<Exam> data) async {
await deleteExams();
await _insertExams(exams);
await _insertExams(data);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,10 @@ class AppLastUserInfoUpdateDatabase extends AppDatabase<DateTime> {
return DateTime.now();
}

/// Replaces the timestamp in this database with [timestamp].
/// Replaces the timestamp in this database with [data].
@override
Future<void> saveToDatabase(DateTime timestamp) async {
Future<void> saveToDatabase(DateTime data) async {
await deleteLastUpdate();
await _insertTimeStamp(timestamp);
await _insertTimeStamp(data);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -79,8 +79,8 @@ CREATE TABLE lectures(subject TEXT, typeClass TEXT,

/// Replaces all of the data in this database with [lectures].
@override
Future<void> saveToDatabase(List<Lecture> lectures) async {
Future<void> saveToDatabase(List<Lecture> data) async {
await deleteLectures();
await _insertLectures(lectures);
await _insertLectures(data);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,11 @@ class LibraryOccupationDatabase extends AppDatabase<LibraryOccupation> {
}

@override
Future<void> saveToDatabase(LibraryOccupation occupation) async {
Future<void> saveToDatabase(LibraryOccupation data) async {
final db = await getDatabase();
await db.transaction((txn) async {
await txn.delete('FLOOR_OCCUPATION');
for (final floor in occupation.floors) {
for (final floor in data.floors) {
await txn.insert('FLOOR_OCCUPATION', floor.toMap());
}
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,10 +67,10 @@ class AppReferencesDatabase extends AppDatabase<List<Reference>> {
await batch.commit();
}

/// Replaces all of the data in this database with the data from [references].
/// Replaces all of the data in this database with the data from [data].
@override
Future<void> saveToDatabase(List<Reference> references) async {
Future<void> saveToDatabase(List<Reference> data) async {
await deleteReferences();
await insertReferences(references);
await insertReferences(data);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -119,11 +119,11 @@ class RestaurantDatabase extends AppDatabase<List<Restaurant>> {
}

@override
Future<void> saveToDatabase(List<Restaurant> restaurants) async {
Future<void> saveToDatabase(List<Restaurant> data) async {
final db = await getDatabase();
await db.transaction((transaction) async {
await deleteAll(transaction);
for (final restaurant in restaurants) {
for (final restaurant in data) {
await insertRestaurant(transaction, restaurant);
}
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@ class AppUserDataDatabase extends AppDatabase<Profile> {
AppUserDataDatabase()
: super('userdata.db', ['CREATE TABLE userdata(key TEXT, value TEXT)']);

/// Adds [profile] to this database.
/// Adds [data] (profile) to this database.
@override
Future<void> saveToDatabase(Profile profile) async {
for (final keymap in profile.keymapValues()) {
Future<void> saveToDatabase(Profile data) async {
for (final keymap in data.keymapValues()) {
await insertInDatabase(
'userdata',
{'key': keymap.item1, 'value': keymap.item2},
Expand Down

0 comments on commit fef984a

Please sign in to comment.