Skip to content

Commit

Permalink
task: adjustments
Browse files Browse the repository at this point in the history
  • Loading branch information
Atuoha committed Oct 12, 2022
1 parent b7a0378 commit 068fa08
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 14 deletions.
1 change: 0 additions & 1 deletion lib/utilities/build_cart.dart
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,6 @@ Dismissible buildCart(
elevation: 3,
child: GestureDetector(
onTap: () async {
print('dkfjsdklfjsdklf');
await FirebaseFirestore.instance
.collection('products')
.doc(item.docId)
Expand Down
30 changes: 17 additions & 13 deletions lib/utilities/products_stream_builder.dart
Original file line number Diff line number Diff line change
Expand Up @@ -76,20 +76,24 @@ class ProductStreamBuilder extends StatelessWidget {
}

if (snapshot.data!.docs.isEmpty) {
return Column(
children: [
Image.asset(
'assets/images/sad.png',
width: 150,
),
const SizedBox(height: 10),
const Text(
'No data available!',
style: TextStyle(
color: primaryColor,
return Center(
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
crossAxisAlignment: CrossAxisAlignment.center,
children: [
Image.asset(
'assets/images/sad.png',
width: 150,
),
)
],
const SizedBox(height: 10),
const Text(
'No data available!',
style: TextStyle(
color: primaryColor,
),
)
],
),
);
}

Expand Down
1 change: 1 addition & 0 deletions lib/views/main/product/details.dart
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,7 @@ class _DetailsScreenState extends State<DetailsScreen>
.collection('products')
.where('category', isEqualTo: product['category'])
.where('sub_category', isEqualTo: product['sub_category'])
// .where('prod_id', isNotEqualTo: product['prod_id'])
.snapshots();

return Scaffold(
Expand Down

0 comments on commit 068fa08

Please sign in to comment.