You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
270 lines
12 KiB
Dart
270 lines
12 KiB
Dart
|
5 years ago
|
|
||
|
|
import 'package:flutter/cupertino.dart';
|
||
|
|
import 'package:flutter/material.dart';
|
||
|
|
import 'package:flutter_svg/flutter_svg.dart';
|
||
|
|
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
|
||
|
|
import 'package:diplomaticquarterapp/pages/pharmacy/pharmacyAddresses/AddAddress.dart';
|
||
|
|
|
||
|
|
|
||
|
|
class PharmacyAddressesPage extends StatefulWidget{
|
||
|
|
@override
|
||
|
|
_PharmacyAddressesState createState() => _PharmacyAddressesState();
|
||
|
|
}
|
||
|
|
|
||
|
|
class _PharmacyAddressesState extends State<PharmacyAddressesPage>{
|
||
|
|
|
||
|
|
int selectedRadio;
|
||
|
|
bool _value = false;
|
||
|
|
@override
|
||
|
|
void initState(){
|
||
|
|
super.initState();
|
||
|
|
selectedRadio=0;
|
||
|
|
}
|
||
|
|
setSelectedRadio(int val){
|
||
|
|
setState(() {
|
||
|
|
selectedRadio = val;
|
||
|
|
});
|
||
|
|
}
|
||
|
|
|
||
|
|
Widget build (BuildContext context){
|
||
|
|
return Scaffold(
|
||
|
|
appBar: AppBar(
|
||
|
|
centerTitle: true,
|
||
|
|
title: Text(TranslationBase.of(context).changeAddress, style: TextStyle(color:Colors.white)),
|
||
|
|
backgroundColor: Colors.green,
|
||
|
|
),
|
||
|
|
body: Container(
|
||
|
|
child:SingleChildScrollView(
|
||
|
|
child: Column(
|
||
|
|
children:<Widget>[
|
||
|
|
ListView.builder(
|
||
|
|
scrollDirection: Axis.vertical,
|
||
|
|
shrinkWrap: true,
|
||
|
|
physics: ScrollPhysics(),
|
||
|
|
itemCount: 2 ,
|
||
|
|
itemBuilder: (context, index){
|
||
|
|
return Container(
|
||
|
|
child: Padding(
|
||
|
|
padding:EdgeInsets.only(top:20.0, left:5.0, right:5.0, bottom:5.0,),
|
||
|
|
child: Column(
|
||
|
|
children: [
|
||
|
|
Row(
|
||
|
|
crossAxisAlignment: CrossAxisAlignment.center,
|
||
|
|
children:<Widget> [
|
||
|
|
Column(
|
||
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||
|
|
children:<Widget> [
|
||
|
|
InkWell(
|
||
|
|
onTap: () {
|
||
|
|
setState(() {
|
||
|
|
_value = !_value;
|
||
|
|
});
|
||
|
|
},
|
||
|
|
child: Container(
|
||
|
|
margin: EdgeInsets.only(right: 20),
|
||
|
|
|
||
|
|
child: Padding(
|
||
|
|
padding: const EdgeInsets.all(5.0),
|
||
|
|
child: _value
|
||
|
|
? Container(
|
||
|
|
child: SvgPicture.asset(
|
||
|
|
'assets/images/pharmacy/check_icon.svg',
|
||
|
|
height: 25,
|
||
|
|
width: 25,),
|
||
|
|
)
|
||
|
|
: Container(
|
||
|
|
child: SvgPicture.asset(
|
||
|
|
'assets/images/pharmacy/check_icon.svg',
|
||
|
|
height: 23,
|
||
|
|
width: 23,
|
||
|
|
color: Colors.transparent,
|
||
|
|
),
|
||
|
|
decoration: BoxDecoration(
|
||
|
|
border: Border.all(
|
||
|
|
color: Colors.grey,
|
||
|
|
style: BorderStyle.solid,
|
||
|
|
width: 1.0
|
||
|
|
),
|
||
|
|
color: Colors.transparent,
|
||
|
|
borderRadius: BorderRadius.circular(50.0)
|
||
|
|
),
|
||
|
|
),
|
||
|
|
),
|
||
|
|
),
|
||
|
|
),
|
||
|
|
],
|
||
|
|
),
|
||
|
|
Column(
|
||
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||
|
|
children:<Widget> [
|
||
|
|
Text('NAME',
|
||
|
|
style: TextStyle(fontSize: 15.0, fontWeight: FontWeight.bold,
|
||
|
|
),
|
||
|
|
),
|
||
|
|
SizedBox(
|
||
|
|
height: 5,),
|
||
|
|
Text('Address',
|
||
|
|
style: TextStyle(fontSize: 15.0, color: Colors.grey,
|
||
|
|
),
|
||
|
|
),
|
||
|
|
SizedBox(
|
||
|
|
height: 5,),
|
||
|
|
Row(
|
||
|
|
children:<Widget> [
|
||
|
|
Container(
|
||
|
|
margin: EdgeInsets.only(bottom: 8),
|
||
|
|
child: SvgPicture.asset(
|
||
|
|
'assets/images/pharmacy/mobile_number_icon.svg',
|
||
|
|
height: 13,),
|
||
|
|
),
|
||
|
|
Container(
|
||
|
|
margin: EdgeInsets.only(left: 10, bottom: 8),
|
||
|
|
child: Text('588888778',
|
||
|
|
style: TextStyle(fontSize: 15.0,
|
||
|
|
),
|
||
|
|
),
|
||
|
|
),
|
||
|
|
],
|
||
|
|
),
|
||
|
|
SizedBox(
|
||
|
|
height: 15,),
|
||
|
|
Row(
|
||
|
|
children:<Widget> [
|
||
|
|
Column(
|
||
|
|
children: <Widget> [
|
||
|
|
InkWell(
|
||
|
|
onTap: () {
|
||
|
|
Navigator.push(
|
||
|
|
context,
|
||
|
|
MaterialPageRoute(builder: (context) {
|
||
|
|
return AddAddressPage();
|
||
|
|
}),
|
||
|
|
);
|
||
|
|
},
|
||
|
|
child: Row(
|
||
|
|
children:<Widget> [
|
||
|
|
Container(
|
||
|
|
margin: EdgeInsets.only(right:10, bottom: 15),
|
||
|
|
child: SvgPicture.asset(
|
||
|
|
'assets/images/pharmacy/edit_icon.svg',
|
||
|
|
height: 15,),
|
||
|
|
),
|
||
|
|
Container(
|
||
|
|
margin: EdgeInsets.only(right:5, bottom: 15),
|
||
|
|
padding: EdgeInsets.only(right: 10.0),
|
||
|
|
child: Text(TranslationBase.of(context).edit,
|
||
|
|
style: TextStyle(fontSize: 15.0,
|
||
|
|
color: Colors.blue,
|
||
|
|
),
|
||
|
|
),
|
||
|
|
decoration: BoxDecoration(
|
||
|
|
border: Border(
|
||
|
|
right: BorderSide(
|
||
|
|
color: Colors.grey,
|
||
|
|
width: 1.0,
|
||
|
|
),
|
||
|
|
),
|
||
|
|
),
|
||
|
|
),
|
||
|
|
],
|
||
|
|
),
|
||
|
|
),
|
||
|
|
],
|
||
|
|
),
|
||
|
|
Column(
|
||
|
|
children: <Widget> [
|
||
|
|
InkWell(
|
||
|
|
child: Row(
|
||
|
|
children:<Widget> [
|
||
|
|
Container(
|
||
|
|
margin: EdgeInsets.only(left: 15, right: 10, bottom: 15),
|
||
|
|
child: SvgPicture.asset(
|
||
|
|
'assets/images/pharmacy/delete_red_icon.svg',
|
||
|
|
height: 15,),
|
||
|
|
),
|
||
|
|
Container(
|
||
|
|
margin: EdgeInsets.only(bottom: 15),
|
||
|
|
child: Text(TranslationBase.of(context).delete,
|
||
|
|
style: TextStyle(fontSize: 15.0,
|
||
|
|
color: Colors.redAccent,
|
||
|
|
),
|
||
|
|
),
|
||
|
|
),
|
||
|
|
],
|
||
|
|
),
|
||
|
|
),
|
||
|
|
],
|
||
|
|
)
|
||
|
|
],
|
||
|
|
),
|
||
|
|
],
|
||
|
|
),
|
||
|
|
SizedBox(
|
||
|
|
height: 10,
|
||
|
|
),
|
||
|
|
],
|
||
|
|
),
|
||
|
|
Divider(
|
||
|
|
color: Colors.grey[350],
|
||
|
|
height: 20,
|
||
|
|
thickness: 6,
|
||
|
|
indent: 0,
|
||
|
|
endIndent: 0,
|
||
|
|
),
|
||
|
|
],
|
||
|
|
),
|
||
|
|
),
|
||
|
|
);
|
||
|
|
}
|
||
|
|
),
|
||
|
|
SizedBox(
|
||
|
|
height: 10,
|
||
|
|
),
|
||
|
|
InkWell(
|
||
|
|
onTap: () {
|
||
|
|
Navigator.push(
|
||
|
|
context,
|
||
|
|
MaterialPageRoute(builder: (context) {
|
||
|
|
return AddAddressPage();
|
||
|
|
}),
|
||
|
|
);
|
||
|
|
},
|
||
|
|
child: Container(
|
||
|
|
height: 50.0,
|
||
|
|
color: Colors.transparent,
|
||
|
|
child: Container(
|
||
|
|
decoration: BoxDecoration(
|
||
|
|
border: Border.all(
|
||
|
|
color: Colors.green,
|
||
|
|
style: BorderStyle.solid,
|
||
|
|
width: 1.0
|
||
|
|
),
|
||
|
|
color: Colors.transparent,
|
||
|
|
borderRadius: BorderRadius.circular(5.0)
|
||
|
|
),
|
||
|
|
child: Center(
|
||
|
|
child: Text(
|
||
|
|
TranslationBase.of(context).addAddress,
|
||
|
|
style: TextStyle(
|
||
|
|
color: Colors.green,
|
||
|
|
fontWeight: FontWeight.bold,
|
||
|
|
),
|
||
|
|
),
|
||
|
|
),
|
||
|
|
),
|
||
|
|
),
|
||
|
|
),
|
||
|
|
],
|
||
|
|
),
|
||
|
|
),
|
||
|
|
),
|
||
|
|
);
|
||
|
|
}
|
||
|
|
|
||
|
|
}
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
|