-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
d36e546
commit 088e042
Showing
31 changed files
with
311 additions
and
88 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -468,4 +468,4 @@ | |
/* End XCConfigurationList section */ | ||
}; | ||
rootObject = 97C146E61CF9000F007C117D /* Project object */; | ||
} | ||
} |
Binary file modified
BIN
+460 KB
(4400%)
ios/Runner/Assets.xcassets/AppIcon.appiconset/[email protected]
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+435 Bytes
(180%)
ios/Runner/Assets.xcassets/AppIcon.appiconset/[email protected]
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+1.39 KB
(210%)
ios/Runner/Assets.xcassets/AppIcon.appiconset/[email protected]
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+3.44 KB
(320%)
ios/Runner/Assets.xcassets/AppIcon.appiconset/[email protected]
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+615 Bytes
(160%)
ios/Runner/Assets.xcassets/AppIcon.appiconset/[email protected]
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+3.1 KB
(290%)
ios/Runner/Assets.xcassets/AppIcon.appiconset/[email protected]
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+7.27 KB
(490%)
ios/Runner/Assets.xcassets/AppIcon.appiconset/[email protected]
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+1.39 KB
(210%)
ios/Runner/Assets.xcassets/AppIcon.appiconset/[email protected]
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+6.05 KB
(430%)
ios/Runner/Assets.xcassets/AppIcon.appiconset/[email protected]
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+13.1 KB
(600%)
ios/Runner/Assets.xcassets/AppIcon.appiconset/[email protected]
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+13.1 KB
(600%)
ios/Runner/Assets.xcassets/AppIcon.appiconset/[email protected]
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+27 KB
(820%)
ios/Runner/Assets.xcassets/AppIcon.appiconset/[email protected]
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+5.51 KB
(400%)
ios/Runner/Assets.xcassets/AppIcon.appiconset/[email protected]
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+20.1 KB
(720%)
ios/Runner/Assets.xcassets/AppIcon.appiconset/[email protected]
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+23.6 KB
(770%)
ios/Runner/Assets.xcassets/AppIcon.appiconset/[email protected]
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,105 @@ | ||
import "package:flutter/material.dart"; | ||
import "package:flutter_icons/flutter_icons.dart"; | ||
import "package:shared_preferences/shared_preferences.dart"; | ||
|
||
import "package:http/http.dart" as http; | ||
import "dart:convert"; | ||
import "package:fluttertoast/fluttertoast.dart"; | ||
|
||
class ForgotPasswordWidget extends StatefulWidget { | ||
const ForgotPasswordWidget({Key? key}) : super(key: key); | ||
|
||
@override | ||
_ForgotPasswordWidgetState createState() => _ForgotPasswordWidgetState(); | ||
} | ||
|
||
class _ForgotPasswordWidgetState extends State<ForgotPasswordWidget> { | ||
String emailAddress = ""; | ||
String password = ""; | ||
|
||
void updatePassword() async { | ||
final SharedPreferences preference = await SharedPreferences.getInstance(); | ||
var changePasswordURI = Uri.parse( | ||
"https://identitytoolkit.googleapis.com/v1/accounts:update?key=AIzaSyDpgSXCIPigSzmvciQnauTbvLfQVOjrH94"); | ||
|
||
var result4 = await http.post(changePasswordURI, | ||
body: json.encode({ | ||
"idToken": preference.getString("idToken").toString(), | ||
"password": password, | ||
"returnSecureToken": false | ||
})); | ||
|
||
print(json.decode(result4.body)); | ||
|
||
Fluttertoast.showToast( | ||
msg: "Password has been Updated!!", | ||
toastLength: Toast.LENGTH_SHORT, | ||
gravity: ToastGravity.BOTTOM, | ||
timeInSecForIosWeb: 1, | ||
backgroundColor: Colors.red, | ||
textColor: Colors.white, | ||
fontSize: 16.0); | ||
Navigator.of(context).pop(); | ||
} | ||
|
||
@override | ||
Widget build(BuildContext context) { | ||
return Scaffold( | ||
appBar: AppBar( | ||
title: Text( | ||
"Set New Password", | ||
), | ||
backgroundColor: Color.fromRGBO(0, 200, 0, 1), | ||
), | ||
body: Container( | ||
width: double.infinity, | ||
padding: EdgeInsets.all(16.0), | ||
child: SingleChildScrollView( | ||
child: Column( | ||
mainAxisAlignment: MainAxisAlignment.center, | ||
crossAxisAlignment: CrossAxisAlignment.center, | ||
children: [ | ||
Image( | ||
image: AssetImage('assets/images/petbottle_logo.png'), | ||
width: 200, | ||
height: 200, | ||
), | ||
Container(margin: EdgeInsets.only(top: 20.0)), | ||
TextFormField( | ||
decoration: InputDecoration( | ||
labelText: "Current Email Address", | ||
prefixIcon: Icon(FlutterIcons.email_check_outline_mco, | ||
color: Color.fromRGBO(0, 200, 0, 1)), | ||
), | ||
keyboardType: TextInputType.emailAddress, | ||
onChanged: (v) { | ||
emailAddress = v; | ||
}, | ||
maxLength: 50, | ||
), | ||
TextField( | ||
decoration: InputDecoration( | ||
labelText: "New Password", | ||
prefixIcon: Icon(FlutterIcons.lock_outline_mdi, | ||
color: Color.fromRGBO(0, 200, 0, 1)), | ||
), | ||
obscureText: true, | ||
onChanged: (v) { | ||
password = v; | ||
}, | ||
maxLength: 30, | ||
), | ||
Container( | ||
margin: EdgeInsets.only(top: 30.0), | ||
child: ElevatedButton( | ||
child: Text("Update Password"), | ||
onPressed: () => updatePassword(), | ||
style: ButtonStyle( | ||
backgroundColor: MaterialStateProperty.all<Color>( | ||
Colors.lightGreen.shade800), | ||
fixedSize: MaterialStateProperty.all( | ||
Size.fromWidth(320))))), | ||
], | ||
)))); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.