You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
HMG_Patient_App/lib/pages/pharmacies/wishlist.dart

56 lines
1.5 KiB
Dart

import 'package:diplomaticquarterapp/config/config.dart';
import 'package:flutter/material.dart';
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
import 'package:diplomaticquarterapp/services/pharmacy_services/wishList_service.dart';
import 'package:diplomaticquarterapp/widgets/pharmacy/product_tile.dart';
void main() => runApp(WishlistPage());
class WishlistPage extends StatefulWidget {
@override
_WishlistPageState createState() => _WishlistPageState();
}
class _WishlistPageState extends State<WishlistPage> {
@override
void initState(){
WidgetsBinding.instance.addPostFrameCallback((_) => getWishListItems());
}
Widget build(BuildContext context) {
return AppScaffold(
appBarTitle: 'Wishlist page',
isShowAppBar: true,
isPharmacy: true,
body: Container(
// child: productTile(),
child: ListView.builder(
itemCount: 3,
itemBuilder: (BuildContext context, int index) {
return Column(
children: [
Container(
child: productTile(productName: 'Panadol Extra 500 MG', productPrice: '10.00', productRate: 3.00,),
),
Divider(height: 1, color: Colors.grey)
],
);
}),
),
);
}
}
getWishListItems() {
print("getWishListItems");
WishListService service = new WishListService();
service.getWishlist(AppGlobal.context).then((res) {
print(res);
});
}