feat: integrate enakgame and voucher
Build & Deploy iOS to TestFlight / build-and-deploy (push) Canceled after 0s
Build & Deploy iOS to TestFlight / build-and-deploy (push) Canceled after 0s
This commit is contained in:
@@ -83,6 +83,7 @@ class _WalletHistoryPageState extends State<WalletHistoryPage>
|
||||
borderRadius: BorderRadius.vertical(top: Radius.circular(20)),
|
||||
),
|
||||
builder: (_) => _FilterSheet(
|
||||
currency: state.currency,
|
||||
initial: _HistoryFilter(
|
||||
types: state.types,
|
||||
from: state.from,
|
||||
@@ -264,8 +265,10 @@ class _HistoryFilter {
|
||||
}
|
||||
|
||||
class _FilterSheet extends StatefulWidget {
|
||||
const _FilterSheet({required this.initial});
|
||||
const _FilterSheet({required this.currency, required this.initial});
|
||||
|
||||
/// Tab yang sedang aktif; hanya tipe milik mata uang ini yang ditawarkan.
|
||||
final WalletCurrency currency;
|
||||
final _HistoryFilter initial;
|
||||
|
||||
@override
|
||||
@@ -273,6 +276,8 @@ class _FilterSheet extends StatefulWidget {
|
||||
}
|
||||
|
||||
class _FilterSheetState extends State<_FilterSheet> {
|
||||
late final List<WalletTransactionType> _filterable =
|
||||
WalletTransactionType.filterableFor(widget.currency);
|
||||
late final Set<WalletTransactionType> _types = {...widget.initial.types};
|
||||
late DateTime? _from = widget.initial.from;
|
||||
late DateTime? _to = widget.initial.to;
|
||||
@@ -316,7 +321,7 @@ class _FilterSheetState extends State<_FilterSheet> {
|
||||
Wrap(
|
||||
spacing: 8,
|
||||
runSpacing: 8,
|
||||
children: WalletTransactionType.filterable.map((type) {
|
||||
children: _filterable.map((type) {
|
||||
final selected = _types.contains(type);
|
||||
return FilterChip(
|
||||
label: Text(type.label, style: AppStyle.sm),
|
||||
@@ -361,9 +366,7 @@ class _FilterSheetState extends State<_FilterSheet> {
|
||||
title: 'Terapkan',
|
||||
onPressed: () => Navigator.of(context).pop(
|
||||
_HistoryFilter(
|
||||
types: WalletTransactionType.filterable
|
||||
.where(_types.contains)
|
||||
.toList(),
|
||||
types: _filterable.where(_types.contains).toList(),
|
||||
from: _from,
|
||||
to: _to,
|
||||
),
|
||||
|
||||
Reference in New Issue
Block a user