formatted files properly

This commit is contained in:
Utsav Ghimire
2023-03-08 03:26:32 +05:45
parent 3ff01371d4
commit 8d3c9b1173
3 changed files with 9 additions and 4 deletions

View File

@ -59,7 +59,8 @@ class _DashboardScreenState extends ConsumerState<DashboardScreen> {
//show Snackbar on failure
if (next.state == DashboardConcreteState.fetchedAllProducts) {
if (next.message.isNotEmpty) {
ScaffoldMessenger.of(context).showSnackBar(SnackBar(content: Text(next.message.toString())));
ScaffoldMessenger.of(context)
.showSnackBar(SnackBar(content: Text(next.message.toString())));
}
}
}),
@ -125,7 +126,9 @@ class _DashboardScreenState extends ConsumerState<DashboardScreen> {
itemBuilder: (context, index) {
final product = state.productList[index];
return ListTile(
leading: CircleAvatar(backgroundImage: NetworkImage(product.thumbnail)),
leading: CircleAvatar(
backgroundImage:
NetworkImage(product.thumbnail)),
title: Text(
product.title,
style: Theme.of(context).textTheme.bodyLarge,

View File

@ -59,7 +59,9 @@ class DashboardDrawer extends ConsumerWidget {
},
child: CircleAvatar(
child: Icon(
Theme.of(context).brightness == Brightness.dark ? Icons.light_mode : Icons.dark_mode,
Theme.of(context).brightness == Brightness.dark
? Icons.light_mode
: Icons.dark_mode,
color: Theme.of(context).iconTheme.color,
),
),