diff --git a/lib/pages/pharmacy_categorise.dart b/lib/pages/pharmacy_categorise.dart index 65886dc5..c89a7db4 100644 --- a/lib/pages/pharmacy_categorise.dart +++ b/lib/pages/pharmacy_categorise.dart @@ -35,199 +35,227 @@ class _PharmacyCategorisePageState extends State { AppScaffold( isShowDecPage: false, baseViewModel: model, - body: Column( - children: [ - Container( - height: 400, - margin: EdgeInsets.only(bottom: 22), - child: GridView.builder( - gridDelegate: SliverGridDelegateWithFixedCrossAxisCount( - crossAxisCount: 2, - crossAxisSpacing: 0.5, - mainAxisSpacing: 1.0, - childAspectRatio: 3.2, - ), - itemCount: model.categorise.length, - itemBuilder: (BuildContext context, int index) { - return Padding( - padding: EdgeInsets.all(4.0), - child: InkWell( - child: Container( - decoration: BoxDecoration( - borderRadius: BorderRadius.circular(5), - color: Colors.grey.withOpacity(0.24), - ), - child: Padding( - padding: EdgeInsets.symmetric(horizontal: 10.0), - child: Texts( - projectViewModel.isArabic - ? model.categorise[index].namen - : model.categorise[index].name, - fontWeight: FontWeight.w600, + body: SingleChildScrollView( + child: Column( + children: [ + Container( + height: 400, + margin: EdgeInsets.only(bottom: 22), + child: GridView.builder( + gridDelegate: SliverGridDelegateWithFixedCrossAxisCount( + crossAxisCount: 2, + crossAxisSpacing: 0.5, + mainAxisSpacing: 1.0, + childAspectRatio: 3.2, + ), + itemCount: model.categorise.length, + itemBuilder: (BuildContext context, int index) { + return Padding( + padding: EdgeInsets.all(4.0), + child: InkWell( + child: Container( + decoration: BoxDecoration( + borderRadius: BorderRadius.circular(5), + color: Colors.grey.withOpacity(0.24), ), - ), - ), - onTap: () => { - Navigator.push( - context, - FadePage( - page: model.categorise[index].id != '12' - ? ParentCategorisePage( - id: model.categorise[index].id, - titleName: model.categorise[index].name, - ) - : FinalProductsPage( - id: model.categorise[index].id, - ), + child: Padding( + padding: EdgeInsets.symmetric(horizontal: 10.0), + child: Texts( + projectViewModel.isArabic + ? model.categorise[index].namen + : model.categorise[index].name, + fontWeight: FontWeight.w600, + ), ), ), - }, - ), - ); - }, + onTap: () => { + Navigator.push( + context, + FadePage( + page: model.categorise[index].id != '12' + ? ParentCategorisePage( + id: model.categorise[index].id, + titleName: model.categorise[index].name, + ) + : FinalProductsPage( + id: model.categorise[index].id, + ), + ), + ), + }, + ), + ); + }, + ), ), - ), - Container( - height: 140, - child: Column( - children: [ - Divider( - height: 2.0, - thickness: 1.0, - color: Colors.black12.withOpacity(0.14)), - SizedBox( - height: 10.0, - ), - Row( - children: [ - Expanded( - child: Padding( - padding: EdgeInsets.all(4.0), - child: InkWell( - onTap: () { - Navigator.push( - context, - FadePage( - page: FinalProductsPage( - id: "", - productType: 4, + Container( + height: 140, + child: Column( + children: [ + Divider( + height: 2.0, + thickness: 1.0, + color: Colors.black12.withOpacity(0.14)), + SizedBox( + height: 10.0, + ), + Row( + children: [ + Expanded( + child: Padding( + padding: EdgeInsets.all(4.0), + child: InkWell( + onTap: () { + Navigator.push( + context, + FadePage( + page: FinalProductsPage( + id: "", + productType: 4, + ), ), + ); + }, + child: Container( + height: 50.0, + width: 55.0, + decoration: BoxDecoration( + borderRadius: BorderRadius.circular(5.0), + color: + Colors.green.shade300.withOpacity(0.34), ), - ); - }, - child: Container( - height: 50.0, - width: 55.0, - decoration: BoxDecoration( - borderRadius: BorderRadius.circular(5.0), - color: - Colors.green.shade300.withOpacity(0.34), - ), - child: Padding( - padding: - EdgeInsets.symmetric(horizontal: 10.0), - child: Texts( - projectViewModel.isArabic - ? 'الاكثر مبيعا' - : 'Best Sellers', - fontWeight: FontWeight.w600, + child: Padding( + padding: + EdgeInsets.symmetric(horizontal: 10.0), + child: Texts( + projectViewModel.isArabic + ? 'الاكثر مبيعا' + : 'Best Sellers', + fontWeight: FontWeight.w600, + ), ), ), ), ), ), - ), - Expanded( - child: Padding( - padding: EdgeInsets.all(4.0), - child: Container( - height: 50.0, - width: 55.0, - decoration: BoxDecoration( - color: Colors.orangeAccent.shade200 - .withOpacity(0.34), - borderRadius: BorderRadius.circular(5.0), - ), - child: Padding( - padding: EdgeInsets.symmetric(horizontal: 10.0), - child: Texts( - projectViewModel.isArabic - ? 'الاكثر مشاهدة' - : 'Most Viewed', - fontWeight: FontWeight.w600, + Expanded( + child: Padding( + padding: EdgeInsets.all(4.0), + child: InkWell( + onTap: () { + Navigator.push( + context, + FadePage( + page: FinalProductsPage( + id: "", + productType: 2, + ), + ), + ); + }, + child: Container( + height: 50.0, + width: 55.0, + decoration: BoxDecoration( + color: Colors.orangeAccent.shade200 + .withOpacity(0.34), + borderRadius: BorderRadius.circular(5.0), + ), + child: Padding( + padding: EdgeInsets.symmetric(horizontal: 10.0), + child: Texts( + projectViewModel.isArabic + ? 'الاكثر مشاهدة' + : 'Most Viewed', + fontWeight: FontWeight.w600, + ), + ), ), ), ), ), - ), - ], - ), - Row( - children: [ - Expanded( - child: Padding( - padding: EdgeInsets.all(4.0), - child: Container( - height: 50.0, - width: 55.0, - decoration: BoxDecoration( - color: Colors.blue.shade200.withOpacity(0.34), - borderRadius: BorderRadius.circular(5.0), - ), - child: Padding( - padding: EdgeInsets.symmetric(horizontal: 10.0), - child: Texts( - projectViewModel.isArabic - ? 'منتجات جديدة' - : 'New Products', - fontWeight: FontWeight.w600, + ], + ), + Row( + children: [ + Expanded( + child: Padding( + padding: EdgeInsets.all(4.0), + child: InkWell( + onTap: () { + Navigator.push( + context, + FadePage( + page: FinalProductsPage( + id: "", + productType: 1, + ), + ), + ); + }, + child: Container( + height: 50.0, + width: 55.0, + decoration: BoxDecoration( + color: Colors.blue.shade200.withOpacity(0.34), + borderRadius: BorderRadius.circular(5.0), + ), + child: Padding( + padding: EdgeInsets.symmetric(horizontal: 10.0), + child: Texts( + projectViewModel.isArabic + ? 'منتجات جديدة' + : 'New Products', + fontWeight: FontWeight.w600, + ), + ), ), ), ), ), - ), - Expanded( - child: Padding( - padding: EdgeInsets.all(4.0), - child: InkWell( - onTap: () { - Navigator.push( - context, - FadePage( - page: FinalProductsPage( - id: "", - productType: 3, + Expanded( + child: Padding( + padding: EdgeInsets.all(4.0), + child: InkWell( + onTap: () { + Navigator.push( + context, + FadePage( + page: FinalProductsPage( + id: "", + productType: 3, + ), ), + ); + }, + child: Container( + height: 50.0, + width: 55.0, + decoration: BoxDecoration( + color: + Colors.purple.shade200.withOpacity(0.34), + borderRadius: BorderRadius.circular(5.0), ), - ); - }, - child: Container( - height: 50.0, - width: 55.0, - decoration: BoxDecoration( - color: - Colors.purple.shade200.withOpacity(0.34), - borderRadius: BorderRadius.circular(5.0), - ), - child: Padding( - padding: - EdgeInsets.symmetric(horizontal: 10.0), - child: Texts( - projectViewModel.isArabic - ? 'شوهد مؤخرا' - : 'Recently Viewed', - fontWeight: FontWeight.w600, + child: Padding( + padding: + EdgeInsets.symmetric(horizontal: 10.0), + child: Texts( + projectViewModel.isArabic + ? 'شوهد مؤخرا' + : 'Recently Viewed', + fontWeight: FontWeight.w600, + ), ), ), ), ), ), - ), - ], - ), - ], - )), - ], + ], + ), + ], + )), + ], + ), ), ), );