From f38ae9560d26f4c5e4c3a7669939a917dd4a03cd Mon Sep 17 00:00:00 2001 From: Sikander Saleem Date: Tue, 4 Aug 2026 12:40:57 +0300 Subject: [PATCH] improvements --- .../single_item_drop_down_menu.dart | 15 +++--- lib/new_views/pages/login_page.dart | 52 ++++++++++++++----- 2 files changed, 47 insertions(+), 20 deletions(-) diff --git a/lib/new_views/common_widgets/single_item_drop_down_menu.dart b/lib/new_views/common_widgets/single_item_drop_down_menu.dart index 3b2a6bcc..40b0cedc 100644 --- a/lib/new_views/common_widgets/single_item_drop_down_menu.dart +++ b/lib/new_views/common_widgets/single_item_drop_down_menu.dart @@ -4,6 +4,7 @@ import 'package:provider/provider.dart'; import 'package:test_sa/extensions/context_extension.dart'; import 'package:test_sa/extensions/enum_extensions.dart'; import 'package:test_sa/extensions/int_extensions.dart'; +import 'package:test_sa/extensions/text_extensions.dart'; import 'package:test_sa/extensions/widget_extensions.dart'; import 'package:test_sa/new_views/app_style/app_text_style.dart'; import 'package:test_sa/new_views/common_widgets/app_loading_manager.dart'; @@ -262,7 +263,7 @@ class _SingleItemDropDownMenuState)?.map>((value) { return DropdownMenuItem( value: value, - child: Text( - value.name ?? "", // Null-aware operator for value.name - maxLines: 1, - overflow: TextOverflow.ellipsis, - style: Theme.of(context).textTheme.bodyMedium?.copyWith(fontWeight: FontWeight.w500, color: context.isDark ? AppColor.white10 : AppColor.black10), - ), + child: Text(value.name ?? "", // Null-aware operator for value.name + maxLines: 1, + overflow: TextOverflow.ellipsis, + style: AppTextStyles.heading5.copyWith(color: AppColor.textStyleColor(context)) + // Theme.of(context).textTheme.bodyMedium?.copyWith(fontWeight: FontWeight.w500, color: context.isDark ? AppColor.white10 : AppColor.black10), + ), ); }).toList(), ), diff --git a/lib/new_views/pages/login_page.dart b/lib/new_views/pages/login_page.dart index 0a020cbb..b9c78e6e 100644 --- a/lib/new_views/pages/login_page.dart +++ b/lib/new_views/pages/login_page.dart @@ -246,19 +246,45 @@ class _LoginPageState extends State { 16.height, AppFilledButton(label: context.translation.signIn, buttonColor: AppColor.primary10, maxWidth: true, onPressed: _login), 16.height, - Row( - mainAxisAlignment: MainAxisAlignment.center, - children: [ - "Don't have an account? ".bodyText(context).custom(color: AppColor.textStyleColor(context)), - "Sign Up".bodyText(context).custom(color: AppColor.primary10, fontWeight: FontWeight.w600).onPress(() { - Navigator.pushNamed(context, SignUpScreen.routeName); - }), - " OR ".bodyText(context).custom(color: AppColor.textStyleColor(context)), - "Request a Demo".bodyText(context).custom(color: AppColor.primary10, fontWeight: FontWeight.w600).onPress(() { - Navigator.pushNamed(context, ApplicationDemoRequestFormScreen.routeName); - }), - ], - ), + Text.rich( + TextSpan( + children: [ + TextSpan(text: "Don't have an account? ", style: AppTextStyles.bodyText.copyWith(color: AppColor.textStyleColor(context))), + TextSpan( + text: "Sign Up", + style: AppTextStyles.bodyText.copyWith(color: AppColor.primary10), + recognizer: TapGestureRecognizer() + ..onTap = () { + Navigator.pushNamed(context, SignUpScreen.routeName); + }), + TextSpan( + text: " OR ", + style: AppTextStyles.bodyText.copyWith(color: AppColor.textStyleColor(context)), + ), + TextSpan( + text: "Request a Demo", + style: AppTextStyles.bodyText.copyWith(color: AppColor.primary10), + recognizer: TapGestureRecognizer() + ..onTap = () { + Navigator.pushNamed(context, ApplicationDemoRequestFormScreen.routeName); + }), + ], + ), + // textAlign: TextAlign.center, // Direct alignment parameter + ).center, + // Row( + // mainAxisAlignment: MainAxisAlignment.center, + // children: [ + // "Don't have an account? ".bodyText(context).custom(color: AppColor.textStyleColor(context)), + // "Sign Up".bodyText(context).custom(color: AppColor.primary10, fontWeight: FontWeight.w600).onPress(() { + // Navigator.pushNamed(context, SignUpScreen.routeName); + // }), + // " OR ".bodyText(context).custom(color: AppColor.textStyleColor(context)), + // "Request a Demo".bodyText(context).custom(color: AppColor.primary10, fontWeight: FontWeight.w600).onPress(() { + // Navigator.pushNamed(context, ApplicationDemoRequestFormScreen.routeName); + // }), + // ], + // ), // Demo Request Button 24.height,