You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
69 lines
2.3 KiB
69 lines
2.3 KiB
import 'package:teso/providers/pageAnimations.dart';
|
|
import 'package:teso/Pages/Sub_Pages/@Generic/productDetails.dart';
|
|
import 'package:teso/Classes/API Clasess/Product.dart';
|
|
import 'package:flutter/material.dart';
|
|
import 'package:teso/util/SizeConfig.dart';
|
|
import 'package:teso/util/consts.dart';
|
|
|
|
buildItems(BuildContext context, Product product, double height) {
|
|
return Container(
|
|
margin: EdgeInsets.all(1),
|
|
width: MediaQuery.of(context).size.width * 0.525,
|
|
height: MediaQuery.of(context).size.width * height,
|
|
// decoration: BoxDecoration(
|
|
// borderRadius: BorderRadius.circular(30.0),
|
|
// ),
|
|
child: Hero(
|
|
tag: product.productID,
|
|
child: GestureDetector(
|
|
onTap: () => Navigator.push(
|
|
context,
|
|
PageTransition(
|
|
type: PageTransitionType.fade,
|
|
child: ProductDetails(
|
|
product: product,
|
|
),
|
|
),
|
|
),
|
|
child: Container(
|
|
width: double.infinity,
|
|
height: double.infinity,
|
|
child: Stack(
|
|
children: [
|
|
FadeInImage(
|
|
width: double.infinity,
|
|
height: double.infinity,
|
|
fit: BoxFit.fill,
|
|
image: NetworkImage(productURL + product.productImage),
|
|
placeholder: AssetImage("assets/images/loading.png"),
|
|
),
|
|
Container(
|
|
height: double.infinity,
|
|
width: double.infinity,
|
|
decoration: BoxDecoration(
|
|
color: Color.fromRGBO(0, 0, 0, 0.4),
|
|
),
|
|
child: Align(
|
|
alignment: Alignment.bottomCenter,
|
|
child: Container(
|
|
width: double.infinity,
|
|
margin: EdgeInsets.only(bottom: 40),
|
|
child: Text(
|
|
product.productName.toUpperCase(),
|
|
textAlign: TextAlign.center,
|
|
style: TextStyle(
|
|
color: Colors.white,
|
|
fontSize: SizeConfig.blockSizeHorizontal * 3.5,
|
|
fontWeight: FontWeight.bold,
|
|
),
|
|
),
|
|
),
|
|
),
|
|
),
|
|
],
|
|
),
|
|
),
|
|
),
|
|
),
|
|
);
|
|
}
|
|
|