Skip to content

NTTVy03/dart-todo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

flutter_todo_app

A new Flutter project.

Getting Started

This project is a starting point for a Flutter application.

A few resources to get you started if this is your first Flutter project:

For help getting started with Flutter development, view the online documentation, which offers tutorials, samples, guidance on mobile development, and a full API reference.

Code code code

Set up

  • Create flutter project:

    • Visual Studio Code
    • F1 -> Flutter: create project
    • Clean project: flutter clean
    • Run code (terminal): flutter run
  • Create a Github Repository:

    • Create repository
    • Init git in terminal
  • Add google services plugin:

    1. android/app/build.gradle: apply plugin: 'com.google.gms.google-services'
    2. android/build.gradle: classpath 'com.google.gms:google-services:4.3.5'
  • Setup Firebase for Flutter project:

Authentication

  • Enable Email/Password option in Firebase/Authentication
  • Add an firebase instance (see commit "Email & Password - Firebase Authentication")

Create Login & SignUp Pages

  • Do something after a 'try...catch...', have to bring it into 'try <>' and 'catch <>'. Not after 'try...catch...'

  • Login & signup with Google

    • Get SHA-1 key (1): Open terminal in /android/gradlew and run ./gradlew signingReport and copy the SHA-1 key
    • Get SHA-1 key (2):
      • Open cmdline in jdk bin: C:\Program Files\Java\jdk-21.0.1\bin
      • Find keystore: C:\Users\Admin.android\debug.keystore
      • Replace keystore in keytool cmd and run: keytool -list -v -keystore C:\Users\Admin.android\debug.keystore -alias androiddebugkey
      • Enter keyword: android
      • Get SHA-1 key
    • Other ways to get SHA-1 key: link 1 or link 2
    • Fix error JAVA_HOME is not set
    • Add GG sign-in package
    • Add service/auth_service.dart: contain GG sign-in method
    • Add GG sign-in method to Sign Up Page
  • Login with Facebook:

  • Keep the user log in:

    • Uninstall the old version of app (login without logout causes issues)
    • Add flutter_secure_storageflutter_secure_storage to store the access token and user data. Make sure that the minimum sdk version is 18 (config in android/app/build.gradle)
    • Create AuthClass, which contains all method to signup, signin, logout and store access token
    • Store the access token in AuthClass after sign in successfully
    • Check if token is null or not to decide which page should be show first (main.dart)
  • Log out:

    • Add a log out icon in the navbar of homepage to test log out function
    • Create a log out method in AuthClass

Cloud Firestore

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors