Giter VIP home page Giter VIP logo

backslashflutter / email_password_flutter_firebase Goto Github PK

View Code? Open in Web Editor NEW
48.0 48.0 45.0 435 KB

Email and Password Authentication In Flutter & Firebase in Flutter 2.2

Home Page: https://youtu.be/3DO6Th9A7mY

License: Apache License 2.0

Kotlin 0.61% Swift 1.81% Objective-C 0.17% Dart 97.41%
email firebase firebase-auth firebase-database flutter flutter-apps flutter-auth flutter-examples flutter-ui

email_password_flutter_firebase's Introduction

Hi there ๐Ÿ‘‹

Here are some ideas to get you started:

  • ๐Ÿ”ญ Do Check My YouTube Channel Backslash Flutter
  • ๐ŸŒฑ Iโ€™m currently learning Flutter and Android
  • ๐Ÿ‘ฏ Iโ€™m looking to collaborate on open source projects
  • ๐Ÿ“ซ How to reach me: [email protected]

๐Ÿ“Š Github Stats

Most used language

Visitor count

email_password_flutter_firebase's People

Contributors

backslashflutter avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

email_password_flutter_firebase's Issues

web folder

there is no web folder to run the script. as it shows no devices to run eg chrome web or edge

register page has not worked

I have do same as you but in it I fill everything in my text form filed and when I have submitted it so it not post the value to firebase and not save it that is my post method

void signUp(String email, String password) async {
if (_formKey.currentState!.validate()) {
try {
await _auth
.createUserWithEmailAndPassword(email: email, password: password)
.then((value) => {postDetailsToFirestore()})
.catchError((e) {
Fluttertoast.showToast(msg: e!.message);
});
} on FirebaseAuthException catch (error) {
switch (error.code) {
case "invalid-email":
errorMessage = "Your email address appears to be malformed.";
break;
case "wrong-password":
errorMessage = "Your password is wrong.";
break;
case "user-not-found":
errorMessage = "User with this email doesn't exist.";
break;
case "user-disabled":
errorMessage = "User with this email has been disabled.";
break;
case "too-many-requests":
errorMessage = "Too many requests";
break;
case "operation-not-allowed":
errorMessage = "Signing in with Email and Password is not enabled.";
break;
default:
errorMessage = "An undefined Error happened.";
}
Fluttertoast.showToast(msg: errorMessage!);
print(error.code);
}
}
}

postDetailsToFirestore() async {
FirebaseFirestore firebaseFirestore = FirebaseFirestore.instance;
User? user = _auth.currentUser;
UserModel userModel = UserModel();
userModel.email = user!.email;
userModel.uid = user.uid;
userModel.name = nameEditingController.text;
// userModel.no = mobileEditingController.text;
await firebaseFirestore
.collection("users")
.doc(user.uid)
.set(userModel.toMap());
Fluttertoast.showToast(msg: "Account created suscessfully");
Navigator.pushAndRemoveUntil((context),
MaterialPageRoute(builder: (context) => nav()), (route) => false);
}
}

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.