feat: update
This commit is contained in:
parent
4a4f6388d7
commit
6df5380aa3
@ -142,11 +142,6 @@ class _ProductPageState extends State<ProductPage>
|
||||
super.initState();
|
||||
}
|
||||
|
||||
@override
|
||||
void dispose() {
|
||||
super.dispose();
|
||||
}
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Scaffold(
|
||||
@ -171,14 +166,12 @@ class _ProductPageState extends State<ProductPage>
|
||||
flexibleSpace: CustomAppBar(title: 'Produk'),
|
||||
actions: [
|
||||
ActionIconButton(onTap: () {}, icon: LineIcons.search),
|
||||
ActionIconButton(onTap: _showAddProductDialog, icon: LineIcons.plus),
|
||||
ActionIconButton(
|
||||
onTap: _toggleViewType,
|
||||
icon: currentViewType == ViewType.grid
|
||||
? LineIcons.list
|
||||
: LineIcons.thLarge,
|
||||
),
|
||||
ActionIconButton(onTap: _showOptionsMenu, icon: LineIcons.filter),
|
||||
],
|
||||
);
|
||||
}
|
||||
@ -414,71 +407,6 @@ class _ProductPageState extends State<ProductPage>
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
void _showAddProductDialog() {
|
||||
showDialog(
|
||||
context: context,
|
||||
builder: (context) => AlertDialog(
|
||||
title: const Text('Tambah Produk'),
|
||||
content: const Text(
|
||||
'Dialog tambah produk akan diimplementasikan di sini',
|
||||
),
|
||||
actions: [
|
||||
TextButton(
|
||||
onPressed: () => Navigator.pop(context),
|
||||
child: const Text('Batal'),
|
||||
),
|
||||
ElevatedButton(
|
||||
onPressed: () => Navigator.pop(context),
|
||||
child: const Text('Simpan'),
|
||||
),
|
||||
],
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
void _showOptionsMenu() {
|
||||
showModalBottomSheet(
|
||||
context: context,
|
||||
builder: (context) => Container(
|
||||
padding: const EdgeInsets.all(16.0),
|
||||
child: Column(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
children: [
|
||||
ListTile(
|
||||
leading: Icon(
|
||||
currentViewType == ViewType.grid ? Icons.list : Icons.grid_view,
|
||||
),
|
||||
title: Text(
|
||||
currentViewType == ViewType.grid
|
||||
? 'Tampilan List'
|
||||
: 'Tampilan Grid',
|
||||
),
|
||||
onTap: () {
|
||||
Navigator.pop(context);
|
||||
_toggleViewType();
|
||||
},
|
||||
),
|
||||
ListTile(
|
||||
leading: const Icon(Icons.sort),
|
||||
title: const Text('Urutkan'),
|
||||
onTap: () => Navigator.pop(context),
|
||||
),
|
||||
ListTile(
|
||||
leading: const Icon(Icons.filter_list),
|
||||
title: const Text('Filter Lanjutan'),
|
||||
onTap: () => Navigator.pop(context),
|
||||
),
|
||||
ListTile(
|
||||
leading: const Icon(Icons.download),
|
||||
title: const Text('Export Data'),
|
||||
onTap: () => Navigator.pop(context),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
// Product Model
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user