Ver Fonte

Fix warnings in Photos

vishnukvmd há 1 ano atrás
pai
commit
a875cad231

+ 2 - 2
mobile/lib/ui/viewer/gallery/gallery_app_bar_widget.dart

@@ -837,13 +837,13 @@ class _GalleryAppBarWidgetState extends State<GalleryAppBarWidget> {
       hintText: context.l10n.deviceCodeHint,
       onSubmit: (String text) async {
         try {
-          String code = text.trim();
+          final code = text.trim();
           final String? publicKey = await gw.getPublicKey(code);
           if (publicKey == null) {
             showToast(context, S.of(context).deviceNotFound);
             return;
           }
-          final String castToken = Uuid().v4().toString();
+          final String castToken = const Uuid().v4().toString();
           final castPayload = CollectionsService.instance
               .getCastData(castToken, widget.collection!, publicKey);
           await gw.publishCastPayload(

+ 1 - 0
mobile/lib/ui/viewer/search_tab/search_tab.dart

@@ -98,6 +98,7 @@ class _AllSearchSectionsState extends State<AllSearchSections> {
                   padding: const EdgeInsets.only(bottom: 180),
                   physics: const BouncingScrollPhysics(),
                   itemCount: searchTypes.length,
+                  // ignore: body_might_complete_normally_nullable
                   itemBuilder: (context, index) {
                     switch (searchTypes[index]) {
                       case SectionType.album: