diff --git a/lib/ui/components/list_tiles/section_title.dart b/lib/ui/components/list_tiles/section_title.dart index f37fb09d..dcf503c2 100644 --- a/lib/ui/components/list_tiles/section_title.dart +++ b/lib/ui/components/list_tiles/section_title.dart @@ -3,10 +3,12 @@ import 'package:flutter/material.dart'; class SectionTitle extends StatelessWidget { const SectionTitle({ required this.title, + this.error = false, super.key, }); final String title; + final bool error; @override Widget build(final BuildContext context) => Padding( @@ -14,7 +16,9 @@ class SectionTitle extends StatelessWidget { child: Text( title, style: Theme.of(context).textTheme.labelLarge!.copyWith( - color: Theme.of(context).colorScheme.secondary, + color: error + ? Theme.of(context).colorScheme.error + : Theme.of(context).colorScheme.secondary, ), ), ); diff --git a/lib/ui/pages/more/app_settings/app_settings.dart b/lib/ui/pages/more/app_settings/app_settings.dart index be3df075..df798470 100644 --- a/lib/ui/pages/more/app_settings/app_settings.dart +++ b/lib/ui/pages/more/app_settings/app_settings.dart @@ -1,11 +1,11 @@ import 'package:auto_route/auto_route.dart'; import 'package:easy_localization/easy_localization.dart'; import 'package:flutter/material.dart'; -import 'package:gap/gap.dart'; import 'package:selfprivacy/config/app_controller/inherited_app_controller.dart'; import 'package:selfprivacy/config/localization.dart'; import 'package:selfprivacy/logic/cubit/server_installation/server_installation_cubit.dart'; import 'package:selfprivacy/ui/components/buttons/dialog_action_button.dart'; +import 'package:selfprivacy/ui/components/list_tiles/section_title.dart'; import 'package:selfprivacy/ui/layouts/brand_hero_screen.dart'; import 'package:selfprivacy/ui/router/router.dart'; @@ -38,17 +38,10 @@ class _AppSettingsPageState extends State { _LanguagePicker( key: ValueKey('language_picker'.tr()), ), - const Gap(8), - Padding( - padding: const EdgeInsets.symmetric(horizontal: 16), - child: Text( - 'application_settings.dangerous_settings'.tr(), - style: Theme.of(context).textTheme.labelLarge!.copyWith( - color: Theme.of(context).colorScheme.error, - ), - ), + SectionTitle( + title: 'application_settings.dangerous_settings'.tr(), + error: true, ), - const Gap(4), _ResetAppTile( key: ValueKey('reset_app'.tr()), ),