diff --git a/app/assets/svgs/home_banner.svg b/app/assets/svgs/home_banner.svg index 37ff8f4..ff486a4 100644 --- a/app/assets/svgs/home_banner.svg +++ b/app/assets/svgs/home_banner.svg @@ -1,46 +1 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + \ No newline at end of file diff --git a/app/lib/global/themes/colors.dart b/app/lib/global/themes/colors.dart index 8c2f669..471394d 100644 --- a/app/lib/global/themes/colors.dart +++ b/app/lib/global/themes/colors.dart @@ -8,3 +8,4 @@ const Color darkGray = Color(0xFFC3C3C3); const Color transparent = Color(0x00000000); const Color shadow = Color(0xFFBAB0CE); const Color red = Color(0xFFF44336); +const Color purple = Color(0xFF672CBC); diff --git a/app/lib/global/widgets/ayat_tile/ayat_tile.dart b/app/lib/global/widgets/ayat_tile/ayat_tile.dart index 1712ccd..3589a1f 100644 --- a/app/lib/global/widgets/ayat_tile/ayat_tile.dart +++ b/app/lib/global/widgets/ayat_tile/ayat_tile.dart @@ -35,7 +35,7 @@ class AyatTile extends StatelessWidget { ), builder: (context, viewModel, child) { return HorizontalPadding( - padding: 27.w, + padding: 27, child: Column( crossAxisAlignment: CrossAxisAlignment.center, mainAxisSize: MainAxisSize.min, diff --git a/app/lib/home/home_view.dart b/app/lib/home/home_view.dart index e5ae79e..cf95e1b 100644 --- a/app/lib/home/home_view.dart +++ b/app/lib/home/home_view.dart @@ -1,5 +1,3 @@ -import 'package:flutter/cupertino.dart'; -import 'package:flutter/widgets.dart'; import 'package:flutter_svg/svg.dart'; import 'package:quran_companion/global/services/size_helper_service.dart'; import 'package:quran_companion/global/themes/colors.dart'; @@ -32,27 +30,19 @@ class HomeView extends StatelessWidget { crossAxisAlignment: CrossAxisAlignment.start, children: [ const VerticalGap(13.5), - const Row( - mainAxisAlignment: MainAxisAlignment.end, - children: [ - CustomText( - 'The Quran Companion', - size: 15, - font: poppinsSemiBold, - color: brown, - ), - ], + const Align( + alignment: Alignment.centerRight, + child: CustomText( + 'The Quran Companion', + size: 15, + font: poppinsSemiBold, + color: brown, + ), ), const VerticalGap(13.5), - Align( + const Align( alignment: Alignment.center, - child: ClipRRect( - borderRadius: BorderRadius.circular(10.r), - child: SvgPicture.asset( - homeBanner, - width: MediaQuery.sizeOf(context).width.w - 63.w, - ), - ), + child: _CachedHomeBanner(), ), const VerticalGap(15), const CustomText( @@ -101,3 +91,30 @@ class HomeView extends StatelessWidget { ); } } + +class _CachedHomeBanner extends StatelessWidget { + const _CachedHomeBanner(); + + @override + Widget build(BuildContext context) { + return Stack( + children: [ + Container( + width: MediaQuery.sizeOf(context).width.w - 63.w, + height: MediaQuery.sizeOf(context).width.w - 63.w, + decoration: BoxDecoration( + color: purple, + borderRadius: BorderRadius.circular(10.r), + ), + ), + ClipRRect( + borderRadius: BorderRadius.circular(10.r), + child: SvgPicture.asset( + homeBanner, + width: MediaQuery.sizeOf(context).width.w - 63.w, + ), + ), + ], + ); + } +}