Skip to content

Commit de82e72

Browse files
authored
Fix invalid int to boolean cast (#48)
This pull request includes an important change to the `BadgeRepositoryImpl` class in the `lib/data/repositories/badge_repository_impl.dart` file. The change ensures that the `isRepeatable` field is correctly interpreted as a boolean value. * [`lib/data/repositories/badge_repository_impl.dart`](diffhunk://#diff-a5d31f0bcee322da666ab358d4acdb8b9cf466eb87a5b6fc56ef232051514db8L67-R67): Modified the `isRepeatable` field to be interpreted as a boolean value instead of an integer.
2 parents 91802cf + cb4c46d commit de82e72

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

lib/data/repositories/badge_repository_impl.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ class BadgeRepositoryImpl implements BadgeRepository {
6464
category: AchievementBadgeCategory.values[data['category']],
6565
threshold: data['threshold'],
6666
iconPath: data['iconPath'],
67-
isRepeatable: data['isRepeatable'] ?? 0,
67+
isRepeatable: data['isRepeatable'] == 0 ? false : true,
6868
epValue: data['epValue'] ?? 0,
6969
);
7070
}).toList();

0 commit comments

Comments
 (0)