storefy flutter application

File architecture ( important only ) :

  • libservicesauthServices.dart

    This file contains all functionality associated with authentication like loginreset passwordverify tokenstore tokens and information of the user – etc.

  • libservicesdio.dart

    This file contains configuration for dio package.

    dio is a powerful Http client for Dart, which supports Interceptors, Global configuration, FormData, Request Cancellation, File downloading and more.

  • libroutes.dart

    This file contains all routes of the application.

  • libconstants.dart

    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 :

  • libservicesdio.dart
  • 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.
  • libmain.dart
  • add provider (state management) in your application (red arrow) .
  • libscreenssign_incomponentssign_form.dart

  • libscreensforget_passwordcomponentssign_form.dart

  • libscreenssplashcomponentsbody.dart

NOTE : read comments in screenshot

Application screenshot :

login :

if information is not valid 👇🏼:

if information is valid :

forget password :

if email is not valid 👇🏼:

if email is  valid 👇🏼:

logout :

  • when click on log Out

    delete local storage token.

    redirect to start screen.

login automatically :

happens when we close application and token is valid.


View Github

Entradas similares

Deja una respuesta