feat: create product
This commit is contained in:
@@ -58,18 +58,18 @@ class _SyncDataPageState extends State<SyncDataPage> {
|
||||
);
|
||||
},
|
||||
loaded: (productResponseModel) async {
|
||||
await ProductLocalDatasource.instance
|
||||
.deleteAllProducts();
|
||||
await ProductLocalDatasource.instance
|
||||
.insertProducts(
|
||||
productResponseModel.data!.products!,
|
||||
);
|
||||
ScaffoldMessenger.of(context).showSnackBar(
|
||||
const SnackBar(
|
||||
content: Text('Sync Product Success2'),
|
||||
backgroundColor: Colors.green,
|
||||
),
|
||||
);
|
||||
// await ProductLocalDatasource.instance
|
||||
// .deleteAllProducts();
|
||||
// await ProductLocalDatasource.instance
|
||||
// .insertProducts(
|
||||
// productResponseModel.data!.products!,
|
||||
// );
|
||||
// ScaffoldMessenger.of(context).showSnackBar(
|
||||
// const SnackBar(
|
||||
// content: Text('Sync Product Success2'),
|
||||
// backgroundColor: Colors.green,
|
||||
// ),
|
||||
// );
|
||||
},
|
||||
);
|
||||
},
|
||||
@@ -127,12 +127,12 @@ class _SyncDataPageState extends State<SyncDataPage> {
|
||||
);
|
||||
},
|
||||
loaded: () {
|
||||
ScaffoldMessenger.of(context).showSnackBar(
|
||||
const SnackBar(
|
||||
content: Text('Sync Order Success'),
|
||||
backgroundColor: Colors.green,
|
||||
),
|
||||
);
|
||||
// ScaffoldMessenger.of(context).showSnackBar(
|
||||
// const SnackBar(
|
||||
// content: Text('Sync Order Success'),
|
||||
// backgroundColor: Colors.green,
|
||||
// ),
|
||||
// );
|
||||
},
|
||||
);
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user