feat: integrate enakgame and voucher
Build & Deploy iOS to TestFlight / build-and-deploy (push) Canceled after 0s

This commit is contained in:
efrilm
2026-10-10 02:33:16 +07:00
parent e5515d5871
commit 38850b281f
104 changed files with 7122 additions and 8063 deletions
@@ -5,29 +5,29 @@ import '../../../../common/theme/theme.dart';
class MainBottomNavbar extends StatelessWidget {
final TabsRouter tabsRouter;
final VoidCallback onPayTap;
final VoidCallback onWalletTap;
const MainBottomNavbar({
super.key,
required this.tabsRouter,
required this.onPayTap,
required this.onWalletTap,
});
/// Slot tengah hanya tempat label tombol Bayar; lingkarannya
/// [MainPayButton] yang menempel di atas navbar.
static const int _payIndex = 2;
/// Slot tengah hanya tempat label tombol Poin; lingkarannya
/// [MainWalletButton] yang menempel di atas navbar.
static const int _walletIndex = 2;
@override
Widget build(BuildContext context) {
final activeIndex = tabsRouter.activeIndex;
return BottomNavigationBar(
currentIndex: activeIndex >= _payIndex ? activeIndex + 1 : activeIndex,
currentIndex: activeIndex >= _walletIndex ? activeIndex + 1 : activeIndex,
onTap: (index) {
if (index == _payIndex) {
onPayTap();
if (index == _walletIndex) {
onWalletTap();
return;
}
tabsRouter.setActiveIndex(index > _payIndex ? index - 1 : index);
tabsRouter.setActiveIndex(index > _walletIndex ? index - 1 : index);
},
items: const [
BottomNavigationBarItem(
@@ -47,8 +47,8 @@ class MainBottomNavbar extends StatelessWidget {
),
BottomNavigationBarItem(
icon: SizedBox(height: 24),
label: 'Bayar',
tooltip: 'Bayar di kasir',
label: 'Poin',
tooltip: 'EnakPoint & EnakCoin',
),
BottomNavigationBarItem(
icon: Icon(Icons.groups),
@@ -66,10 +66,10 @@ class MainBottomNavbar extends StatelessWidget {
}
/// Seperti [FloatingActionButtonLocation.centerDocked], tapi tombolnya lebih
/// menonjol ke atas supaya tidak menempel ke label "Bayar".
class MainPayButtonLocation extends StandardFabLocation
/// menonjol ke atas supaya tidak menempel ke label "Poin".
class MainWalletButtonLocation extends StandardFabLocation
with FabCenterOffsetX, FabDockedOffsetY {
const MainPayButtonLocation();
const MainWalletButtonLocation();
static const double _raise = 10;
@@ -80,10 +80,10 @@ class MainPayButtonLocation extends StandardFabLocation
) => super.getOffsetY(scaffoldGeometry, adjustment) - _raise;
}
/// Tombol bulat di tengah navbar, dipasang di [MainPayButtonLocation].
class MainPayButton extends StatelessWidget {
/// Tombol bulat di tengah navbar, dipasang di [MainWalletButtonLocation].
class MainWalletButton extends StatelessWidget {
final VoidCallback onPressed;
const MainPayButton({super.key, required this.onPressed});
const MainWalletButton({super.key, required this.onPressed});
@override
Widget build(BuildContext context) {
@@ -92,12 +92,12 @@ class MainPayButton extends StatelessWidget {
// Halaman tab (mis. Community) juga punya FAB; tanpa hero supaya tag
// default tidak bentrok saat pindah halaman.
heroTag: null,
tooltip: 'Bayar di kasir',
tooltip: 'EnakPoint & EnakCoin',
elevation: 4,
backgroundColor: AppColor.primary,
foregroundColor: AppColor.white,
shape: const CircleBorder(),
child: const Icon(Icons.qr_code_scanner_rounded, size: 28),
child: const Icon(Icons.stars_rounded, size: 30),
);
}
}