|
|
|
@ -29,7 +29,9 @@ class _PharmacyCategorisePageState extends State<PharmacyCategorisePage> {
|
|
|
|
ProjectViewModel projectViewModel = Provider.of(context);
|
|
|
|
ProjectViewModel projectViewModel = Provider.of(context);
|
|
|
|
return BaseView<PharmacyCategoriseViewModel>(
|
|
|
|
return BaseView<PharmacyCategoriseViewModel>(
|
|
|
|
onModelReady: (model) => model.getCategorise(),
|
|
|
|
onModelReady: (model) => model.getCategorise(),
|
|
|
|
builder: (BuildContext context, PharmacyCategoriseViewModel model, Widget child) => AppScaffold(
|
|
|
|
builder: (BuildContext context, PharmacyCategoriseViewModel model,
|
|
|
|
|
|
|
|
Widget child) =>
|
|
|
|
|
|
|
|
AppScaffold(
|
|
|
|
isShowDecPage: false,
|
|
|
|
isShowDecPage: false,
|
|
|
|
baseViewModel: model,
|
|
|
|
baseViewModel: model,
|
|
|
|
body: Column(
|
|
|
|
body: Column(
|
|
|
|
@ -57,7 +59,9 @@ class _PharmacyCategorisePageState extends State<PharmacyCategorisePage> {
|
|
|
|
child: Padding(
|
|
|
|
child: Padding(
|
|
|
|
padding: EdgeInsets.symmetric(horizontal: 10.0),
|
|
|
|
padding: EdgeInsets.symmetric(horizontal: 10.0),
|
|
|
|
child: Texts(
|
|
|
|
child: Texts(
|
|
|
|
projectViewModel.isArabic ? model.categorise[index].namen : model.categorise[index].name,
|
|
|
|
projectViewModel.isArabic
|
|
|
|
|
|
|
|
? model.categorise[index].namen
|
|
|
|
|
|
|
|
: model.categorise[index].name,
|
|
|
|
fontWeight: FontWeight.w600,
|
|
|
|
fontWeight: FontWeight.w600,
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
@ -66,14 +70,15 @@ class _PharmacyCategorisePageState extends State<PharmacyCategorisePage> {
|
|
|
|
Navigator.push(
|
|
|
|
Navigator.push(
|
|
|
|
context,
|
|
|
|
context,
|
|
|
|
MaterialPageRoute(
|
|
|
|
MaterialPageRoute(
|
|
|
|
builder: (context) => model.categorise[index].id != '12'
|
|
|
|
builder: (context) =>
|
|
|
|
? ParentCategorisePage(
|
|
|
|
model.categorise[index].id != '12'
|
|
|
|
id: model.categorise[index].id,
|
|
|
|
? ParentCategorisePage(
|
|
|
|
titleName: model.categorise[index].name,
|
|
|
|
id: model.categorise[index].id,
|
|
|
|
)
|
|
|
|
titleName: model.categorise[index].name,
|
|
|
|
: FinalProductsPage(
|
|
|
|
)
|
|
|
|
id: model.categorise[index].id,
|
|
|
|
: FinalProductsPage(
|
|
|
|
),
|
|
|
|
id: model.categorise[index].id,
|
|
|
|
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
},
|
|
|
|
},
|
|
|
|
@ -86,7 +91,10 @@ class _PharmacyCategorisePageState extends State<PharmacyCategorisePage> {
|
|
|
|
height: 140,
|
|
|
|
height: 140,
|
|
|
|
child: Column(
|
|
|
|
child: Column(
|
|
|
|
children: [
|
|
|
|
children: [
|
|
|
|
Divider(height: 2.0, thickness: 1.0, color: Colors.black12.withOpacity(0.14)),
|
|
|
|
Divider(
|
|
|
|
|
|
|
|
height: 2.0,
|
|
|
|
|
|
|
|
thickness: 1.0,
|
|
|
|
|
|
|
|
color: Colors.black12.withOpacity(0.14)),
|
|
|
|
SizedBox(
|
|
|
|
SizedBox(
|
|
|
|
height: 10.0,
|
|
|
|
height: 10.0,
|
|
|
|
),
|
|
|
|
),
|
|
|
|
@ -102,12 +110,16 @@ class _PharmacyCategorisePageState extends State<PharmacyCategorisePage> {
|
|
|
|
width: 55.0,
|
|
|
|
width: 55.0,
|
|
|
|
decoration: BoxDecoration(
|
|
|
|
decoration: BoxDecoration(
|
|
|
|
borderRadius: BorderRadius.circular(5.0),
|
|
|
|
borderRadius: BorderRadius.circular(5.0),
|
|
|
|
color: Colors.green.shade300.withOpacity(0.34),
|
|
|
|
color:
|
|
|
|
|
|
|
|
Colors.green.shade300.withOpacity(0.34),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
child: Padding(
|
|
|
|
child: Padding(
|
|
|
|
padding: EdgeInsets.symmetric(horizontal: 10.0),
|
|
|
|
padding:
|
|
|
|
|
|
|
|
EdgeInsets.symmetric(horizontal: 10.0),
|
|
|
|
child: Texts(
|
|
|
|
child: Texts(
|
|
|
|
projectViewModel.isArabic ? 'الاكثر مبيعا' : 'Best Sellers',
|
|
|
|
projectViewModel.isArabic
|
|
|
|
|
|
|
|
? 'الاكثر مبيعا'
|
|
|
|
|
|
|
|
: 'Best Sellers',
|
|
|
|
fontWeight: FontWeight.w600,
|
|
|
|
fontWeight: FontWeight.w600,
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
@ -122,13 +134,16 @@ class _PharmacyCategorisePageState extends State<PharmacyCategorisePage> {
|
|
|
|
height: 50.0,
|
|
|
|
height: 50.0,
|
|
|
|
width: 55.0,
|
|
|
|
width: 55.0,
|
|
|
|
decoration: BoxDecoration(
|
|
|
|
decoration: BoxDecoration(
|
|
|
|
color: Colors.orangeAccent.shade200.withOpacity(0.34),
|
|
|
|
color: Colors.orangeAccent.shade200
|
|
|
|
|
|
|
|
.withOpacity(0.34),
|
|
|
|
borderRadius: BorderRadius.circular(5.0),
|
|
|
|
borderRadius: BorderRadius.circular(5.0),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
child: Padding(
|
|
|
|
child: Padding(
|
|
|
|
padding: EdgeInsets.symmetric(horizontal: 10.0),
|
|
|
|
padding: EdgeInsets.symmetric(horizontal: 10.0),
|
|
|
|
child: Texts(
|
|
|
|
child: Texts(
|
|
|
|
projectViewModel.isArabic ? 'الاكثر مشاهدة' : 'Most Viewed',
|
|
|
|
projectViewModel.isArabic
|
|
|
|
|
|
|
|
? 'الاكثر مشاهدة'
|
|
|
|
|
|
|
|
: 'Most Viewed',
|
|
|
|
fontWeight: FontWeight.w600,
|
|
|
|
fontWeight: FontWeight.w600,
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
@ -152,7 +167,9 @@ class _PharmacyCategorisePageState extends State<PharmacyCategorisePage> {
|
|
|
|
child: Padding(
|
|
|
|
child: Padding(
|
|
|
|
padding: EdgeInsets.symmetric(horizontal: 10.0),
|
|
|
|
padding: EdgeInsets.symmetric(horizontal: 10.0),
|
|
|
|
child: Texts(
|
|
|
|
child: Texts(
|
|
|
|
projectViewModel.isArabic ? 'منتجات جديدة' : 'New Products',
|
|
|
|
projectViewModel.isArabic
|
|
|
|
|
|
|
|
? 'منتجات جديدة'
|
|
|
|
|
|
|
|
: 'New Products',
|
|
|
|
fontWeight: FontWeight.w600,
|
|
|
|
fontWeight: FontWeight.w600,
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
@ -164,19 +181,23 @@ class _PharmacyCategorisePageState extends State<PharmacyCategorisePage> {
|
|
|
|
padding: EdgeInsets.all(4.0),
|
|
|
|
padding: EdgeInsets.all(4.0),
|
|
|
|
child: InkWell(
|
|
|
|
child: InkWell(
|
|
|
|
onTap: () {
|
|
|
|
onTap: () {
|
|
|
|
_scanQrAndGetPatient(context, model);
|
|
|
|
// _scanQrAndGetPatient(context, model);
|
|
|
|
},
|
|
|
|
},
|
|
|
|
child: Container(
|
|
|
|
child: Container(
|
|
|
|
height: 50.0,
|
|
|
|
height: 50.0,
|
|
|
|
width: 55.0,
|
|
|
|
width: 55.0,
|
|
|
|
decoration: BoxDecoration(
|
|
|
|
decoration: BoxDecoration(
|
|
|
|
color: Colors.purple.shade200.withOpacity(0.34),
|
|
|
|
color:
|
|
|
|
|
|
|
|
Colors.purple.shade200.withOpacity(0.34),
|
|
|
|
borderRadius: BorderRadius.circular(5.0),
|
|
|
|
borderRadius: BorderRadius.circular(5.0),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
child: Padding(
|
|
|
|
child: Padding(
|
|
|
|
padding: EdgeInsets.symmetric(horizontal: 10.0),
|
|
|
|
padding:
|
|
|
|
|
|
|
|
EdgeInsets.symmetric(horizontal: 10.0),
|
|
|
|
child: Texts(
|
|
|
|
child: Texts(
|
|
|
|
projectViewModel.isArabic ? 'شوهد مؤخرا' : 'Recently Viewed',
|
|
|
|
projectViewModel.isArabic
|
|
|
|
|
|
|
|
? 'شوهد مؤخرا'
|
|
|
|
|
|
|
|
: 'Recently Viewed',
|
|
|
|
fontWeight: FontWeight.w600,
|
|
|
|
fontWeight: FontWeight.w600,
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
|