diff --git a/lib/presentation/pages/home/widgets/feature.dart b/lib/presentation/pages/home/widgets/feature.dart index 693cef5..796db91 100644 --- a/lib/presentation/pages/home/widgets/feature.dart +++ b/lib/presentation/pages/home/widgets/feature.dart @@ -1,6 +1,5 @@ import 'package:auto_route/auto_route.dart'; import 'package:flutter/material.dart'; -import 'package:line_icons/line_icons.dart'; import '../../../../common/extension/extension.dart'; import '../../../../common/theme/theme.dart'; diff --git a/lib/presentation/pages/home/widgets/omset_balance.dart b/lib/presentation/pages/home/widgets/omset_balance.dart index 915a15b..3240267 100644 --- a/lib/presentation/pages/home/widgets/omset_balance.dart +++ b/lib/presentation/pages/home/widgets/omset_balance.dart @@ -145,7 +145,7 @@ class _HomeOmsetBalanceState extends State { ? Text( widget.totalOmset.currencyFormatRp, key: const ValueKey('visible'), - style: AppStyle.xl.copyWith( + style: AppStyle.xxl.copyWith( color: AppColor.black, fontWeight: FontWeight.w900, letterSpacing: 0.3, diff --git a/lib/presentation/pages/home/widgets/promo_banner.dart b/lib/presentation/pages/home/widgets/promo_banner.dart index a2b77f8..f00fdbf 100644 --- a/lib/presentation/pages/home/widgets/promo_banner.dart +++ b/lib/presentation/pages/home/widgets/promo_banner.dart @@ -8,8 +8,8 @@ class HomePromoBanner extends StatelessWidget { const HomePromoBanner({super.key}); static const _outlets = [ - 'ENAKLO RAWAMANGUNG', - 'ENAKLO WOKU PEDAS\nKELAPA GADING', + {'name': 'ENAKLO RAWAMANGUNG', 'isHealthy': true}, + {'name': 'ENAKLO WOKU PEDAS\nKELAPA GADING', 'isHealthy': true}, ]; @override @@ -26,7 +26,7 @@ class HomePromoBanner extends StatelessWidget { for (int i = 0; i < _outlets.length; i++) ...[ Expanded( child: ParticleCard( - height: 100, + height: 110, padding: const EdgeInsets.symmetric( horizontal: 12, vertical: 12, @@ -36,28 +36,15 @@ class HomePromoBanner extends StatelessWidget { crossAxisAlignment: CrossAxisAlignment.start, mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [ - Container( - padding: const EdgeInsets.symmetric( - horizontal: 7, - vertical: 2, - ), - decoration: BoxDecoration( - color: AppColor.white.withOpacity(0.2), - borderRadius: BorderRadius.circular(20), - ), - child: Text( - 'OUTLET', - style: AppStyle.xs.copyWith( - color: AppColor.white, - fontWeight: FontWeight.w700, - letterSpacing: 1.0, - fontSize: 10, - ), - ), + Row( + children: [ + Spacer(), + _buildHealthIndicator(_outlets[i]['isHealthy'] as bool), + ], ), const SpaceHeight(6), Text( - _outlets[i], + _outlets[i]['name'] as String, style: AppStyle.sm.copyWith( color: AppColor.white, fontWeight: FontWeight.w800, @@ -76,4 +63,43 @@ class HomePromoBanner extends StatelessWidget { ), ); } + + Widget _buildHealthIndicator(bool isHealthy) { + return Container( + padding: const EdgeInsets.symmetric(horizontal: 8, vertical: 3), + decoration: BoxDecoration( + color: isHealthy + ? AppColor.success.withOpacity(0.9) + : AppColor.error.withOpacity(0.9), + borderRadius: BorderRadius.circular(12), + boxShadow: [ + BoxShadow( + color: (isHealthy ? AppColor.success : AppColor.error) + .withOpacity(0.3), + blurRadius: 4, + offset: const Offset(0, 2), + ), + ], + ), + child: Row( + mainAxisSize: MainAxisSize.min, + children: [ + Icon( + isHealthy ? Icons.check_circle : Icons.warning_rounded, + color: AppColor.white, + size: 12, + ), + const SpaceWidth(4), + Text( + isHealthy ? 'Sehat' : 'Tidak Sehat', + style: AppStyle.xs.copyWith( + color: AppColor.white, + fontWeight: FontWeight.w700, + fontSize: 9, + ), + ), + ], + ), + ); + } }