import 'package:flutter/material.dart'; import 'package:teso/Classes/API Clasess/ProximityCoupon.dart'; Positioned cardDemoDummy( ProximityCoupon img, double bottom, double right, double left, double cardWidth, double rotation, double skew, BuildContext context, String discount, double selectedDiscount) { Size screenSize = MediaQuery.of(context).size; return new Positioned( bottom: 100.0 + bottom, child: new Container( margin: EdgeInsets.all(40), width: screenSize.width * 0.95, height: MediaQuery.of(context).size.height / 2, decoration: BoxDecoration( border: Border.all( color: Colors.white, width: 1, ), borderRadius: BorderRadius.only( topRight: Radius.circular(30), topLeft: Radius.circular(30), bottomLeft: Radius.circular(30), bottomRight: Radius.circular(30), ), ), child: ClipRRect( borderRadius: BorderRadius.only( topLeft: Radius.circular(30.0), topRight: Radius.circular(30.0), bottomLeft: Radius.circular(30), bottomRight: Radius.circular(30), ), child: Material( elevation: 4.0, borderRadius: BorderRadius.circular(12.0), child: new Container( alignment: Alignment.center, width: screenSize.width / 1.2 + cardWidth, height: screenSize.height / 1.7, decoration: new BoxDecoration( color: new Color.fromRGBO(121, 114, 173, 1.0), gradient: LinearGradient( begin: Alignment.topCenter, end: Alignment.bottomCenter, colors: [ Color(0xFFfd0a35), Color(0xFFfea404), ], //stops: [0.1, 0.4, 0.7, 0.8], ), borderRadius: new BorderRadius.circular(30.0), ), child: new Container( width: screenSize.width / 1.2 + cardWidth, height: screenSize.height / 2.1, decoration: BoxDecoration( gradient: LinearGradient( begin: Alignment.topCenter, end: Alignment.bottomCenter, colors: [ Color(0xFFfd0a35), Color(0xFFfea404), ], //stops: [0.1, 0.4, 0.7, 0.8], ), ), child: Column( children: [ Stack( children: [ Align( alignment: Alignment.topCenter, child: Container( width: double.infinity, padding: EdgeInsets.symmetric(horizontal: 15), margin: EdgeInsets.symmetric(vertical: 15), child: Center( child: Text( "Teso Discount Coupon", style: TextStyle( fontSize: 22, color: Colors.white, fontFamily: 'WickedGrit', ), ), ), ), ), Align( alignment: Alignment.topRight, child: Container( decoration: BoxDecoration( color: Colors.white38, borderRadius: BorderRadius.only( topRight: Radius.circular(30), topLeft: Radius.circular(30), bottomLeft: Radius.circular(30), bottomRight: Radius.circular(30), ), ), padding: EdgeInsets.all(10), margin: EdgeInsets.only(right: 20, top: 35), child: Text( selectedDiscount.toString() + "% off", style: TextStyle(fontSize: 18), ), ), ), ], ), Container( margin: EdgeInsets.all(8), width: double.infinity, child: Center( child: Text( img.targetName!, style: TextStyle(fontSize: 18, color: Colors.white), ), ), ), Container( margin: EdgeInsets.all(8), width: double.infinity, child: Center( child: Text( "Item Original Price : " + "GH¢ " + img.targetCost.toString(), style: TextStyle(fontSize: 18, color: Colors.white), ), ), ), Container( margin: EdgeInsets.all(10), width: double.infinity, child: Center( child: Text( "Item Discounted Price : " + "GH¢ " + discount, style: TextStyle(fontSize: 18, color: Colors.white), ), ), ), Container( width: double.infinity, child: new Wrap( direction: Axis.horizontal, children: [ Align( alignment: Alignment.bottomCenter, child: Container( child: Image( height: 80, image: AssetImage( "assets/images/tesoCouponInsignia.png"), ), ), ), ], ), ), ], ), ), ), ), ), ), ); }