Skip to content

Commit

Permalink
Updated
Browse files Browse the repository at this point in the history
  • Loading branch information
Charunirathnayake committed Jan 24, 2020
1 parent 20183d2 commit cc6d80d
Showing 1 changed file with 15 additions and 8 deletions.
23 changes: 15 additions & 8 deletions miniproject/lib/app_screen/guideprofile.dart
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,8 @@ class Myprofile extends StatefulWidget {
class Myprofile_State extends State<Myprofile> {
File _image;

String name, address, city, passion, phonenumber, email;
String name, address, city, passion,email;
String phonenumber;

getName(name) {
this.name = name;
Expand All @@ -224,7 +225,7 @@ class Myprofile_State extends State<Myprofile> {
this.email = email;
}

int mygendertype;
int mygendertype;
String gendervalue;
void _handlegendertype(int value) {
setState(() {
Expand All @@ -240,15 +241,15 @@ class Myprofile_State extends State<Myprofile> {
}

createData(){
DocumentReference ds=Firestore.instance.collection('profiledata').document(name);
DocumentReference ds=Firestore.instance.collection('profiledata').document(email);
Map<String,dynamic> tasks={
"name":name,
"address":address,
"city":city,
"passion":passion,
"phonenumber":phonenumber,
"email":email,
"gendervalue":gendervalue
"gendervalue":gendervalue,

};
ds.setData(tasks).whenComplete((){
Expand Down Expand Up @@ -471,7 +472,7 @@ print('New data added.');
Radio(
value: 2,
groupValue: mygendertype,
onChanged: _handlegendertype
onChanged: _handlegendertype,
)
],
)
Expand Down Expand Up @@ -516,7 +517,9 @@ print('New data added.');
const EdgeInsets.only(left: 10.0, right: 10.0, top: 11.0),
child: Container(
height: 40.0,
child: TextFormField(),
child: TextFormField(
onChanged: (String passion){getPassion(passion);}
),
),
)
],
Expand All @@ -535,7 +538,9 @@ print('New data added.');
padding: const EdgeInsets.only(left: 10.0, right: 10.0),
child: Container(
height: 50.0,
child: TextFormField(),
child: TextFormField(
onChanged: (String phonenumber){getPhonenumber(phonenumber);}
),
),
)
],
Expand All @@ -557,7 +562,9 @@ print('New data added.');
padding: const EdgeInsets.only(left: 10.0, right: 10.0),
child: Container(
height: 50.0,
child: TextFormField(),
child: TextFormField(
onChanged: (String email){getEmail(email);}
),
),
)
],
Expand Down

0 comments on commit cc6d80d

Please sign in to comment.