|
|
|
|
@ -1,3 +1,4 @@
|
|
|
|
|
import 'package:diplomaticquarterapp/core/enum/viewstate.dart';
|
|
|
|
|
import 'package:diplomaticquarterapp/core/viewModels/pharmacyModule/BrandViewModel.dart';
|
|
|
|
|
import 'package:diplomaticquarterapp/pages/base/base_view.dart';
|
|
|
|
|
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
|
|
|
|
|
@ -15,26 +16,38 @@ class ShopByBrandWidget extends StatelessWidget {
|
|
|
|
|
onModelReady: (model) => model.getTopManufacturerList(),
|
|
|
|
|
allowAny: true,
|
|
|
|
|
builder: (_, model, wi) => NetworkBaseView(
|
|
|
|
|
isLocalLoader: true,
|
|
|
|
|
baseViewModel: model,
|
|
|
|
|
child: Container(
|
|
|
|
|
child: Column(
|
|
|
|
|
children: [
|
|
|
|
|
ViewAllHomeWidget(
|
|
|
|
|
TranslationBase.of(context).shopByBrands,
|
|
|
|
|
ProductBrandsPage()),
|
|
|
|
|
Container(
|
|
|
|
|
height: 100,
|
|
|
|
|
child: ListView.builder(
|
|
|
|
|
itemBuilder: (ctx, i) =>
|
|
|
|
|
ManufacturerItem(model.manufacturerList[i]),
|
|
|
|
|
scrollDirection: Axis.horizontal,
|
|
|
|
|
itemCount: model.manufacturerList.length,
|
|
|
|
|
),
|
|
|
|
|
isLocalLoader: true,
|
|
|
|
|
baseViewModel: model,
|
|
|
|
|
child: Container(
|
|
|
|
|
child: Column(
|
|
|
|
|
children: [
|
|
|
|
|
ViewAllHomeWidget(TranslationBase.of(context).shopByBrands,
|
|
|
|
|
ProductBrandsPage()),
|
|
|
|
|
if (model.state != ViewState.BusyLocal)
|
|
|
|
|
Container(
|
|
|
|
|
height: 100,
|
|
|
|
|
child: ListView.builder(
|
|
|
|
|
itemBuilder: (ctx, i) =>
|
|
|
|
|
ManufacturerItem(model.manufacturerList[i]),
|
|
|
|
|
scrollDirection: Axis.horizontal,
|
|
|
|
|
itemCount: model.manufacturerList.length,
|
|
|
|
|
),
|
|
|
|
|
)
|
|
|
|
|
else
|
|
|
|
|
Container(
|
|
|
|
|
height: 80,
|
|
|
|
|
child: Center(
|
|
|
|
|
child: CircularProgressIndicator(
|
|
|
|
|
backgroundColor: Colors.white,
|
|
|
|
|
valueColor: AlwaysStoppedAnimation<Color>(
|
|
|
|
|
Colors.grey[500],
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
));
|
|
|
|
|
),
|
|
|
|
|
));
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|