π End-to-end encrypted cloud for everything.
Dart 2faandroidauthye2eeencryptionend-to-end-encryptionfluttergolanggoogle-photosgoogle-photos-alternativeiosopensourcephotosprivacyprivacy-toolstypescriptzero-knowledge
Fix analyzer warnings for video editor UI
Prateek Sunal4ee0bf4749ca
diff --git a/mobile/apps/photos/lib/ui/tools/editor/video_crop_page.dart b/mobile/apps/photos/lib/ui/tools/editor/video_crop_page.dartindex 07e8f901cc..0df0c8a66b 100644--- a/mobile/apps/photos/lib/ui/tools/editor/video_crop_page.dart+++ b/mobile/apps/photos/lib/ui/tools/editor/video_crop_page.dart@@ -1,12 +1,11 @@import 'package:flutter/material.dart';-import "package:photos/ente_theme_data.dart";import "package:photos/generated/l10n.dart";+import "package:photos/theme/ente_theme.dart";import "package:photos/ui/tools/editor/video_editor/crop_value.dart";import "package:photos/ui/tools/editor/video_editor/video_editor_app_bar.dart";import "package:photos/ui/tools/editor/video_editor/video_editor_bottom_action.dart";import "package:photos/ui/tools/editor/video_editor/video_editor_main_actions.dart";import "package:photos/ui/tools/editor/video_editor/video_editor_player_control.dart";-import "package:photos/theme/ente_theme.dart";import 'package:video_editor/video_editor.dart';class VideoCropPage extends StatefulWidget {diff --git a/mobile/apps/photos/lib/ui/tools/editor/video_editor/video_editor_bottom_action.dart b/mobile/apps/photos/lib/ui/tools/editor/video_editor/video_editor_bottom_action.dartindex 91d49f7918..f52b6a27d9 100644--- a/mobile/apps/photos/lib/ui/tools/editor/video_editor/video_editor_bottom_action.dart+++ b/mobile/apps/photos/lib/ui/tools/editor/video_editor/video_editor_bottom_action.dart@@ -26,9 +26,9 @@ class VideoEditorBottomAction extends StatelessWidget {onTap: onPressed,svgPath: svgPath,icon: icon,- child: child,size: 60,isSelected: isSelected,+ child: child,);}}diff --git a/mobile/apps/photos/lib/ui/tools/editor/video_editor_page.dart b/mobile/apps/photos/lib/ui/tools/editor/video_editor_page.dartindex 1cc3672832..f1c8310e99 100644--- a/mobile/apps/photos/lib/ui/tools/editor/video_editor_page.dart+++ b/mobile/apps/photos/lib/ui/tools/editor/video_editor_page.dart@@ -62,35 +62,38 @@ class _VideoEditorPageState extends State<VideoEditorPage> {void initState() {super.initState();- Future.microtask(() {- _controller = VideoEditorController.file(- widget.ioFile,- minDuration: const Duration(seconds: 1),- cropStyle: CropGridStyle(- background: Theme.of(context).colorScheme.surface,- selectedBoundariesColor:- const ColorScheme.dark().videoPlayerPrimaryColor,- ),- trimStyle: TrimSliderStyle(- onTrimmedColor: const ColorScheme.dark().videoPlayerPrimaryColor,- onTrimmingColor: const ColorScheme.dark().videoPlayerPrimaryColor,- background: Theme.of(context).colorScheme.editorBackgroundColor,- positionLineColor: Theme.of(- context,- ).colorScheme.videoPlayerBorderColor,- lineColor: Theme.of(- context,- ).colorScheme.videoPlayerBorderColor.withValues(alpha: 0.6),- ),- );+ Future.microtask(+ () {+ _controller = VideoEditorController.file(+ widget.ioFile,+ minDuration: const Duration(seconds: 1),+ cropStyle: CropGridStyle(+ background: Theme.of(context).colorScheme.surface,+ selectedBoundariesColor:+ const ColorScheme.dark().videoPlayerPrimaryColor,+ ),+ trimStyle: TrimSliderStyle(+ onTrimmedColor: const ColorScheme.dark().videoPlayerPrimaryColor,+ onTrimmingColor: const ColorScheme.dark().videoPlayerPrimaryColor,+ background: Theme.of(context).colorScheme.editorBackgroundColor,+ positionLineColor:+ Theme.of(context).colorScheme.videoPlayerBorderColor,+ lineColor: Theme.of(context)+ .colorScheme+ .videoPlayerBorderColor+ .withValues(alpha: 0.6),+ ),+ );- _controller!.initialize().then((_) => setState(() {})).catchError((- error,- ) {- // handle minumum duration bigger than video duration error- Navigator.pop(context);- }, test: (e) => e is VideoMinDurationError);- });+ _controller!.initialize().then((_) => setState(() {})).catchError(+ (error) {+ // handle minumum duration bigger than video duration error+ Navigator.pop(context);+ },+ test: (e) => e is VideoMinDurationError,+ );+ },+ );_doRotationCorrectionIfAndroid();}@@ -184,33 +187,39 @@ class _VideoEditorPageState extends State<VideoEditorPage> {label: AppLocalizations.of(context).trim,svgPath:"assets/video-editor/video-editor-trim-action.svg",- onPressed: () => _openSubEditor(VideoTrimPage(- controller: _controller!,- quarterTurnsForRotationCorrection:- _quarterTurnsForRotationCorrection!,- )),+ onPressed: () => _openSubEditor(+ VideoTrimPage(+ controller: _controller!,+ quarterTurnsForRotationCorrection:+ _quarterTurnsForRotationCorrection!,+ ),+ ),),const SizedBox(width: 24),VideoEditorBottomAction(label: AppLocalizations.of(context).crop,svgPath:"assets/video-editor/video-editor-crop-action.svg",- onPressed: () => _openSubEditor(VideoCropPage(- controller: _controller!,- quarterTurnsForRotationCorrection:- _quarterTurnsForRotationCorrection!,- )),+ onPressed: () => _openSubEditor(+ VideoCropPage(+ controller: _controller!,+ quarterTurnsForRotationCorrection:+ _quarterTurnsForRotationCorrection!,+ ),+ ),),const SizedBox(width: 24),VideoEditorBottomAction(label: AppLocalizations.of(context).rotate,svgPath:"assets/video-editor/video-editor-rotate-action.svg",- onPressed: () => _openSubEditor(VideoRotatePage(- controller: _controller!,- quarterTurnsForRotationCorrection:- _quarterTurnsForRotationCorrection!,- )),+ onPressed: () => _openSubEditor(+ VideoRotatePage(+ controller: _controller!,+ quarterTurnsForRotationCorrection:+ _quarterTurnsForRotationCorrection!,+ ),+ ),),],),diff --git a/mobile/apps/photos/lib/ui/tools/editor/video_rotate_page.dart b/mobile/apps/photos/lib/ui/tools/editor/video_rotate_page.dartindex fadd7991b2..ae2c832e5e 100644--- a/mobile/apps/photos/lib/ui/tools/editor/video_rotate_page.dart+++ b/mobile/apps/photos/lib/ui/tools/editor/video_rotate_page.dart@@ -1,11 +1,10 @@import 'package:flutter/material.dart';-import "package:photos/ente_theme_data.dart";import "package:photos/generated/l10n.dart";+import "package:photos/theme/ente_theme.dart";import "package:photos/ui/tools/editor/video_editor/video_editor_app_bar.dart";import "package:photos/ui/tools/editor/video_editor/video_editor_bottom_action.dart";import "package:photos/ui/tools/editor/video_editor/video_editor_main_actions.dart";import "package:photos/ui/tools/editor/video_editor/video_editor_player_control.dart";-import "package:photos/theme/ente_theme.dart";import 'package:video_editor/video_editor.dart';class VideoRotatePage extends StatelessWidget {diff --git a/mobile/apps/photos/lib/ui/tools/editor/video_trim_page.dart b/mobile/apps/photos/lib/ui/tools/editor/video_trim_page.dartindex dec0e664a3..a5174c19e4 100644--- a/mobile/apps/photos/lib/ui/tools/editor/video_trim_page.dart+++ b/mobile/apps/photos/lib/ui/tools/editor/video_trim_page.dart@@ -1,9 +1,8 @@import 'package:flutter/material.dart';-import "package:photos/ente_theme_data.dart";import "package:photos/generated/l10n.dart";+import "package:photos/theme/ente_theme.dart";import "package:photos/ui/tools/editor/video_editor/video_editor_app_bar.dart";import "package:photos/ui/tools/editor/video_editor/video_editor_player_control.dart";-import "package:photos/theme/ente_theme.dart";import 'package:video_editor/video_editor.dart';class VideoTrimPage extends StatefulWidget {