import 'package:fcs/model/shipment_model.dart'; import 'package:fcs/fcs/common/helpers/theme.dart'; import 'package:fcs/vo/shipping_address.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; import 'package:flutter_icons/flutter_icons.dart'; import 'package:provider/provider.dart'; class ShippingAddressRow extends StatelessWidget { final ShippingAddress shippingAddress; final int index; const ShippingAddressRow({Key key, this.shippingAddress, this.index}) : super(key: key); @override Widget build(BuildContext context) { var shipmentModel = Provider.of(context); return Container( padding: EdgeInsets.only(left: 10, right: 10), child: Column( children: [ Row( children: [ Expanded( child: new Padding( padding: const EdgeInsets.symmetric(vertical: 10.0), child: Row( children: [ // Padding( // padding: EdgeInsets.all(5.0), // child: Icon( // SimpleLineIcons.location_pin, // color: primaryColor, // )), new Column( crossAxisAlignment: CrossAxisAlignment.start, mainAxisAlignment: MainAxisAlignment.start, children: [ Padding( padding: const EdgeInsets.only(left: 8.0), child: new Text( shippingAddress.fullName == null ? '' : shippingAddress.fullName, style: new TextStyle( fontSize: 15.0, color: Colors.black, fontWeight: FontWeight.bold), ), ), Padding( padding: const EdgeInsets.only(left: 8.0), child: new Text( shippingAddress.addressLine1 == null ? '' : shippingAddress.addressLine1, style: new TextStyle( fontSize: 14.0, color: Colors.grey), ), ), Padding( padding: const EdgeInsets.only(left: 8.0), child: new Text( shippingAddress.addressLine2 == null ? '' : shippingAddress.addressLine2, style: new TextStyle( fontSize: 14.0, color: Colors.grey), ), ), Padding( padding: const EdgeInsets.only(left: 8.0), child: new Text( shippingAddress.city == null ? '' : shippingAddress.city, style: new TextStyle( fontSize: 14.0, color: Colors.grey), ), ), Padding( padding: const EdgeInsets.only(left: 8.0), child: new Text( shippingAddress.state == null ? '' : shippingAddress.state, style: new TextStyle( fontSize: 14.0, color: Colors.grey), ), ), Padding( padding: const EdgeInsets.only(left: 8.0), child: new Text( shippingAddress.phoneNumber == null ? '' : "Phone:${shippingAddress.phoneNumber}", style: new TextStyle( fontSize: 14.0, color: Colors.grey), ), ), ], ), ], ), ), ), // IconButton( // padding: EdgeInsets.only(right: 30), // icon: Icon(Icons.delete, color: Colors.black45), // onPressed: null) ], ), index == null ? Container() : index == shipmentModel.shippingAddresses.length - 1 ? Container() : Divider(color: Colors.black) ], ), ); } }