π End-to-end encrypted cloud for everything.
Dart 2faandroidauthye2eeencryptionend-to-end-encryptionfluttergolanggoogle-photosgoogle-photos-alternativeiosopensourcephotosprivacyprivacy-toolstypescriptzero-knowledge
Prune shared mobile UI comments
Manav Rathi94567275da49
diff --git a/mobile/packages/ente_components/lib/components/android_text_input_autofocus.dart b/mobile/packages/ente_components/lib/components/android_text_input_autofocus.dartindex 3663134fcb..57131acc7f 100644--- a/mobile/packages/ente_components/lib/components/android_text_input_autofocus.dart+++ b/mobile/packages/ente_components/lib/components/android_text_input_autofocus.dart@@ -4,18 +4,10 @@ import 'dart:io';import 'package:flutter/services.dart';import 'package:flutter/widgets.dart';-/// Requests focus and explicitly shows Android's soft keyboard for text input.-///-/// Flutter can mark a text field as focused during a route/app-launch-/// transition without Android showing the IME. This is visible on launch-time-/// app lock screens: the password field is focused, but the keyboard stays-/// hidden. This wrapper waits until the field is attached, focuses the provided-/// [focusNode], then asks the platform text input channel to show the keyboard.-/// See https://github.com/flutter/flutter/issues/122994 for the upstream-/// Flutter issue tracking this behavior.-///-/// Use this only for text inputs that intentionally need keyboard focus as soon-/// as they appear. The same [focusNode] must be passed to the wrapped text field.+// Flutter can focus a field during a route transition without showing+// Android's keyboard, so explicitly show it after the field attaches.+// The child must use the same focusNode.+// https://github.com/flutter/flutter/issues/122994class AndroidTextInputAutofocus extends StatefulWidget {const AndroidTextInputAutofocus({super.key,diff --git a/mobile/packages/ente_components/lib/components/app_bar_component.dart b/mobile/packages/ente_components/lib/components/app_bar_component.dartindex 2ddca81a10..7c494b761d 100644--- a/mobile/packages/ente_components/lib/components/app_bar_component.dart+++ b/mobile/packages/ente_components/lib/components/app_bar_component.dart@@ -24,13 +24,7 @@ class HeaderAppBarTitleState {final double height;}-/// Figma: https://www.figma.com/design/BuBNPPytxlVnqfmCUW0mgz/Ente-Visual-Design?node-id=11439-5036&m=dev-/// Section: Appbar/header / Header v2-/// Specs: Scroll view with a pinned header app bar that animates between-/// expanded and collapsed states.-///-/// Use this for normal screens. It owns the scroll view, adds the pinned header,-/// and provides enough scroll extent for short content to collapse cleanly.+// Figma: https://www.figma.com/design/BuBNPPytxlVnqfmCUW0mgz/Ente-Visual-Design?node-id=11439-5036&m=devclass AppBarComponent extends StatefulWidget {const AppBarComponent({super.key,@@ -61,11 +55,9 @@ class AppBarComponent extends StatefulWidget {final String title;- /// Context shown above [title] when expanded and inline when collapsed.final String? eyebrow;final HeaderAppBarTitleBuilder? titleBuilder;- /// Vertical space reserved for [titleBuilder] in both header states.final double? titleBuilderHeight;final VoidCallback? onTitleTap;final VoidCallback? onTitleDoubleTap;@@ -287,10 +279,8 @@ class _AppBarCollapseSpacer extends StatelessWidget {}}-/// Low-level sliver for custom scroll compositions.-///-/// Prefer [AppBarComponent] for normal screens so short content gets the-/// correct collapse extent and settle behavior automatically.+// Use AppBarComponent unless composing a custom scroll view; it handles the+// collapse extent for short content.class SliverAppBarComponent extends StatelessWidget {const SliverAppBarComponent({super.key,@@ -331,9 +321,6 @@ class SliverAppBarComponent extends StatelessWidget {final List<Widget> actions;final PreferredSizeWidget? bottom;- /// Optional content shown above [bottom] in the expanded header. It fades- /// and gives up its height as the header collapses, while [bottom] remains- /// pinned.final PreferredSizeWidget? collapsibleBottom;final double? expandedHeight;final double collapsedHeight;@@ -838,7 +825,7 @@ const _headerSnapTolerance = 1.0;const _headerSnapDuration = Duration(milliseconds: 160);const _titleTooltipShowDuration = Duration(seconds: 3);-/// Figma: https://www.figma.com/design/BuBNPPytxlVnqfmCUW0mgz/Ente-Visual-Design?node-id=21089-125212&m=dev+// Figma: https://www.figma.com/design/BuBNPPytxlVnqfmCUW0mgz/Ente-Visual-Design?node-id=21089-125212&m=devconst _collapsedEyebrowGap = 6.0;const _minimumCollapsedTitleWidth = 24.0;diff --git a/mobile/packages/ente_components/lib/components/avatar_component.dart b/mobile/packages/ente_components/lib/components/avatar_component.dartindex afd1b46f7f..3b43a3b7a4 100644--- a/mobile/packages/ente_components/lib/components/avatar_component.dart+++ b/mobile/packages/ente_components/lib/components/avatar_component.dart@@ -137,7 +137,7 @@ String avatarInitials(String name) {: '$initial${words.last.toUpperCase().characters.first}';}-/// A stable FNV-1a seed for identity colors across processes and platforms.+// Keep identity colors stable across processes and platforms.int avatarSeedForIdentity(String identityKey) {var hash = 0x811c9dc5;for (final byte in utf8.encode(identityKey.trim().toLowerCase())) {@@ -169,9 +169,7 @@ Color avatarComponentColorValue(};}-/// Figma: https://www.figma.com/design/BuBNPPytxlVnqfmCUW0mgz/Ente-Visual-Design?node-id=2482-6547&m=dev-/// Section: Labels and avatars / Avatar-/// Specs: 16px, 20px, 24px, 28px, 32px, and 56px circular avatars with image, color, and add-icon variants.+// Figma: https://www.figma.com/design/BuBNPPytxlVnqfmCUW0mgz/Ente-Visual-Design?node-id=2482-6547&m=devclass AvatarComponent extends StatelessWidget {const AvatarComponent({super.key,diff --git a/mobile/packages/ente_components/lib/components/banner_component.dart b/mobile/packages/ente_components/lib/components/banner_component.dartindex d69e7f36a7..07a6dca7cb 100644--- a/mobile/packages/ente_components/lib/components/banner_component.dart+++ b/mobile/packages/ente_components/lib/components/banner_component.dart@@ -8,11 +8,8 @@ import 'package:hugeicons/hugeicons.dart';enum BannerComponentState { failure, informative, success, warning, neutral }-/// Layout Figma: https://www.figma.com/design/BuBNPPytxlVnqfmCUW0mgz/Ente-Visual-Design?node-id=14590-125265&m=dev-/// State Figma: https://www.figma.com/design/BuBNPPytxlVnqfmCUW0mgz/Ente-Visual-Design?node-id=7255-38447&m=dev-/// Section: Home gallery banners / Snack bar states-/// Specs: 351px wide, 66px min height, 20px radius, 24px leading icon,-/// body/mini text, and an optional trailing action.+// Layout Figma: https://www.figma.com/design/BuBNPPytxlVnqfmCUW0mgz/Ente-Visual-Design?node-id=14590-125265&m=dev+// State Figma: https://www.figma.com/design/BuBNPPytxlVnqfmCUW0mgz/Ente-Visual-Design?node-id=7255-38447&m=devclass BannerComponent extends StatelessWidget {const BannerComponent({required this.title,diff --git a/mobile/packages/ente_components/lib/components/bottom_sheet/bottom_sheet_component.dart b/mobile/packages/ente_components/lib/components/bottom_sheet/bottom_sheet_component.dartindex 0142a32d94..acfdb41e1c 100644--- a/mobile/packages/ente_components/lib/components/bottom_sheet/bottom_sheet_component.dart+++ b/mobile/packages/ente_components/lib/components/bottom_sheet/bottom_sheet_component.dart@@ -9,10 +9,7 @@ import 'package:ente_components/theme/theme.dart';import 'package:flutter/material.dart';import 'package:hugeicons/hugeicons.dart';-/// Figma: https://www.figma.com/design/BuBNPPytxlVnqfmCUW0mgz/Ente-Visual-Design?node-id=4809-7992&m=dev-/// Section: Bottom sheet / Bottom Sheet Header-/// Specs: H2 title, optional 36px circular close action, and optional centered-/// illustration for warning and error sheets.+// Figma: https://www.figma.com/design/BuBNPPytxlVnqfmCUW0mgz/Ente-Visual-Design?node-id=4809-7992&m=devclass _BottomSheetHeaderComponent extends StatelessWidget {const _BottomSheetHeaderComponent({this.title,@@ -28,9 +25,6 @@ class _BottomSheetHeaderComponent extends StatelessWidget {final String? title;final Widget? illustration;- /// Called when the close button is pressed, before the sheet is dismissed.- ///- /// Barrier taps, drag dismissals, and system back dismissals do not call this.final FutureOr<void> Function()? onClose;final Object? closeResult;final bool showCloseButton;@@ -94,10 +88,7 @@ class _BottomSheetHeaderComponent extends StatelessWidget {}}-/// Figma: https://www.figma.com/design/BuBNPPytxlVnqfmCUW0mgz/Ente-Visual-Design?node-id=4809-8027&m=dev-/// Section: Bottom sheet / Bottom sheet template-/// Specs: 20px top radius, 20px padding, 16px content gap, stacked 12px-/// action gap.+// Figma: https://www.figma.com/design/BuBNPPytxlVnqfmCUW0mgz/Ente-Visual-Design?node-id=4809-8027&m=devclass BottomSheetComponent extends StatelessWidget {const BottomSheetComponent({super.key,@@ -132,9 +123,7 @@ class BottomSheetComponent extends StatelessWidget {final Widget? content;final List<Widget> actions;- /// Called when the close button is pressed, before the sheet is dismissed.- ///- /// Barrier taps, drag dismissals, and system back dismissals do not call this.+ // Called only by the close button, not other dismissal paths.final FutureOr<void> Function()? onClose;final Object? closeResult;final bool showCloseButton;@@ -146,20 +135,16 @@ class BottomSheetComponent extends StatelessWidget {final double? actionsTopSpacing;final Color? backgroundColor;- /// Optional outline for sheet designs that specify a bordered surface.- /// Source: https://www.figma.com/design/BuBNPPytxlVnqfmCUW0mgz/Ente-Visual-Design?node-id=4809-8027&m=dev+ // Source: https://www.figma.com/design/BuBNPPytxlVnqfmCUW0mgz/Ente-Visual-Design?node-id=4809-8027&m=devfinal BorderSide? borderSide;final bool isKeyboardAware;final bool isScrollable;- /// Initial sheet height fraction when [isScrollable] is true.final double initialChildSize;- /// Whether the sheet snaps to [snapSizes] when [isScrollable] is true.final bool snap;- /// Sheet height fractions to snap to when [isScrollable] and [snap] are true.final List<double>? snapSizes;@override@@ -283,8 +268,6 @@ class BottomSheetComponent extends StatelessWidget {}}-/// Shows [BottomSheetComponent] as a centered dialog on desktop and a modal-/// bottom sheet on mobile.Future<T?> showBottomSheetComponent<T>({required BuildContext context,required WidgetBuilder builder,@@ -450,7 +433,6 @@ class _BottomSheetCloseButton extends StatelessWidget {required this.tooltip,});- /// Called when the close button is pressed, before the sheet is dismissed.final FutureOr<void> Function()? onClose;final Object? closeResult;final String tooltip;diff --git a/mobile/packages/ente_components/lib/components/bottom_sheet/error_bottom_sheet_component.dart b/mobile/packages/ente_components/lib/components/bottom_sheet/error_bottom_sheet_component.dartindex 85bda56fe6..cc81699987 100644--- a/mobile/packages/ente_components/lib/components/bottom_sheet/error_bottom_sheet_component.dart+++ b/mobile/packages/ente_components/lib/components/bottom_sheet/error_bottom_sheet_component.dart@@ -4,8 +4,6 @@ import 'package:ente_components/components/bottom_sheet/bottom_sheet_component.dimport 'package:ente_components/components/buttons/button_component.dart';import 'package:flutter/material.dart';-/// Shows the standard error sheet while leaving app-specific localization,-/// parsing, and logging to the caller.Future<T?> showErrorBottomSheetComponent<T>({required BuildContext context,required String message,@@ -13,10 +11,7 @@ Future<T?> showErrorBottomSheetComponent<T>({Widget? illustration,String? actionLabel,FutureOr<void> Function()? onActionTap,-- /// Called when the close button is pressed, before the sheet is dismissed.- ///- /// Barrier taps, drag dismissals, and system back dismissals do not call this.+ // Called only by the close button, not other dismissal paths.FutureOr<void> Function()? onClose,bool showCloseButton = true,bool isDismissible = true,diff --git a/mobile/packages/ente_components/lib/components/buttons/button_component.dart b/mobile/packages/ente_components/lib/components/buttons/button_component.dartindex 4f25e34f15..bdf69a9336 100644--- a/mobile/packages/ente_components/lib/components/buttons/button_component.dart+++ b/mobile/packages/ente_components/lib/components/buttons/button_component.dart@@ -25,10 +25,7 @@ enum ButtonComponentSize { small, large }enum ButtonComponentDensity { regular, compact }-/// Figma: https://www.figma.com/design/BuBNPPytxlVnqfmCUW0mgz/Ente-Visual-Design?node-id=2207-41578&m=dev-/// Section: Buttons / Button Small-/// Specs: 52px height, 20px radius, 24px horizontal padding.-/// States: default, hover, pressed, disabled, loading, success.+// Figma: https://www.figma.com/design/BuBNPPytxlVnqfmCUW0mgz/Ente-Visual-Design?node-id=2207-41578&m=devclass ButtonComponent extends StatefulWidget {const ButtonComponent({super.key,@@ -58,10 +55,6 @@ class ButtonComponent extends StatefulWidget {final ValueListenable<String>? progressStatus;final Widget? leading;- /// Dismisses the current modal route after [onTap] completes without throwing.- ///- /// This only applies to popup routes such as dialogs and bottom sheets. Normal- /// page routes are not dismissed.final bool dismissModalOnSuccess;@overridediff --git a/mobile/packages/ente_components/lib/components/buttons/icon_button_component.dart b/mobile/packages/ente_components/lib/components/buttons/icon_button_component.dartindex a50ddfba0b..7180f82602 100644--- a/mobile/packages/ente_components/lib/components/buttons/icon_button_component.dart+++ b/mobile/packages/ente_components/lib/components/buttons/icon_button_component.dart@@ -18,10 +18,7 @@ enum IconButtonComponentVariant {circular,}-/// Figma: https://www.figma.com/design/BuBNPPytxlVnqfmCUW0mgz/Ente-Visual-Design?node-id=2207-42075&m=dev-/// Section: Buttons / Icon Button-/// Specs: 36px square, compact icon affordance with default, hover, pressed,-/// disabled, loading, and success states.+// Figma: https://www.figma.com/design/BuBNPPytxlVnqfmCUW0mgz/Ente-Visual-Design?node-id=2207-42075&m=devclass IconButtonComponent extends StatefulWidget {const IconButtonComponent({super.key,diff --git a/mobile/packages/ente_components/lib/components/centered_constrained_component.dart b/mobile/packages/ente_components/lib/components/centered_constrained_component.dartindex 8bc7e055bf..c911eff991 100644--- a/mobile/packages/ente_components/lib/components/centered_constrained_component.dart+++ b/mobile/packages/ente_components/lib/components/centered_constrained_component.dart@@ -1,10 +1,5 @@import 'package:flutter/widgets.dart';-/// A component that is horizontally centered and constrained to a maximum-/// width.-///-/// This component is useful for creating responsive layouts that look good on-/// both mobile and wider screens (tablets, desktop).class CenteredConstrainedComponent extends StatelessWidget {const CenteredConstrainedComponent({required this.child,diff --git a/mobile/packages/ente_components/lib/components/divider_component.dart b/mobile/packages/ente_components/lib/components/divider_component.dartindex 0b847b04e7..2b812f1793 100644--- a/mobile/packages/ente_components/lib/components/divider_component.dart+++ b/mobile/packages/ente_components/lib/components/divider_component.dart@@ -1,9 +1,7 @@import 'package:ente_components/theme/theme.dart';import 'package:flutter/material.dart';-/// Figma: https://www.figma.com/design/BuBNPPytxlVnqfmCUW0mgz/Ente-Visual-Design?node-id=5772-34405&m=dev-/// Section: Divider-/// Specs: 1px horizontal line using stroke/faint.+// Figma: https://www.figma.com/design/BuBNPPytxlVnqfmCUW0mgz/Ente-Visual-Design?node-id=5772-34405&m=devclass DividerComponent extends StatelessWidget {const DividerComponent({super.key,diff --git a/mobile/packages/ente_components/lib/components/filter_chip_component.dart b/mobile/packages/ente_components/lib/components/filter_chip_component.dartindex 19200555a1..bdd5612c40 100644--- a/mobile/packages/ente_components/lib/components/filter_chip_component.dart+++ b/mobile/packages/ente_components/lib/components/filter_chip_component.dart@@ -11,9 +11,7 @@ import 'package:hugeicons/hugeicons.dart';enum FilterChipComponentState { selected, unselected, disabled }-/// Figma: https://www.figma.com/design/BuBNPPytxlVnqfmCUW0mgz/Ente-Visual-Design?node-id=9524-4352&m=dev-/// Section: Filter Chip-/// Specs: 40px minimum height, pill radius, selected/unselected/disabled states with icon and avatar slots.+// Figma: https://www.figma.com/design/BuBNPPytxlVnqfmCUW0mgz/Ente-Visual-Design?node-id=9524-4352&m=devclass FilterChipComponent extends StatelessWidget {const FilterChipComponent({super.key,diff --git a/mobile/packages/ente_components/lib/components/menu_component.dart b/mobile/packages/ente_components/lib/components/menu_component.dartindex 1598dcd52e..04eb7feda5 100644--- a/mobile/packages/ente_components/lib/components/menu_component.dart+++ b/mobile/packages/ente_components/lib/components/menu_component.dart@@ -20,9 +20,7 @@ const Duration _successDisplayDuration = Duration(seconds: 1);const int _maxTitleLines = 2;const int _maxCombinedTextLines = 3;-/// Figma: https://www.figma.com/design/BuBNPPytxlVnqfmCUW0mgz/Ente-Visual-Design?node-id=4055-18734&m=dev-/// Section: List items / Menu Item-/// Specs: 336px by typography-derived menu item, optional leading icon, subtitle, trailing item, hover and selected states.+// Figma: https://www.figma.com/design/BuBNPPytxlVnqfmCUW0mgz/Ente-Visual-Design?node-id=4055-18734&m=devclass MenuComponent extends StatefulWidget {const MenuComponent({super.key,diff --git a/mobile/packages/ente_components/lib/components/menu_group_component.dart b/mobile/packages/ente_components/lib/components/menu_group_component.dartindex 47d36e8cb7..eed409ae56 100644--- a/mobile/packages/ente_components/lib/components/menu_group_component.dart+++ b/mobile/packages/ente_components/lib/components/menu_group_component.dart@@ -4,10 +4,6 @@ import 'package:ente_components/theme/radii.dart';import 'package:ente_components/theme/theme.dart';import 'package:flutter/material.dart';-/// Groups related menu rows into one rounded surface.-///-/// The group owns the shared surface and applies first/middle/last row shapes,-/// while each item remains responsible for its own content and interaction.class MenuGroupComponent extends StatelessWidget {const MenuGroupComponent({super.key,diff --git a/mobile/packages/ente_components/lib/components/pin_input_component.dart b/mobile/packages/ente_components/lib/components/pin_input_component.dartindex 3fcd5ea8c7..ed8b5c72a6 100644--- a/mobile/packages/ente_components/lib/components/pin_input_component.dart+++ b/mobile/packages/ente_components/lib/components/pin_input_component.dart@@ -6,15 +6,8 @@ import 'package:ente_components/theme/theme.dart';import 'package:flutter/material.dart';import 'package:flutter/services.dart';-/// A fixed-length numeric input rendered as individual code boxes.-///-/// The caller owns [controller]; the component manages its focus internally.-/// Set [useNativeKeyboard] to false when a caller-managed keypad updates the-/// controller directly.-///-/// Figma:-/// https://www.figma.com/design/BuBNPPytxlVnqfmCUW0mgz/Ente-Visual-Design?node-id=2275-11846&m=dev-/// https://www.figma.com/design/BuBNPPytxlVnqfmCUW0mgz/Ente-Visual-Design?node-id=7634-53618&m=dev+// Figma: https://www.figma.com/design/BuBNPPytxlVnqfmCUW0mgz/Ente-Visual-Design?node-id=2275-11846&m=dev+// Figma: https://www.figma.com/design/BuBNPPytxlVnqfmCUW0mgz/Ente-Visual-Design?node-id=7634-53618&m=devclass PinInputComponent extends StatefulWidget {const PinInputComponent({super.key,diff --git a/mobile/packages/ente_components/lib/components/popup_menu_component.dart b/mobile/packages/ente_components/lib/components/popup_menu_component.dartindex 97d3a07b17..1ae423d831 100644--- a/mobile/packages/ente_components/lib/components/popup_menu_component.dart+++ b/mobile/packages/ente_components/lib/components/popup_menu_component.dart@@ -9,10 +9,7 @@ import 'package:ente_components/theme/theme.dart';import 'package:flutter/material.dart';import 'package:hugeicons/hugeicons.dart';-/// Figma: https://www.figma.com/design/BuBNPPytxlVnqfmCUW0mgz/Ente-Visual-Design?node-id=2513-52763&m=dev-/// Section: Dropdown menu-/// Specs: 196px menu, 52px rows, 20px radius, optional leading/trailing icons,-/// optional secondary label, faint dividers, and Inter mini typography.+// Figma: https://www.figma.com/design/BuBNPPytxlVnqfmCUW0mgz/Ente-Visual-Design?node-id=2513-52763&m=devclass EntePopupMenuOption<T> {const EntePopupMenuOption({required this.value,diff --git a/mobile/packages/ente_components/lib/components/selection_controls/checkbox_component.dart b/mobile/packages/ente_components/lib/components/selection_controls/checkbox_component.dartindex a5c54a470b..53e7f83ad0 100644--- a/mobile/packages/ente_components/lib/components/selection_controls/checkbox_component.dart+++ b/mobile/packages/ente_components/lib/components/selection_controls/checkbox_component.dart@@ -3,9 +3,7 @@ import 'package:ente_components/theme/motion.dart';import 'package:ente_components/theme/theme.dart';import 'package:flutter/material.dart';-/// Figma: https://www.figma.com/design/BuBNPPytxlVnqfmCUW0mgz/Ente-Visual-Design?node-id=2513-47857&m=dev-/// Section: Radio buttons, toggles and checkboxes / CheckboxComponent-/// Specs: 16px checkbox, selected and disabled variants.+// Figma: https://www.figma.com/design/BuBNPPytxlVnqfmCUW0mgz/Ente-Visual-Design?node-id=2513-47857&m=devclass CheckboxComponent extends StatelessWidget {const CheckboxComponent({super.key,@@ -17,8 +15,6 @@ class CheckboxComponent extends StatelessWidget {final bool selected;final ValueChanged<bool>? onChanged;- /// Fill and border color when [selected] and enabled.- /// Defaults to the theme's primary color.final Color? selectedColor;@overridediff --git a/mobile/packages/ente_components/lib/components/selection_controls/labeled_control_component.dart b/mobile/packages/ente_components/lib/components/selection_controls/labeled_control_component.dartindex efefa624f9..53b45a7767 100644--- a/mobile/packages/ente_components/lib/components/selection_controls/labeled_control_component.dart+++ b/mobile/packages/ente_components/lib/components/selection_controls/labeled_control_component.dart@@ -17,10 +17,8 @@ class LabeledControlComponent extends StatelessWidget {final String label;final String? subtitle;- /// Overrides the label and subtitle color.final Color? foreground;- /// Called when the label area is tapped.final VoidCallback? onTap;@overridediff --git a/mobile/packages/ente_components/lib/components/selection_controls/radio_component.dart b/mobile/packages/ente_components/lib/components/selection_controls/radio_component.dartindex 4efc7a55c2..3716123bd7 100644--- a/mobile/packages/ente_components/lib/components/selection_controls/radio_component.dart+++ b/mobile/packages/ente_components/lib/components/selection_controls/radio_component.dart@@ -2,9 +2,7 @@ import 'package:ente_components/theme/motion.dart';import 'package:ente_components/theme/theme.dart';import 'package:flutter/material.dart';-/// Figma: https://www.figma.com/design/BuBNPPytxlVnqfmCUW0mgz/Ente-Visual-Design?node-id=2513-47857&m=dev-/// Section: Radio buttons, toggles and checkboxes / Radio Button-/// Specs: 16px radio, selected and disabled variants.+// Figma: https://www.figma.com/design/BuBNPPytxlVnqfmCUW0mgz/Ente-Visual-Design?node-id=2513-47857&m=devclass RadioComponent extends StatelessWidget {const RadioComponent({super.key,diff --git a/mobile/packages/ente_components/lib/components/selection_controls/toggle_switch_component.dart b/mobile/packages/ente_components/lib/components/selection_controls/toggle_switch_component.dartindex 6e76c98034..cbb2d88f31 100644--- a/mobile/packages/ente_components/lib/components/selection_controls/toggle_switch_component.dart+++ b/mobile/packages/ente_components/lib/components/selection_controls/toggle_switch_component.dart@@ -6,9 +6,7 @@ import 'package:ente_components/theme/theme.dart';import 'package:flutter/cupertino.dart';import 'package:flutter/material.dart';-/// Figma: https://www.figma.com/design/BuBNPPytxlVnqfmCUW0mgz/Ente-Visual-Design?node-id=2482-6644&m=dev-/// Section: Radio buttons, toggles and checkboxes / Toggle Switch-/// Specs: 31px by 18px switch with selected and unselected states.+// Figma: https://www.figma.com/design/BuBNPPytxlVnqfmCUW0mgz/Ente-Visual-Design?node-id=2482-6644&m=devclass ToggleSwitchComponent extends StatefulWidget {const ToggleSwitchComponent({super.key,diff --git a/mobile/packages/ente_components/lib/components/selection_summary_chip_component.dart b/mobile/packages/ente_components/lib/components/selection_summary_chip_component.dartindex 70cd04772a..b032fdca3a 100644--- a/mobile/packages/ente_components/lib/components/selection_summary_chip_component.dart+++ b/mobile/packages/ente_components/lib/components/selection_summary_chip_component.dart@@ -4,13 +4,8 @@ import 'package:ente_components/theme/text_styles.dart';import 'package:ente_components/theme/theme.dart';import 'package:flutter/material.dart';-/// Compact selection action used to select or clear a group of items.-///-/// This is separate from a filter chip: it represents an action and-/// keeps the same neutral surface when enabled or disabled.-/// Sources:-/// https://www.figma.com/design/BuBNPPytxlVnqfmCUW0mgz/Ente-Visual-Design?node-id=18629-313326&m=dev-/// https://www.figma.com/design/BuBNPPytxlVnqfmCUW0mgz/Ente-Visual-Design?node-id=15782-102259&m=dev+// Figma: https://www.figma.com/design/BuBNPPytxlVnqfmCUW0mgz/Ente-Visual-Design?node-id=18629-313326&m=dev+// Figma: https://www.figma.com/design/BuBNPPytxlVnqfmCUW0mgz/Ente-Visual-Design?node-id=15782-102259&m=devclass SelectionSummaryChipComponent extends StatelessWidget {const SelectionSummaryChipComponent({required this.label,diff --git a/mobile/packages/ente_components/lib/components/slider_component.dart b/mobile/packages/ente_components/lib/components/slider_component.dartindex 9003cd06fd..1a688a231d 100644--- a/mobile/packages/ente_components/lib/components/slider_component.dart+++ b/mobile/packages/ente_components/lib/components/slider_component.dart@@ -2,9 +2,7 @@ import 'package:ente_components/theme/theme.dart';import 'package:flutter/material.dart';import 'package:flutter/material.dart' as material show Slider;-/// Figma: https://www.figma.com/design/BuBNPPytxlVnqfmCUW0mgz/Ente-Visual-Design?node-id=57-6281&m=dev-/// Section: Slider-/// Specs: Mobile slider primitive using primary and stroke tokens.+// Figma: https://www.figma.com/design/BuBNPPytxlVnqfmCUW0mgz/Ente-Visual-Design?node-id=57-6281&m=devclass SliderComponent extends StatelessWidget {const SliderComponent({super.key,diff --git a/mobile/packages/ente_components/lib/components/stepper_component.dart b/mobile/packages/ente_components/lib/components/stepper_component.dartindex e8fc201d64..95a3a4d97e 100644--- a/mobile/packages/ente_components/lib/components/stepper_component.dart+++ b/mobile/packages/ente_components/lib/components/stepper_component.dart@@ -6,9 +6,7 @@ import 'package:ente_components/theme/theme.dart';import 'package:flutter/material.dart';import 'package:flutter/material.dart' as material show IconButton;-/// Figma: https://www.figma.com/design/BuBNPPytxlVnqfmCUW0mgz/Ente-Visual-Design?node-id=57-6281&m=dev-/// Section: Stepper-/// Specs: Compact numeric stepper with decrement and increment icon controls.+// Figma: https://www.figma.com/design/BuBNPPytxlVnqfmCUW0mgz/Ente-Visual-Design?node-id=57-6281&m=devclass StepperComponent extends StatelessWidget {const StepperComponent({super.key,diff --git a/mobile/packages/ente_components/lib/components/tag_chip_component.dart b/mobile/packages/ente_components/lib/components/tag_chip_component.dartindex 2012b6b7fb..0481e60c8f 100644--- a/mobile/packages/ente_components/lib/components/tag_chip_component.dart+++ b/mobile/packages/ente_components/lib/components/tag_chip_component.dart@@ -7,9 +7,7 @@ import 'package:flutter/material.dart';enum TagChipComponentState { selected, unselected, disabled }-/// Figma: https://www.figma.com/design/BuBNPPytxlVnqfmCUW0mgz/Ente-Visual-Design?node-id=2482-6479&m=dev-/// Section: Tag Chip-/// Specs: 44px height, 16px radius, body text, selected/unselected/disabled states with one optional icon slot.+// Figma: https://www.figma.com/design/BuBNPPytxlVnqfmCUW0mgz/Ente-Visual-Design?node-id=2482-6479&m=devclass TagChipComponent extends StatelessWidget {const TagChipComponent({super.key,diff --git a/mobile/packages/ente_components/lib/components/text_input_component.dart b/mobile/packages/ente_components/lib/components/text_input_component.dartindex 49ad9bdf92..72f2586f3e 100644--- a/mobile/packages/ente_components/lib/components/text_input_component.dart+++ b/mobile/packages/ente_components/lib/components/text_input_component.dart@@ -11,14 +11,8 @@ import 'package:flutter/services.dart';enum TextInputComponentMessageType { helper, error, alert, success }-/// Figma: https://www.figma.com/design/BuBNPPytxlVnqfmCUW0mgz/Ente-Visual-Design?node-id=2275-11526&m=dev-/// Section: Textfield / Text Input-/// Specs: 388px design width, 52px field height, 81px with label, 100px with helper.-/// States: default, disabled, focused, error, success.-///-/// Multiline variant:-/// https://www.figma.com/design/BuBNPPytxlVnqfmCUW0mgz/Ente-Visual-Design?node-id=2275-11746&m=dev-+// Figma: https://www.figma.com/design/BuBNPPytxlVnqfmCUW0mgz/Ente-Visual-Design?node-id=2275-11526&m=dev+// Multiline variant: https://www.figma.com/design/BuBNPPytxlVnqfmCUW0mgz/Ente-Visual-Design?node-id=2275-11746&m=devclass TextInputComponent extends StatefulWidget {const TextInputComponent({super.key,@@ -70,15 +64,10 @@ class TextInputComponent extends StatefulWidget {final bool autofocus;final int? maxLength;- /// Executes [onSubmit] when the notifier changes. Duplicate submissions are- /// ignored while a submit is in flight.final ValueNotifier<dynamic>? submitNotifier;- /// Clears and unfocuses the field when the notifier changes, unless [onCancel]- /// is provided.final ValueNotifier<dynamic>? cancelNotifier;- /// Called by [submitNotifier] or the platform editing-complete action.final FutureOr<void> Function(String value)? onSubmit;final ValueChanged<String>? onChanged;final VoidCallback? onCancel;@@ -91,32 +80,21 @@ class TextInputComponent extends StatefulWidget {final List<TextInputFormatter>? inputFormatters;final TextInputType? keyboardType;- /// Platform IME action. When set to [TextInputAction.next], completing the- /// field moves focus to the next node instead of doing nothing.final TextInputAction? textInputAction;final bool enableFillColor;final bool autocorrect;final bool enableSuggestions;final bool isRequired;- /// Caller-owned leading widget. Pass explicit color and size when needed.final Widget? prefix;- /// Caller-owned trailing widget. Sits in an icon slot that is at least- /// [IconSizes.medium] square and grows to fit wider content (e.g. a row of- /// affordances). Multiline fields pin this slot to the top.final Widget? suffix;- /// Optional tap handler for [suffix]. When provided, the trailing affordance- /// gets a 48px tap target without changing the field's visual layout.final VoidCallback? onSuffixTap;final TextInputComponentMessageType messageType;final IconData? messageIcon;final bool isDisabled;- /// When true the field is non-editable but keeps the enabled visual style- /// (unlike [isDisabled], which also mutes the text and disables the suffix- /// tap). Text stays selectable and the soft keyboard is suppressed.final bool readOnly;final Iterable<String>? autofillHints;final int? maxLines;diff --git a/mobile/packages/ente_components/lib/components/toast_component.dart b/mobile/packages/ente_components/lib/components/toast_component.dartindex 63c84f40bc..a2ec3a6f15 100644--- a/mobile/packages/ente_components/lib/components/toast_component.dart+++ b/mobile/packages/ente_components/lib/components/toast_component.dart@@ -4,18 +4,7 @@ import 'package:ente_components/theme/spacing.dart';import 'package:flutter/material.dart';import 'package:fluttertoast/fluttertoast.dart';-/// Figma: https://www.figma.com/design/BuBNPPytxlVnqfmCUW0mgz/Ente-Visual-Design?node-id=7255-38447&m=dev-/// Section: Snack bar states-/// Specs: bottom-anchored toast built on [BannerComponent] (failure /-/// informative / success / warning / neutral), slide-up + fade, auto-dismiss,-/// tap to dismiss.-///-/// Backed by [FToast], so a new toast replaces any currently-visible one-/// (latest wins, no overlap) and it survives route changes. Only [message] is-/// required; [state] sets the accent + default leading icon (defaults to-/// neutral), [subtitle] adds a second line, [leadingWidget] / [trailingWidget]-/// override the default leading icon / close affordance (trailing shows nothing-/// when omitted), and [duration] sets how long it stays.+// Figma: https://www.figma.com/design/BuBNPPytxlVnqfmCUW0mgz/Ente-Visual-Design?node-id=7255-38447&m=devvoid showToastComponent(BuildContext context,String message, {diff --git a/mobile/packages/ente_components/lib/components/tooltip_component.dart b/mobile/packages/ente_components/lib/components/tooltip_component.dartindex a2848d41ab..864af7e2aa 100644--- a/mobile/packages/ente_components/lib/components/tooltip_component.dart+++ b/mobile/packages/ente_components/lib/components/tooltip_component.dart@@ -7,9 +7,7 @@ import 'package:ente_components/theme/text_styles.dart';import 'package:ente_components/theme/theme.dart';import 'package:flutter/material.dart';-/// Figma: https://www.figma.com/design/BuBNPPytxlVnqfmCUW0mgz/Ente-Visual-Design?node-id=11025-18810&m=dev-/// Section: Tooltip-/// Specs: fill/light rounded tooltip bubble with a top pointer.+// Figma: https://www.figma.com/design/BuBNPPytxlVnqfmCUW0mgz/Ente-Visual-Design?node-id=11025-18810&m=devclass TooltipBubbleComponent extends StatelessWidget {const TooltipBubbleComponent({super.key,diff --git a/mobile/packages/ente_components/lib/theme/colors.dart b/mobile/packages/ente_components/lib/theme/colors.dartindex 1cacf6271b..83636db57e 100644--- a/mobile/packages/ente_components/lib/theme/colors.dart+++ b/mobile/packages/ente_components/lib/theme/colors.dart@@ -1,8 +1,6 @@import 'package:flutter/material.dart';-/// Figma: https://www.figma.com/design/BuBNPPytxlVnqfmCUW0mgz/Ente-Visual-Design?node-id=57-6281&view=variables-/// Section: Colours / Semantic tokens-/// Specs: Color Tokens collection with light and dark modes.+// Figma: https://www.figma.com/design/BuBNPPytxlVnqfmCUW0mgz/Ente-Visual-Design?node-id=57-6281&view=variablesenum ComponentApp { photos, auth, locker }class ColorTokens {diff --git a/mobile/packages/ente_components/lib/theme/icon_sizes.dart b/mobile/packages/ente_components/lib/theme/icon_sizes.dartindex f627bc3c41..f24c0081ec 100644--- a/mobile/packages/ente_components/lib/theme/icon_sizes.dart+++ b/mobile/packages/ente_components/lib/theme/icon_sizes.dart@@ -1,6 +1,4 @@-/// Figma: https://www.figma.com/design/BuBNPPytxlVnqfmCUW0mgz/Ente-Visual-Design?node-id=4770-20147&m=dev-/// Section: Icons / Icon-/// Specs: Icon glyph sizes used across component states.+// Figma: https://www.figma.com/design/BuBNPPytxlVnqfmCUW0mgz/Ente-Visual-Design?node-id=4770-20147&m=devclass IconSizes {const IconSizes._();diff --git a/mobile/packages/ente_components/lib/theme/motion.dart b/mobile/packages/ente_components/lib/theme/motion.dartindex 925e32a027..0c451a8432 100644--- a/mobile/packages/ente_components/lib/theme/motion.dart+++ b/mobile/packages/ente_components/lib/theme/motion.dart@@ -1,6 +1,4 @@-/// Figma: https://www.figma.com/design/BuBNPPytxlVnqfmCUW0mgz/Ente-Visual-Design?node-id=57-6281&m=dev-/// Section: Design system / Motion-/// Specs: Short, predictable state transitions for mobile controls.+// Figma: https://www.figma.com/design/BuBNPPytxlVnqfmCUW0mgz/Ente-Visual-Design?node-id=57-6281&m=devclass Motion {const Motion._();diff --git a/mobile/packages/ente_components/lib/theme/radii.dart b/mobile/packages/ente_components/lib/theme/radii.dartindex a1b65b430e..30674ed40c 100644--- a/mobile/packages/ente_components/lib/theme/radii.dart+++ b/mobile/packages/ente_components/lib/theme/radii.dart@@ -1,8 +1,6 @@import 'package:flutter/material.dart';-/// Figma: https://www.figma.com/design/BuBNPPytxlVnqfmCUW0mgz/Ente-Visual-Design?node-id=2207-41577&m=dev-/// Section: Buttons / Button Small-/// Specs: Button radius 20px; supporting surfaces use compact mobile radii.+// Figma: https://www.figma.com/design/BuBNPPytxlVnqfmCUW0mgz/Ente-Visual-Design?node-id=2207-41577&m=devclass Radii {const Radii._();diff --git a/mobile/packages/ente_components/lib/theme/shadows.dart b/mobile/packages/ente_components/lib/theme/shadows.dartindex 93a2d051c1..165a26b143 100644--- a/mobile/packages/ente_components/lib/theme/shadows.dart+++ b/mobile/packages/ente_components/lib/theme/shadows.dart@@ -1,8 +1,6 @@import 'package:flutter/material.dart';-/// Figma: https://www.figma.com/design/BuBNPPytxlVnqfmCUW0mgz/Ente-Visual-Design?node-id=57-6281&m=dev-/// Section: Design system / Shadows-/// Specs: Subtle elevation shadows for sheets, overlays, and floating controls.+// Figma: https://www.figma.com/design/BuBNPPytxlVnqfmCUW0mgz/Ente-Visual-Design?node-id=57-6281&m=devclass Shadows {const Shadows._();diff --git a/mobile/packages/ente_components/lib/theme/spacing.dart b/mobile/packages/ente_components/lib/theme/spacing.dartindex 281b406906..0faab12242 100644--- a/mobile/packages/ente_components/lib/theme/spacing.dart+++ b/mobile/packages/ente_components/lib/theme/spacing.dart@@ -1,6 +1,4 @@-/// Figma: https://www.figma.com/design/BuBNPPytxlVnqfmCUW0mgz/Ente-Visual-Design?node-id=57-6281&m=dev-/// Section: Design system / Spacing-/// Specs: Compact mobile spacing scale used by components and catalog previews.+// Figma: https://www.figma.com/design/BuBNPPytxlVnqfmCUW0mgz/Ente-Visual-Design?node-id=57-6281&m=devclass Spacing {const Spacing._();diff --git a/mobile/packages/ente_components/lib/theme/text_styles.dart b/mobile/packages/ente_components/lib/theme/text_styles.dartindex c1dcde9169..10a4496867 100644--- a/mobile/packages/ente_components/lib/theme/text_styles.dart+++ b/mobile/packages/ente_components/lib/theme/text_styles.dart@@ -1,10 +1,6 @@import 'package:flutter/material.dart';-/// Figma: https://www.figma.com/design/BuBNPPytxlVnqfmCUW0mgz/Ente-Visual-Design?node-id=7672-54672&m=dev-/// Section: Text styles-/// Specs: Inter body scale, Outfit display title scale, letter spacing 0.-/// Display-1 32/40, Display-2 24/32, Display-3 20/28; H1 20/28, H2 18/24,-/// body 14/20, mini 12/16, tiny 10/12.+// Figma: https://www.figma.com/design/BuBNPPytxlVnqfmCUW0mgz/Ente-Visual-Design?node-id=7672-54672&m=devclass TextStyles {const TextStyles._();diff --git a/mobile/packages/ente_components/lib/theme/theme.dart b/mobile/packages/ente_components/lib/theme/theme.dartindex 10d16347ea..f152e3de96 100644--- a/mobile/packages/ente_components/lib/theme/theme.dart+++ b/mobile/packages/ente_components/lib/theme/theme.dart@@ -2,9 +2,7 @@ import 'package:ente_components/theme/colors.dart';import 'package:ente_components/theme/text_styles.dart';import 'package:flutter/material.dart';-/// Figma: https://www.figma.com/design/BuBNPPytxlVnqfmCUW0mgz/Ente-Visual-Design?node-id=57-6281&m=dev-/// Section: Design system / Theme helpers-/// Specs: Light and dark theme mapping for Ente component tokens.+// Figma: https://www.figma.com/design/BuBNPPytxlVnqfmCUW0mgz/Ente-Visual-Design?node-id=57-6281&m=devclass ComponentTheme {const ComponentTheme._();diff --git a/mobile/packages/ui/lib/components/action_sheet_widget.dart b/mobile/packages/ui/lib/components/action_sheet_widget.dartindex 8468c75fd6..096750052c 100644--- a/mobile/packages/ui/lib/components/action_sheet_widget.dart+++ b/mobile/packages/ui/lib/components/action_sheet_widget.dart@@ -12,7 +12,6 @@ import 'package:modal_bottom_sheet/modal_bottom_sheet.dart';enum ActionSheetType { defaultActionSheet, iconOnly }-///Returns null if dismissedFuture<ButtonResult?> showActionSheet({required BuildContext context,required List<ButtonWidget> buttons,diff --git a/mobile/packages/ui/lib/components/buttons/button_widget.dart b/mobile/packages/ui/lib/components/buttons/button_widget.dartindex 55f251906f..18e1240361 100644--- a/mobile/packages/ui/lib/components/buttons/button_widget.dart+++ b/mobile/packages/ui/lib/components/buttons/button_widget.dart@@ -24,36 +24,18 @@ class ButtonWidget extends StatelessWidget {final bool isDisabled;final ButtonSize buttonSize;- ///Setting this flag to true will show a success confirmation as a 'check'- ///icon once the onTap(). This is expected to be used only if time taken to- ///execute onTap() takes less than debouce time.final bool shouldShowSuccessConfirmation;- ///Setting this flag to false will restrict the loading and success states of- ///the button from surfacing on the UI. The ExecutionState of the button will- ///change irrespective of the value of this flag. Only that it won't be- ///surfaced on the UIfinal bool shouldSurfaceExecutionStates;- /// iconColor should only be specified when we do not want to honor the default- /// iconColor based on buttonType. Most of the items, default iconColor is what- /// we need unless we want to pop out the icon in a non-primary button typefinal Color? iconColor;- ///Button action will only work if isInAlert is truefinal ButtonAction? buttonAction;- ///setting this flag to true will make the button appear like how it would- ///on dark theme irrespective of the app's theme.final bool shouldStickToDarkTheme;- ///isInAlert is to dismiss the alert if the action on the button is completed.- ///This should be set to true if the alert which uses this button needs to- ///return the Button's action.final bool isInAlert;- /// progressStatus can be used to display information about the action- /// progress when ExecutionState is in Progress.final ValueNotifier<String>? progressStatus;const ButtonWidget({@@ -201,8 +183,6 @@ class _ButtonChildWidgetState extends State<ButtonChildWidget> {late Color loadingIconColor;ValueNotifier<String>? progressStatus;- ///This is used to store the width of the button in idle state (small button)- ///to be used as width for the button when the loading/succes states comes.double? widthOfButton;final _debouncer = Debouncer(const Duration(milliseconds: 300));ExecutionState executionState = ExecutionState.idle;diff --git a/mobile/packages/ui/lib/components/buttons/models/button_result.dart b/mobile/packages/ui/lib/components/buttons/models/button_result.dartindex 7560768dc1..9a5f340a67 100644--- a/mobile/packages/ui/lib/components/buttons/models/button_result.dart+++ b/mobile/packages/ui/lib/components/buttons/models/button_result.dart@@ -1,10 +1,6 @@import 'package:ente_ui/components/buttons/button_widget.dart';class ButtonResult {- ///action can be null when action for the button that is returned when popping- ///the widget (dialog, actionSheet) which uses a ButtonWidget isn't- ///relevant/useful and so is not assigned a value when an instance of- ///ButtonWidget is created.final ButtonAction? action;final Exception? exception;ButtonResult([this.action, this.exception]);diff --git a/mobile/packages/ui/lib/components/dialog_widget.dart b/mobile/packages/ui/lib/components/dialog_widget.dartindex b01bf1aa70..716a9ba77e 100644--- a/mobile/packages/ui/lib/components/dialog_widget.dart+++ b/mobile/packages/ui/lib/components/dialog_widget.dart@@ -13,7 +13,6 @@ import "package:ente_ui/theme/effects.dart";import 'package:ente_ui/theme/ente_theme.dart';import 'package:flutter/material.dart';-///Will return null if dismissed by tapping outsideFuture<ButtonResult?> showDialogWidget({required BuildContext context,required String title,diff --git a/mobile/packages/ui/lib/components/menu_item_widget_v2.dart b/mobile/packages/ui/lib/components/menu_item_widget_v2.dartindex 74caf8d644..513cef6bdc 100644--- a/mobile/packages/ui/lib/components/menu_item_widget_v2.dart+++ b/mobile/packages/ui/lib/components/menu_item_widget_v2.dart@@ -10,8 +10,6 @@ class MenuItemWidgetV2 extends StatefulWidget {final Widget captionedTextWidget;final bool isExpandable;- /// leading icon can be passed without specifing size of icon,- /// this component sets size to 24x24 irrespective of passed icon's sizefinal IconData? leadingIcon;final Color? leadingIconColor;@@ -20,14 +18,11 @@ class MenuItemWidgetV2 extends StatefulWidget {// leadIconSize deafult value is 24.final double leadingIconSize;- /// trailing icon can be passed without size as default size set by- /// flutter is what this component expectsfinal IconData? trailingIcon;final Color? trailingIconColor;final Widget? trailingWidget;final bool trailingIconIsMuted;- /// If provided, add this much extra spacing to the right of the trailing icon.final double trailingExtraMargin;final FutureVoidCallback? onTap;final VoidCallback? onDoubleTap;@@ -50,19 +45,12 @@ class MenuItemWidgetV2 extends StatefulWidget {final bool isLastItem;- /// disable gesture detector if not usedfinal bool isGestureDetectorDisabled;- ///Success state will not be shown if this flag is set to true, only idle and- ///loading statefinal bool showOnlyLoadingState;final bool surfaceExecutionStates;- ///To show success state even when execution time < debouce time, set this- ///flag to true. If the loading state needs to be shown and success state not,- ///set the showOnlyLoadingState flag to true, setting this flag to false won't- ///help.final bool alwaysShowSuccessState;const MenuItemWidgetV2({diff --git a/mobile/packages/ui/lib/components/text_input_widget.dart b/mobile/packages/ui/lib/components/text_input_widget.dartindex 94dd7e1f07..c85532bdb6 100644--- a/mobile/packages/ui/lib/components/text_input_widget.dart+++ b/mobile/packages/ui/lib/components/text_input_widget.dart@@ -18,8 +18,6 @@ class TextInputWidget extends StatefulWidget {final bool? autoFocus;final int? maxLength;- ///TextInputWidget will listen to this notifier and executes onSubmit when- ///notified.final ValueNotifier? submitNotifier;final bool alwaysShowSuccessState;final bool showOnlyLoadingState;@@ -69,8 +67,6 @@ class _TextInputWidgetState extends State<TextInputWidget> {final _debouncer = Debouncer(const Duration(milliseconds: 300));late final ValueNotifier<bool> _obscureTextNotifier;- ///This is to pass if the TextInputWidget is in a dialog and an error is- ///thrown in executing onSubmit by passing it as arg in Navigator.pop()Exception? _exception;bool _incorrectPassword = false;@overridediff --git a/mobile/packages/ui/lib/theme/colors.dart b/mobile/packages/ui/lib/theme/colors.dartindex ab8f13f0a4..5a01b75e7a 100644--- a/mobile/packages/ui/lib/theme/colors.dart+++ b/mobile/packages/ui/lib/theme/colors.dart@@ -1,29 +1,6 @@import "package:ente_ui/theme/theme_config.dart";import 'package:flutter/material.dart';-/// This color scheme provides all the colors needed for a modern Flutter app,-/// including background, text, fill, stroke, and accent colors for both light-/// and dark themes.-///-/// Apps can easily customize the primary colors using the factory constructors:-///-/// ```dart-/// // Create a light theme with custom primary colors-/// final customLightScheme = EnteColorScheme.light(-/// primary700: Color(0xFF1976D2),-/// primary500: Color(0xFF2196F3),-/// primary400: Color(0xFF42A5F5),-/// primary300: Color(0xFF64B5F6),-/// );-///-/// // Create a dark theme with custom primary colors-/// final customDarkScheme = EnteColorScheme.dark(-/// primary700: Color(0xFF1976D2),-/// primary500: Color(0xFF2196F3),-/// primary400: Color(0xFF42A5F5),-/// primary300: Color(0xFF64B5F6),-/// );-/// ```class EnteColorScheme extends ThemeExtension<EnteColorScheme> {factory EnteColorScheme.fromApp(EnteApp app, {@@ -247,7 +224,6 @@ class EnteColorScheme extends ThemeExtension<EnteColorScheme> {this.golden500 = _golden500,});- /// Factory constructor for light theme with customizable primary colorsfactory EnteColorScheme.light({Color? primary700,Color? primary500,@@ -301,7 +277,6 @@ class EnteColorScheme extends ThemeExtension<EnteColorScheme> {);}- /// Factory constructor for dark theme with customizable primary colorsfactory EnteColorScheme.dark({Color? primary700,Color? primary500,@@ -551,7 +526,6 @@ class EnteColorScheme extends ThemeExtension<EnteColorScheme> {);}- /// Helper method to lerp between two color listsList<Color> _lerpColorList(List<Color> a, List<Color> b, double t) {if (a.length != b.length) {return t < 0.5 ? a : b;@@ -813,28 +787,7 @@ const Color _defaultCodeCardBackgroundColor = Color.fromRGBO(246, 246, 246, 1);const Color _golden700 = Color(0xFFFDB816);const Color _golden500 = Color(0xFFFFC336);-/// Utility class to help apps create custom color schemes with their brand colors.-///-/// This class provides convenient methods to generate complete color schemes-/// from a base primary color, automatically calculating the different shades-/// and variations needed for the app.class ColorSchemeBuilder {- /// Creates light and dark color schemes from a single primary color.- ///- /// The primary color is used as the base (primary500), and other shades- /// are automatically calculated:- /// - primary700: Darker shade for emphasis- /// - primary400: Lighter shade for secondary elements- /// - primary300: Lightest shade for subtle accents- ///- /// Example:- /// ```dart- /// final schemes = ColorSchemeBuilder.fromPrimaryColor(- /// Color(0xFF2196F3), // Material Blue- /// );- /// final lightScheme = schemes.light;- /// final darkScheme = schemes.dark;- /// ```static ({EnteColorScheme light, EnteColorScheme dark}) fromPrimaryColor(Color primaryColor,) {@@ -878,19 +831,6 @@ class ColorSchemeBuilder {return (light: lightScheme, dark: darkScheme);}- /// Creates light and dark color schemes with fully custom primary colors.- ///- /// Use this method when you need complete control over all primary color shades.- ///- /// Example:- /// ```dart- /// final schemes = ColorSchemeBuilder.fromCustomColors(- /// primary700: Color(0xFF1565C0),- /// primary500: Color(0xFF2196F3),- /// primary400: Color(0xFF42A5F5),- /// primary300: Color(0xFF90CAF9),- /// );- /// ```static ({EnteColorScheme light, EnteColorScheme dark}) fromCustomColors({required Color primary700,required Color primary500,diff --git a/mobile/packages/ui/lib/theme/ente_theme.dart b/mobile/packages/ui/lib/theme/ente_theme.dartindex 270a5c3b71..5d54a41989 100644--- a/mobile/packages/ui/lib/theme/ente_theme.dart+++ b/mobile/packages/ui/lib/theme/ente_theme.dart@@ -64,19 +64,16 @@ EnteTextTheme getEnteTextTheme(BuildContext context, {bool inverse = false}) {: Theme.of(context).colorScheme.enteTheme.textTheme;}-/// Get theme-aware shadow for floating elements (dialogs, modals, etc.)List<BoxShadow> getEnteShadowFloat(BuildContext context) {final isDark = Theme.of(context).brightness == Brightness.dark;return isDark ? shadowFloatDark : shadowFloatLight;}-/// Get theme-aware shadow for menu elementsList<BoxShadow> getEnteShadowMenu(BuildContext context) {final isDark = Theme.of(context).brightness == Brightness.dark;return isDark ? shadowMenuDark : shadowMenuLight;}-/// Get theme-aware shadow for button elementsList<BoxShadow> getEnteShadowButton(BuildContext context) {final isDark = Theme.of(context).brightness == Brightness.dark;return isDark ? shadowButtonDark : shadowButtonLight;diff --git a/mobile/packages/ui/lib/theme/multi_app_demo.dart b/mobile/packages/ui/lib/theme/multi_app_demo.dartindex fd39cd0886..d9e3846563 100644--- a/mobile/packages/ui/lib/theme/multi_app_demo.dart+++ b/mobile/packages/ui/lib/theme/multi_app_demo.dart@@ -6,7 +6,6 @@ import 'package:ente_ui/theme/ente_theme.dart';import 'package:ente_ui/theme/ente_theme_data.dart';import 'package:flutter/material.dart';-/// App 1: E-commerce app with blue themeclass ECommerceApp {static const Color brandBlue = Color(0xFF1976D2);@@ -23,7 +22,6 @@ class ECommerceApp {);}-/// App 2: Social media app with purple themeclass SocialMediaApp {static const Color brandPurple = Color(0xFF9C27B0);@@ -40,7 +38,6 @@ class SocialMediaApp {);}-/// App 3: Finance app with green themeclass FinanceApp {static final schemes = ColorSchemeBuilder.fromCustomColors(primary700: const Color(0xFF388E3C),@@ -65,7 +62,6 @@ class FinanceApp {);}-/// App 4: Gaming app with orange themeclass GamingApp {static final customLightScheme = EnteColorScheme.light(primary700: const Color(0xFFE65100),@@ -106,7 +102,6 @@ class GamingApp {);}-/// Demo widget that shows how UI components adapt to different app themesclass MultiAppThemeDemo extends StatefulWidget {const MultiAppThemeDemo({super.key});diff --git a/mobile/packages/ui/lib/theme/platform_text_config.dart b/mobile/packages/ui/lib/theme/platform_text_config.dartindex 6be86e779a..b04e26ef88 100644--- a/mobile/packages/ui/lib/theme/platform_text_config.dart+++ b/mobile/packages/ui/lib/theme/platform_text_config.dart@@ -2,17 +2,12 @@ import 'dart:io';import 'package:flutter/foundation.dart';import 'package:flutter/material.dart';-/// Platform-specific text scaling configuration to ensure consistent-/// font sizes and appearance across Android and iOS platforms.class PlatformTextConfig {- /// Android tends to render fonts slightly larger than iOS, so we apply- /// a small reduction factor to maintain visual consistency.+ // Android renders fonts slightly larger than iOS at the same nominal size.static const double androidFontScaleFactor = 0.95;- /// iOS uses the default scaling (1.0)static const double iosFontScaleFactor = 1.0;- /// Get the appropriate font scale factor for the current platformstatic double getPlatformFontScaleFactor() {if (kIsWeb) return 1.0;@@ -26,12 +21,10 @@ class PlatformTextConfig {}}- /// Adjust font size based on platform to ensure consistencystatic double adjustFontSize(double baseFontSize) {return baseFontSize * getPlatformFontScaleFactor();}- /// Create a TextStyle with platform-adjusted font sizestatic TextStyle createTextStyle({required double fontSize,FontWeight? fontWeight,@@ -50,7 +43,6 @@ class PlatformTextConfig {);}- /// Get platform-specific MediaQuery configuration for text scalingstatic MediaQueryData adjustMediaQueryTextScaling(MediaQueryData data) {// Clamp text scaling between 0.8 and 1.3 to prevent extreme scaling// that can break UI layouts@@ -64,9 +56,7 @@ class PlatformTextConfig {}}-/// Extension on BuildContext to easily access platform-adjusted text scalingextension PlatformTextScaling on BuildContext {- /// Get MediaQuery with platform-adjusted text scalingMediaQueryData get platformAdjustedMediaQuery {return PlatformTextConfig.adjustMediaQueryTextScaling(MediaQuery.of(this));}diff --git a/mobile/packages/ui/lib/utils/dialog_util.dart b/mobile/packages/ui/lib/utils/dialog_util.dartindex cadd65be0f..a920207638 100644--- a/mobile/packages/ui/lib/utils/dialog_util.dart+++ b/mobile/packages/ui/lib/utils/dialog_util.dart@@ -20,7 +20,6 @@ import 'package:flutter/material.dart';typedef DialogBuilder = DialogWidget Function(BuildContext context);-///Will return null if dismissed by tapping outsideFuture<ButtonResult?> showErrorDialog(BuildContext context,String title,@@ -106,7 +105,6 @@ String parseErrorForUI(}}-///Will return null if dismissed by tapping outsideFuture<ButtonResult?> showGenericErrorDialog({required BuildContext context,bool isDismissible = true,@@ -224,7 +222,6 @@ DialogWidget choiceDialog({return DialogWidget(title: title, body: body, buttons: buttons, icon: icon);}-///Will return null if dismissed by tapping outsideFuture<ButtonResult?> showChoiceDialog(BuildContext context, {required String title,@@ -268,7 +265,6 @@ Future<ButtonResult?> showChoiceDialog();}-///Will return null if dismissed by tapping outsideFuture<ButtonResult?> showChoiceActionSheet(BuildContext context, {required String title,