- Wallet EnakPoint & EnakCoin: beranda, riwayat, saldo kedaluwarsa, kode bayar, tukar EnakCoin, transfer - PIN (buat, ganti, lupa), outlet, riwayat order, game spin - Halaman community, webview, coming soon, dan ikon menu beranda baru - Redesign Reward Saya: kartu tiket, filter chip, detail kode + QR - Hapus customer point loader, menu, dan checkout lama - Base URL ke enaklo-pos-api.altru.id Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
53 lines
1.5 KiB
Dart
53 lines
1.5 KiB
Dart
import 'package:flutter/material.dart';
|
|
|
|
import '../../../../common/extension/extension.dart';
|
|
import '../../../../common/theme/theme.dart';
|
|
import '../../../../domain/wallet/wallet.dart';
|
|
|
|
class WalletExpiringBanner extends StatelessWidget {
|
|
const WalletExpiringBanner({
|
|
super.key,
|
|
required this.currency,
|
|
required this.expiring,
|
|
required this.onTap,
|
|
});
|
|
|
|
final WalletCurrency currency;
|
|
final ExpiringAmount expiring;
|
|
final VoidCallback onTap;
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
return InkWell(
|
|
onTap: onTap,
|
|
borderRadius: BorderRadius.circular(AppValue.borderRadius),
|
|
child: Container(
|
|
padding: const EdgeInsets.all(12),
|
|
decoration: BoxDecoration(
|
|
color: AppColor.warningWithOpacity(0.1),
|
|
borderRadius: BorderRadius.circular(AppValue.borderRadius),
|
|
border: Border.all(color: AppColor.warning),
|
|
),
|
|
child: Row(
|
|
children: [
|
|
const Icon(Icons.schedule, color: AppColor.warning, size: 20),
|
|
const SizedBox(width: 10),
|
|
Expanded(
|
|
child: Text(
|
|
'${expiring.amount.thousandFormat} ${currency.label} akan '
|
|
'kedaluwarsa pada ${expiring.date.toDate}',
|
|
style: AppStyle.sm.copyWith(fontWeight: FontWeight.w600),
|
|
),
|
|
),
|
|
const Icon(
|
|
Icons.arrow_forward_ios,
|
|
size: 14,
|
|
color: AppColor.textSecondary,
|
|
),
|
|
],
|
|
),
|
|
),
|
|
);
|
|
}
|
|
}
|