Commit 2ee279d7 authored by Dasun Madushanka's avatar Dasun Madushanka

update components

parent f3c7fe56
import 'package:flutter/material.dart';
import '../../../constants.dart';
class ProductPoster extends StatelessWidget {
const ProductPoster({
Key key,
@required this.size,
this.image,
}) : super(key: key);
final Size size;
final String image;
@override
Widget build(BuildContext context) {
return Container(
margin: EdgeInsets.symmetric(vertical: kDefaultPadding),
// the height of this container is 80% of our width
height: size.width * 0.8,
child: Stack(
alignment: Alignment.bottomCenter,
children: <Widget>[
Container(
height: size.width * 0.7,
width: size.width * 0.7,
decoration: BoxDecoration(
color: Colors.white,
shape: BoxShape.circle,
),
),
Image.asset(
image,
height: size.width * 0.75,
width: size.width * 0.75,
fit: BoxFit.cover,
),
],
),
);
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment