From cdb42d8cd3caa55b5648c8167fd78ba779056b2b Mon Sep 17 00:00:00 2001 From: devaryakjha Date: Mon, 23 Oct 2023 15:29:47 +0530 Subject: [PATCH] =?UTF-8?q?=E2=9C=A8=20Made=20greeting=20more=20consistent?= =?UTF-8?q?=20throughout?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/features/home/ui/home_screen.dart | 15 ++++++++++++++- lib/utils/generate_greeting.dart | 6 +++--- 2 files changed, 17 insertions(+), 4 deletions(-) diff --git a/lib/features/home/ui/home_screen.dart b/lib/features/home/ui/home_screen.dart index 2a2f815..77f3731 100644 --- a/lib/features/home/ui/home_screen.dart +++ b/lib/features/home/ui/home_screen.dart @@ -5,6 +5,8 @@ import 'package:varanasi_mobile_app/features/home/bloc/home_bloc.dart'; import 'package:varanasi_mobile_app/features/home/data/helpers/home_state_selectors.dart'; import 'package:varanasi_mobile_app/features/home/ui/home_widgets/spacer.dart'; import 'package:varanasi_mobile_app/features/home/ui/home_widgets/trending/trending.dart'; +import 'package:varanasi_mobile_app/gen/assets.gen.dart'; +import 'package:varanasi_mobile_app/utils/extensions/extensions.dart'; import 'package:varanasi_mobile_app/utils/generate_greeting.dart'; import 'package:varanasi_mobile_app/utils/routes.dart'; import 'package:varanasi_mobile_app/widgets/animated_overflow_text.dart'; @@ -29,7 +31,18 @@ class HomePage extends StatelessWidget { return Scaffold( appBar: AppBar( centerTitle: false, - title: AnimatedText(greeting, maxLines: 1), + title: Row( + children: [ + Assets.icon.appIconMonotone.svg(width: 32, height: 32), + const SizedBox(width: 8), + AnimatedText( + greeting, + maxLines: 1, + style: context.textTheme.titleLarge + ?.copyWith(fontWeight: FontWeight.bold), + ), + ], + ), actions: [ IconButton( iconSize: 30, diff --git a/lib/utils/generate_greeting.dart b/lib/utils/generate_greeting.dart index 068002d..8be0157 100644 --- a/lib/utils/generate_greeting.dart +++ b/lib/utils/generate_greeting.dart @@ -7,10 +7,10 @@ String generateGreeting() { 'Hello!' ]; if (hour < 12) { - return '${greetings[0]} Ready for some music?'; + return greetings[0]; } else if (hour < 18) { - return '${greetings[1]} How about some tunes?'; + return greetings[1]; } else { - return '${greetings[2]} Time for some music?'; + return greetings[2]; } }