Hi Ashish,
Thanks for sharing your work, backend structure is really great.
is there any way that i can return productlist(List products) without returning any widget?
every time I use BlocConsumer or Builder its asking for a Widget to return from dataWidget, how can i simply return the list
can u suggest me some modifications for it
cubit: allProductsCubit,
listener:
(BuildContext context, ResultState<List<ProductModel>> state) {},
builder: (BuildContext context, ResultState<List<ProductModel>> state) {
return ResultStateBuilder(
state: state,
loadingWidget: (bool isReloading) {
return Center(
child: CommonAppLoader(),
);
},
errorWidget: (String error) {
return Container();
},
dataWidget: (List<ProductModel> value) {
return dataWidget(value); //only returns widget here
},
);
},
),
I got that there is something I need to change at result_state, cannot understand what to change
Response would be much appreciated!