From 229bcf2dad050162b3ffe7af25854ccc2aa56bd8 Mon Sep 17 00:00:00 2001 From: Aditya Anand Date: Fri, 10 Feb 2023 21:37:32 +0530 Subject: [PATCH 1/7] changing font size of settings tab --- packages/smooth_app/pubspec.lock | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/smooth_app/pubspec.lock b/packages/smooth_app/pubspec.lock index 342a8bcdd64c..da6e3fa2c6d9 100644 --- a/packages/smooth_app/pubspec.lock +++ b/packages/smooth_app/pubspec.lock @@ -1549,5 +1549,5 @@ packages: source: hosted version: "3.1.1" sdks: - dart: ">=2.19.0 <4.0.0" + dart: ">=2.19.0 <3.0.0" flutter: ">=3.3.0" From 734480f3c3310f541e3228943d81672e6b829c4b Mon Sep 17 00:00:00 2001 From: Aditya Anand Date: Sat, 11 Feb 2023 22:49:11 +0530 Subject: [PATCH 2/7] fixed : The section header are smaller and not as color flashy as the titles of the individual settings. --- .../user_preferences_settings.dart | 81 ++++++++++++++++--- 1 file changed, 71 insertions(+), 10 deletions(-) diff --git a/packages/smooth_app/lib/pages/preferences/user_preferences_settings.dart b/packages/smooth_app/lib/pages/preferences/user_preferences_settings.dart index 0a44431815ea..9b830657a565 100644 --- a/packages/smooth_app/lib/pages/preferences/user_preferences_settings.dart +++ b/packages/smooth_app/lib/pages/preferences/user_preferences_settings.dart @@ -69,8 +69,21 @@ class _ApplicationSettings extends StatelessWidget { return Column( children: [ - UserPreferencesTitle( - label: appLocalizations.settings_app_app, + Padding( + padding: const EdgeInsetsDirectional.only( + top: SMALL_SPACE, + bottom: MEDIUM_SPACE, + start: LARGE_SPACE, + end: LARGE_SPACE, + ), + child: Container( + alignment: Alignment.topLeft, + width: double.infinity, + child: Text( + appLocalizations.settings_app_app, + style: const TextStyle(fontSize: 24, fontWeight: FontWeight.bold), + ), + ), ), Padding( padding: const EdgeInsets.only( @@ -217,8 +230,20 @@ class _PrivacySettings extends StatelessWidget { return Column( mainAxisSize: MainAxisSize.min, children: [ - UserPreferencesTitle( - label: appLocalizations.settings_app_data, + Padding( + padding: const EdgeInsetsDirectional.only( + top: SMALL_SPACE, + bottom: MEDIUM_SPACE, + start: LARGE_SPACE, + end: LARGE_SPACE, + ), + child: SizedBox( + width: double.infinity, + child: Text( + appLocalizations.settings_app_data, + style: const TextStyle(fontSize: 24, fontWeight: FontWeight.bold), + ), + ), ), const _CrashReportingSetting(), const UserPreferencesListItemDivider(), @@ -287,8 +312,20 @@ class _CameraSettings extends StatelessWidget { return Column( mainAxisSize: MainAxisSize.min, children: [ - UserPreferencesTitle( - label: appLocalizations.settings_app_camera, + Padding( + padding: const EdgeInsetsDirectional.only( + top: SMALL_SPACE, + bottom: MEDIUM_SPACE, + start: LARGE_SPACE, + end: LARGE_SPACE, + ), + child: SizedBox( + width: double.infinity, + child: Text( + appLocalizations.settings_app_camera, + style: const TextStyle(fontSize: 24, fontWeight: FontWeight.bold), + ), + ), ), if (CameraModes.supportBothModes) ...[ const _CameraModesSelectorSetting(), @@ -369,8 +406,20 @@ class _ProductsSettings extends StatelessWidget { return Column( mainAxisSize: MainAxisSize.min, children: [ - UserPreferencesTitle( - label: appLocalizations.settings_app_products, + Padding( + padding: const EdgeInsetsDirectional.only( + top: SMALL_SPACE, + bottom: MEDIUM_SPACE, + start: LARGE_SPACE, + end: LARGE_SPACE, + ), + child: SizedBox( + width: double.infinity, + child: Text( + appLocalizations.settings_app_products, + style: const TextStyle(fontSize: 24, fontWeight: FontWeight.bold), + ), + ), ), _ExpandPanelHelper( title: appLocalizations.expand_nutrition_facts, @@ -402,8 +451,20 @@ class _MiscellaneousSettings extends StatelessWidget { return Column( mainAxisSize: MainAxisSize.min, children: [ - UserPreferencesTitle( - label: appLocalizations.settings_app_miscellaneous, + Padding( + padding: const EdgeInsetsDirectional.only( + top: SMALL_SPACE, + bottom: MEDIUM_SPACE, + start: LARGE_SPACE, + end: LARGE_SPACE, + ), + child: SizedBox( + width: double.infinity, + child: Text( + appLocalizations.settings_app_miscellaneous, + style: const TextStyle(fontSize: 24, fontWeight: FontWeight.bold), + ), + ), ), const _HapticFeedbackSetting(), ], From 135dda2a126fc975fd3af92bb789fbd549e87976 Mon Sep 17 00:00:00 2001 From: Aditya Anand Date: Sun, 12 Feb 2023 22:47:22 +0530 Subject: [PATCH 3/7] Added changes to user_preferences_widgets.dart --- .../app/src/profile/AndroidManifest.xml | 2 +- .../user_preferences_settings.dart | 81 +++---------------- .../preferences/user_preferences_widgets.dart | 4 +- 3 files changed, 12 insertions(+), 75 deletions(-) diff --git a/packages/smooth_app/android/app/src/profile/AndroidManifest.xml b/packages/smooth_app/android/app/src/profile/AndroidManifest.xml index 584089d21c01..8ea3b2a5eb38 100644 --- a/packages/smooth_app/android/app/src/profile/AndroidManifest.xml +++ b/packages/smooth_app/android/app/src/profile/AndroidManifest.xml @@ -5,4 +5,4 @@ to allow setting breakpoints, to provide hot reload, etc. --> - + \ No newline at end of file diff --git a/packages/smooth_app/lib/pages/preferences/user_preferences_settings.dart b/packages/smooth_app/lib/pages/preferences/user_preferences_settings.dart index 9b830657a565..0a44431815ea 100644 --- a/packages/smooth_app/lib/pages/preferences/user_preferences_settings.dart +++ b/packages/smooth_app/lib/pages/preferences/user_preferences_settings.dart @@ -69,21 +69,8 @@ class _ApplicationSettings extends StatelessWidget { return Column( children: [ - Padding( - padding: const EdgeInsetsDirectional.only( - top: SMALL_SPACE, - bottom: MEDIUM_SPACE, - start: LARGE_SPACE, - end: LARGE_SPACE, - ), - child: Container( - alignment: Alignment.topLeft, - width: double.infinity, - child: Text( - appLocalizations.settings_app_app, - style: const TextStyle(fontSize: 24, fontWeight: FontWeight.bold), - ), - ), + UserPreferencesTitle( + label: appLocalizations.settings_app_app, ), Padding( padding: const EdgeInsets.only( @@ -230,20 +217,8 @@ class _PrivacySettings extends StatelessWidget { return Column( mainAxisSize: MainAxisSize.min, children: [ - Padding( - padding: const EdgeInsetsDirectional.only( - top: SMALL_SPACE, - bottom: MEDIUM_SPACE, - start: LARGE_SPACE, - end: LARGE_SPACE, - ), - child: SizedBox( - width: double.infinity, - child: Text( - appLocalizations.settings_app_data, - style: const TextStyle(fontSize: 24, fontWeight: FontWeight.bold), - ), - ), + UserPreferencesTitle( + label: appLocalizations.settings_app_data, ), const _CrashReportingSetting(), const UserPreferencesListItemDivider(), @@ -312,20 +287,8 @@ class _CameraSettings extends StatelessWidget { return Column( mainAxisSize: MainAxisSize.min, children: [ - Padding( - padding: const EdgeInsetsDirectional.only( - top: SMALL_SPACE, - bottom: MEDIUM_SPACE, - start: LARGE_SPACE, - end: LARGE_SPACE, - ), - child: SizedBox( - width: double.infinity, - child: Text( - appLocalizations.settings_app_camera, - style: const TextStyle(fontSize: 24, fontWeight: FontWeight.bold), - ), - ), + UserPreferencesTitle( + label: appLocalizations.settings_app_camera, ), if (CameraModes.supportBothModes) ...[ const _CameraModesSelectorSetting(), @@ -406,20 +369,8 @@ class _ProductsSettings extends StatelessWidget { return Column( mainAxisSize: MainAxisSize.min, children: [ - Padding( - padding: const EdgeInsetsDirectional.only( - top: SMALL_SPACE, - bottom: MEDIUM_SPACE, - start: LARGE_SPACE, - end: LARGE_SPACE, - ), - child: SizedBox( - width: double.infinity, - child: Text( - appLocalizations.settings_app_products, - style: const TextStyle(fontSize: 24, fontWeight: FontWeight.bold), - ), - ), + UserPreferencesTitle( + label: appLocalizations.settings_app_products, ), _ExpandPanelHelper( title: appLocalizations.expand_nutrition_facts, @@ -451,20 +402,8 @@ class _MiscellaneousSettings extends StatelessWidget { return Column( mainAxisSize: MainAxisSize.min, children: [ - Padding( - padding: const EdgeInsetsDirectional.only( - top: SMALL_SPACE, - bottom: MEDIUM_SPACE, - start: LARGE_SPACE, - end: LARGE_SPACE, - ), - child: SizedBox( - width: double.infinity, - child: Text( - appLocalizations.settings_app_miscellaneous, - style: const TextStyle(fontSize: 24, fontWeight: FontWeight.bold), - ), - ), + UserPreferencesTitle( + label: appLocalizations.settings_app_miscellaneous, ), const _HapticFeedbackSetting(), ], diff --git a/packages/smooth_app/lib/pages/preferences/user_preferences_widgets.dart b/packages/smooth_app/lib/pages/preferences/user_preferences_widgets.dart index 5192432a3753..4c8f7fed61e3 100644 --- a/packages/smooth_app/lib/pages/preferences/user_preferences_widgets.dart +++ b/packages/smooth_app/lib/pages/preferences/user_preferences_widgets.dart @@ -235,9 +235,7 @@ class UserPreferencesTitle extends StatelessWidget { ), child: Text( label, - style: Theme.of(context).textTheme.displaySmall?.copyWith( - height: 2.5, - ), + style: const TextStyle(fontSize: 24, fontWeight: FontWeight.bold), ), ), ); From 503b9cbeda5d7938da6af019d7c2ea78edb81cd5 Mon Sep 17 00:00:00 2001 From: Aditya Anand Date: Fri, 17 Feb 2023 02:04:09 +0530 Subject: [PATCH 4/7] made changes inside copyWith and made it dynamic according to brightness --- .../lib/pages/preferences/user_preferences_widgets.dart | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/packages/smooth_app/lib/pages/preferences/user_preferences_widgets.dart b/packages/smooth_app/lib/pages/preferences/user_preferences_widgets.dart index 4c8f7fed61e3..18f3fa3293c5 100644 --- a/packages/smooth_app/lib/pages/preferences/user_preferences_widgets.dart +++ b/packages/smooth_app/lib/pages/preferences/user_preferences_widgets.dart @@ -235,7 +235,12 @@ class UserPreferencesTitle extends StatelessWidget { ), child: Text( label, - style: const TextStyle(fontSize: 24, fontWeight: FontWeight.bold), + style: Theme.of(context).textTheme.displaySmall?.copyWith( + fontSize: 24, + fontWeight: FontWeight.bold, + color: Theme.of(context).brightness == Brightness.light + ? const Color(0xFF000000) + : const Color(0xFFFFFFFF)), ), ), ); From e01ed27bbd33b5fcfcc39a5a47687b257102e548 Mon Sep 17 00:00:00 2001 From: Aditya Anand Date: Sat, 25 Feb 2023 20:33:50 +0530 Subject: [PATCH 5/7] Modified Header line in user_preferences_widgets.dart --- .../pages/preferences/user_preferences_widgets.dart | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/packages/smooth_app/lib/pages/preferences/user_preferences_widgets.dart b/packages/smooth_app/lib/pages/preferences/user_preferences_widgets.dart index 18f3fa3293c5..e3384bec57ae 100644 --- a/packages/smooth_app/lib/pages/preferences/user_preferences_widgets.dart +++ b/packages/smooth_app/lib/pages/preferences/user_preferences_widgets.dart @@ -235,12 +235,11 @@ class UserPreferencesTitle extends StatelessWidget { ), child: Text( label, - style: Theme.of(context).textTheme.displaySmall?.copyWith( - fontSize: 24, - fontWeight: FontWeight.bold, - color: Theme.of(context).brightness == Brightness.light - ? const Color(0xFF000000) - : const Color(0xFFFFFFFF)), + style: Theme.of(context).textTheme.displayLarge!.copyWith( + color: Theme.of(context).brightness == Brightness.light + ? Colors.black + : Colors.white, + ), ), ), ); From a9910d77b719a4238498272a7a209b4728cb1d09 Mon Sep 17 00:00:00 2001 From: Pierre Slamich Date: Thu, 18 May 2023 18:37:14 +0200 Subject: [PATCH 6/7] Apply suggestions from code review --- .../lib/pages/preferences/user_preferences_widgets.dart | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/packages/smooth_app/lib/pages/preferences/user_preferences_widgets.dart b/packages/smooth_app/lib/pages/preferences/user_preferences_widgets.dart index e3384bec57ae..e02615951d1c 100644 --- a/packages/smooth_app/lib/pages/preferences/user_preferences_widgets.dart +++ b/packages/smooth_app/lib/pages/preferences/user_preferences_widgets.dart @@ -235,10 +235,7 @@ class UserPreferencesTitle extends StatelessWidget { ), child: Text( label, - style: Theme.of(context).textTheme.displayLarge!.copyWith( - color: Theme.of(context).brightness == Brightness.light - ? Colors.black - : Colors.white, + style: Theme.of(context).textTheme.displayLarge! ), ), ), From 5643793356aabaa28e9c581567dd274ca8f7f472 Mon Sep 17 00:00:00 2001 From: Aman Raj Date: Fri, 19 May 2023 13:37:09 +0530 Subject: [PATCH 7/7] use same color but larger text --- .../lib/pages/preferences/user_preferences_widgets.dart | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/packages/smooth_app/lib/pages/preferences/user_preferences_widgets.dart b/packages/smooth_app/lib/pages/preferences/user_preferences_widgets.dart index 0fbe24a18912..52dbe65988da 100644 --- a/packages/smooth_app/lib/pages/preferences/user_preferences_widgets.dart +++ b/packages/smooth_app/lib/pages/preferences/user_preferences_widgets.dart @@ -235,8 +235,7 @@ class UserPreferencesTitle extends StatelessWidget { ), child: Text( label, - style: Theme.of(context).textTheme.displayLarge! - ), + style: Theme.of(context).textTheme.displayLarge, ), ), );