import 'package:diplomaticquarterapp/core/viewModels/pharmacyModule/wishlist_view_model.dart'; import 'package:diplomaticquarterapp/pages/base/base_view.dart'; import 'package:diplomaticquarterapp/pages/pharmacies/ProductCheckTypeWidget.dart'; import 'package:flutter/material.dart'; import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; class WishlistPage extends StatefulWidget { bool showBar; WishlistPage(this.showBar); @override _WishlistPageState createState() => _WishlistPageState(); } class _WishlistPageState extends State { bool isTrue = true; Widget build(BuildContext context) { return BaseView( onModelReady: (model) => model.getWishlistData(), builder: (_, model, wi) => AppScaffold( appBarTitle: 'Wishlist page', isShowAppBar: widget.showBar, isShowDecPage: false, isPharmacy: true, baseViewModel: model, body: model.wishListList.length == 0 ? Container( child: Center( child: Column( mainAxisAlignment: MainAxisAlignment.center, children: [ Padding( padding: const EdgeInsets.all(8.0), child: Image.asset( 'assets/images/new-design/empty_box.png', width: 100, height: 100, fit: BoxFit.cover, ), ), Padding( padding: const EdgeInsets.all(8.0), child: Text( 'There is no data', style: TextStyle(fontSize: 30), ), ) ], ), ), ) : Container( child: Column( children: [ Expanded( flex: 20, child: Container( width: double.infinity, height: MediaQuery.of(context).size.height * 0.85, //250, child: ProductCheckTypeWidget(isTrue, model.wishListList), ), ), ], ), ), ), ); } }