π End-to-end encrypted cloud for everything.
Dart 2faandroidauthye2eeencryptionend-to-end-encryptionfluttergolanggoogle-photosgoogle-photos-alternativeiosopensourcephotosprivacyprivacy-toolstypescriptzero-knowledge
[mob][packages] Remove legacy MenuSectionTitle (#11893)
aman-pilot6e537dc6ef4b
diff --git a/mobile/packages/legacy/lib/pages/emergency_page.dart b/mobile/packages/legacy/lib/pages/emergency_page.dartindex d9d6bf83a4..00bb833a54 100644--- a/mobile/packages/legacy/lib/pages/emergency_page.dart+++ b/mobile/packages/legacy/lib/pages/emergency_page.dart@@ -24,7 +24,6 @@ import "package:ente_ui/components/captioned_text_widget_v2.dart";import "package:ente_ui/components/divider_widget.dart";import "package:ente_ui/components/loading_widget.dart";import "package:ente_ui/components/menu_item_widget_v2.dart";-import "package:ente_ui/components/menu_section_title.dart";import "package:ente_ui/theme/colors.dart";import "package:ente_ui/theme/ente_theme.dart";import "package:ente_ui/utils/toast_util.dart";@@ -224,7 +223,6 @@ class _EmergencyPageState extends State<EmergencyPage> {hasSecondaryLegacyContent)) {return _buildSectionTitle(title: context.strings.trustedContacts,- colorScheme: colorScheme,bottom: 12,);} else if (index > 0 && index <= trustedContacts.length) {@@ -340,7 +338,6 @@ class _EmergencyPageState extends State<EmergencyPage> {const SizedBox(height: 20),_buildSectionTitle(title: context.strings.legacyAccounts,- colorScheme: colorScheme,),],);@@ -430,10 +427,7 @@ class _EmergencyPageState extends State<EmergencyPage> {child: Column(crossAxisAlignment: CrossAxisAlignment.start,children: [- _buildSectionTitle(- title: context.strings.legacyKits,- colorScheme: colorScheme,- ),+ _buildSectionTitle(title: context.strings.legacyKits),if (legacyKits.isEmpty)_LegacyKitEmptyCard(onCreate: _createLegacyKit)else@@ -524,15 +518,19 @@ class _EmergencyPageState extends State<EmergencyPage> {}}- Widget _buildSectionTitle({- required String title,- required EnteColorScheme colorScheme,- double bottom = 8,- }) {- return MenuSectionTitle(- title: title,+ Widget _buildSectionTitle({required String title, double bottom = 8}) {+ return Padding(padding: EdgeInsets.only(bottom: bottom),- textStyle: TextStyles.display3.copyWith(color: colorScheme.textBase),+ child: Row(+ children: [+ Text(+ title,+ style: TextStyles.display3.copyWith(+ color: context.componentColors.textBase,+ ),+ ),+ ],+ ),);}diff --git a/mobile/packages/ui/lib/components/menu_section_title.dart b/mobile/packages/ui/lib/components/menu_section_title.dartdeleted file mode 100644index 1372b9a551..0000000000--- a/mobile/packages/ui/lib/components/menu_section_title.dart+++ /dev/null@@ -1,37 +0,0 @@-import "package:ente_ui/theme/ente_theme.dart";-import 'package:flutter/widgets.dart';--class MenuSectionTitle extends StatelessWidget {- final String title;- final IconData? iconData;- final EdgeInsetsGeometry padding;- final TextStyle? textStyle;-- const MenuSectionTitle({- super.key,- required this.title,- this.iconData,- this.padding = const EdgeInsets.only(left: 8, top: 6, bottom: 6),- this.textStyle,- });-- @override- Widget build(BuildContext context) {- final colorScheme = getEnteColorScheme(context);- final effectiveTextStyle =- textStyle ??- getEnteTextTheme(context).small.copyWith(color: colorScheme.textMuted);- return Padding(- padding: padding,- child: Row(- children: [- iconData != null- ? Icon(iconData, color: colorScheme.strokeMuted, size: 17)- : const SizedBox.shrink(),- iconData != null ? const SizedBox(width: 8) : const SizedBox.shrink(),- Text(title, style: effectiveTextStyle),- ],- ),- );- }-}