Lint fixes

This commit is contained in:
Neeraj Gupta 2023-03-16 10:13:32 +05:30
parent 0120cfa0b3
commit 17a12da2da
No known key found for this signature in database
GPG key ID: 3C5A1684DC1729E1
4 changed files with 11 additions and 6 deletions

View file

@ -131,7 +131,8 @@ class BonusDetails {
factory BonusDetails.fromJson(Map<String, dynamic> json) => BonusDetails( factory BonusDetails.fromJson(Map<String, dynamic> json) => BonusDetails(
referralStats: List<ReferralStat>.from( referralStats: List<ReferralStat>.from(
json["referralStats"].map((x) => ReferralStat.fromJson(x))), json["referralStats"].map((x) => ReferralStat.fromJson(x)),
),
bonuses: bonuses:
List<Bonus>.from(json["bonuses"].map((x) => Bonus.fromJson(x))), List<Bonus>.from(json["bonuses"].map((x) => Bonus.fromJson(x))),
refCount: json["refCount"], refCount: json["refCount"],

View file

@ -137,7 +137,10 @@ class FavoritesService {
} }
Future<void> updateFavorites( Future<void> updateFavorites(
BuildContext context, List<File> files, bool favFlag) async { BuildContext context,
List<File> files,
bool favFlag,
) async {
final int currentUserID = Configuration.instance.getUserID()!; final int currentUserID = Configuration.instance.getUserID()!;
if (files.any((f) => f.uploadedFileID == null)) { if (files.any((f) => f.uploadedFileID == null)) {
throw AssertionError("Can only favorite uploaded items"); throw AssertionError("Can only favorite uploaded items");

View file

@ -137,7 +137,8 @@ class _ApplyCodeScreenState extends State<ApplyCodeScreen> {
showErrorDialogForException( showErrorDialogForException(
context: context, context: context,
exception: e as Exception, exception: e as Exception,
apiErrorPrefix: "Failed to apply code"); apiErrorPrefix: "Failed to apply code",
);
} }
}, },
) )

View file

@ -43,7 +43,7 @@ class _ReferralScreenState extends State<ReferralScreen> {
await UserService.instance.getUserDetailsV2(memoryCount: false); await UserService.instance.getUserDetailsV2(memoryCount: false);
final referralView = final referralView =
await StorageBonusService.instance.getGateway().getReferralView(); await StorageBonusService.instance.getGateway().getReferralView();
return Tuple2(referralView, cachedUserDetails!); return Tuple2(referralView, cachedUserDetails);
} }
@override @override