|
|
|
@ -4,7 +4,16 @@ import 'package:font_awesome_flutter/font_awesome_flutter.dart';
|
|
|
|
import 'package:rating_bar/rating_bar.dart';
|
|
|
|
import 'package:rating_bar/rating_bar.dart';
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
productTile() {
|
|
|
|
|
|
|
|
|
|
|
|
class productTile extends StatelessWidget {
|
|
|
|
|
|
|
|
final String productName;
|
|
|
|
|
|
|
|
final String productPrice;
|
|
|
|
|
|
|
|
final double productRate;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
productTile({this.productName, this.productPrice, this.productRate});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@override
|
|
|
|
|
|
|
|
Widget build(BuildContext context) {
|
|
|
|
return Container(
|
|
|
|
return Container(
|
|
|
|
height: 120,
|
|
|
|
height: 120,
|
|
|
|
width: double.infinity,
|
|
|
|
width: double.infinity,
|
|
|
|
@ -36,7 +45,7 @@ productTile() {
|
|
|
|
child: RichText(
|
|
|
|
child: RichText(
|
|
|
|
text: TextSpan(
|
|
|
|
text: TextSpan(
|
|
|
|
text:
|
|
|
|
text:
|
|
|
|
'Dulcolax 5 Mg 30 Tablets asdfasdfadsf asdfasdfas dasd fasdf asd fasdfsad',
|
|
|
|
productName,
|
|
|
|
style: TextStyle(
|
|
|
|
style: TextStyle(
|
|
|
|
color: Colors.black54,
|
|
|
|
color: Colors.black54,
|
|
|
|
fontSize: 15,
|
|
|
|
fontSize: 15,
|
|
|
|
@ -51,7 +60,7 @@ productTile() {
|
|
|
|
alignment: Alignment.topLeft,
|
|
|
|
alignment: Alignment.topLeft,
|
|
|
|
child: RichText(
|
|
|
|
child: RichText(
|
|
|
|
text: TextSpan(
|
|
|
|
text: TextSpan(
|
|
|
|
text: 'SAR 9999.99',
|
|
|
|
text: 'SAR $productPrice',
|
|
|
|
style: TextStyle(
|
|
|
|
style: TextStyle(
|
|
|
|
fontWeight: FontWeight.bold,
|
|
|
|
fontWeight: FontWeight.bold,
|
|
|
|
color: Colors.black,
|
|
|
|
color: Colors.black,
|
|
|
|
@ -65,7 +74,7 @@ productTile() {
|
|
|
|
child: Align(
|
|
|
|
child: Align(
|
|
|
|
alignment: Alignment.topLeft,
|
|
|
|
alignment: Alignment.topLeft,
|
|
|
|
child: RatingBar.readOnly(
|
|
|
|
child: RatingBar.readOnly(
|
|
|
|
initialRating: 3,
|
|
|
|
initialRating: productRate,
|
|
|
|
size: 15.0,
|
|
|
|
size: 15.0,
|
|
|
|
filledColor: Colors.yellow[700],
|
|
|
|
filledColor: Colors.yellow[700],
|
|
|
|
emptyColor: Colors.grey[500],
|
|
|
|
emptyColor: Colors.grey[500],
|
|
|
|
@ -94,4 +103,5 @@ productTile() {
|
|
|
|
],
|
|
|
|
],
|
|
|
|
),
|
|
|
|
),
|
|
|
|
);
|
|
|
|
);
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|