import 'package:car_for_her/config/palette.dart'; import 'package:flutter/material.dart'; import 'package:flutter_svg/flutter_svg.dart'; class AcceptRefuseClient extends StatefulWidget { const AcceptRefuseClient({Key key}) : super(key: key); @override _AcceptRefuseClientState createState() => _AcceptRefuseClientState(); } class _AcceptRefuseClientState extends State { double _height=270; bool isShown=true; @override Widget build(BuildContext context) { return Expanded( child: Column( crossAxisAlignment: CrossAxisAlignment.stretch, mainAxisSize: MainAxisSize.max, mainAxisAlignment: MainAxisAlignment.end, children: [ Dismissible( direction: DismissDirection.startToEnd, onDismissed: (_){ setState(() { isShown=false; }); }, key: UniqueKey(), child: isShown?AnimatedContainer( curve: Curves.easeOut, duration: Duration(milliseconds: 500), child: Padding( padding: const EdgeInsets.fromLTRB(0, 30, 0, 0), child: isShown?Row( mainAxisAlignment: MainAxisAlignment.center, crossAxisAlignment: CrossAxisAlignment.stretch, children: [ Column( mainAxisAlignment:MainAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.center, children: [ CircleAvatar(foregroundImage: AssetImage("assets/images/avatar.png"),), SizedBox(height: 20,), SvgPicture.asset('assets/icons/destination.svg',height: 110,), ], ), SizedBox( width: 12, ), Column( mainAxisAlignment: MainAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start, children: [ Row( children: [ Column( crossAxisAlignment: CrossAxisAlignment.start, mainAxisAlignment: MainAxisAlignment.start, children: [ Text("Aymen Sbei",style: TextStyle(fontSize: 18,fontFamily: '',fontWeight: FontWeight.bold),), SizedBox( height: 5, ), Text("7 days (12-09-2020 19-09-2020)",style: TextStyle(fontSize: 11,fontWeight: FontWeight.bold,fontFamily: ''),), ], ), SizedBox( width: 18, ), Column( crossAxisAlignment: CrossAxisAlignment.end, mainAxisAlignment: MainAxisAlignment.start, children: [ Text("\$44.15",style: TextStyle(fontFamily: '',fontWeight: FontWeight.bold,fontSize: 18),), SizedBox( height: 5, ), Text("4.2 Km",style: TextStyle(fontFamily: '',fontWeight: FontWeight.bold,fontSize: 18,color: Color.fromRGBO(0, 0, 0, 0.5)),), ], ), ], ), SizedBox( height: 15, ), Column( mainAxisAlignment: MainAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start, children: [ Text('Pickup point',style: TextStyle(fontFamily: '',color: Color.fromRGBO(0, 0, 0, 0.7),fontWeight: FontWeight.w500,fontSize: 16),), SizedBox( height: 5, ), Text('Address position',style: TextStyle(fontFamily: '',fontWeight: FontWeight.w500,fontSize: 18),), SizedBox( height: 10, ), Container( color: Color.fromRGBO(0, 0, 0, 0.5), height: 1, width: 230, ), SizedBox( height: 10, ), Text('Pickup point',style: TextStyle(fontFamily: '',color: Color.fromRGBO(0, 0, 0, 0.7),fontWeight: FontWeight.w500,fontSize: 16),), SizedBox( height: 5, ), Text('Address position',style: TextStyle(fontFamily: '',fontWeight: FontWeight.w500,fontSize: 18),), SizedBox( height: 10, ), Row( children: [ Container( height:35, width: 100, decoration: BoxDecoration(color: Palette.primary,border: Border.all(color:Palette.primary)), child: TextButton(onPressed: (){},child: Text('Accept',style: TextStyle(color: Colors.white,fontFamily: 'MontExtraLight',fontWeight: FontWeight.bold ),),), ), SizedBox( width: 10, ), Container( height:35, width: 100, decoration: BoxDecoration( border: Border.all(color: Colors.black) ), child: TextButton(onPressed: (){},child: Text('Decline',style: TextStyle(color: Colors.black,fontFamily: 'MontExtraLight',fontWeight: FontWeight.bold ),),), ), ], ), ], ) ], ), ], ):Container(), ), decoration: BoxDecoration( color: Colors.white, borderRadius: BorderRadius.only(topLeft: Radius.circular(50),topRight: Radius.circular(50)) ), height: _height, width:double.maxFinite, ):SizedBox(), ), ], ), ) ; } }