Show a message when expenses list is empty
This commit is contained in:
@@ -48,6 +48,12 @@ class _ExpensesList extends StatelessWidget {
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
if (list.isEmpty) {
|
||||
return const Center(
|
||||
child: Text("There is no entry waiting for upload (yet)"),
|
||||
);
|
||||
}
|
||||
|
||||
return ListView.builder(
|
||||
itemBuilder: (context, entryNum) {
|
||||
final expense = list[entryNum];
|
||||
|
@@ -40,10 +40,10 @@ Future<void> _performSynchronization(Ref ref) async {
|
||||
|
||||
// Lastly delete the local expense
|
||||
ref.watch(expensesProvider).requireValue.deleteExpense(exp);
|
||||
}
|
||||
|
||||
ref.invalidate(expensesProvider);
|
||||
}
|
||||
}
|
||||
|
||||
class SynchronizeButton extends HookConsumerWidget {
|
||||
const SynchronizeButton({super.key});
|
||||
|
Reference in New Issue
Block a user