storefy flutter application
File architecture ( important only ) :
This file contains all functionality associated with authentication like
store tokens and information of the user– etc.
This file contains configuration for dio package.
diois a powerful Http client for Dart, which supports Interceptors, Global configuration, FormData, Request Cancellation, File downloading and more.
This file contains all routes of the application.
This file contains all constants of the application like colors and error messages and more.
Libraries associated with application :
- dio : for handling http requests and responses.
- flutter_svg : which allows painting and displaying Scalable Vector Graphics(svg).
- Provider : is a state management of our application.
- flutter_secure_storage : for handling and storing tokens and user information.
- url_launcher : Flutter plugin for launching a URL. Supports web, phone, SMS, and email schemes.
Code Details :
- when use your android phone in development mode,You face some issues when you want to connect to your laravel backend.
- you need to connect your phone and your mobile in same network.
- launch laravel server with host mode.
- you can read more for more : stackoverflow
- add provider (state management) in your application (red arrow) .
- read the documentation : read now
NOTE : read comments in screenshot
Application screenshot :
if information is not valid 👇🏼:
if information is valid :
forget password :
if email is not valid 👇🏼:
if email is valid 👇🏼:
when click on
delete local storage token.
redirect to start screen.
login automatically :
happens when we close application and token is valid.