瀏覽代碼

Lint fixes

Neeraj Gupta 2 年之前
父節點
當前提交
17a12da2da

+ 2 - 1
lib/models/api/storage_bonus/storage_bonus.dart

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

+ 4 - 1
lib/services/favorites_service.dart

@@ -137,7 +137,10 @@ class FavoritesService {
   }
 
   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()!;
     if (files.any((f) => f.uploadedFileID == null)) {
       throw AssertionError("Can only favorite uploaded items");

+ 4 - 3
lib/ui/growth/apply_code_screen.dart

@@ -135,9 +135,10 @@ class _ApplyCodeScreenState extends State<ApplyCodeScreen> {
                           Logger('$runtimeType')
                               .severe("failed to apply referral", e);
                           showErrorDialogForException(
-                              context: context,
-                              exception: e as Exception,
-                              apiErrorPrefix: "Failed to apply code");
+                            context: context,
+                            exception: e as Exception,
+                            apiErrorPrefix: "Failed to apply code",
+                          );
                         }
                       },
                     )

+ 1 - 1
lib/ui/growth/referral_screen.dart

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