Dropezy Storefront mobile app developed in Flutter.
In order to run the app on your local development machine, make sure you have performed these steps:
- Setting up a Github Personal Access Token as described in Developer Onboarding doc. This step is necessary even if you are using SSH keys, because there are dependencies on other Dropezy Dart packages which uses HTTPS connection. (see
pubspec.yaml
) - Perform Firebase Setup and Environment Variables as described below.
- Additionally if you need to test Firebase Auth features, we recommend using Firebase Auth Emulator.
NOTE: to disable Firebase Auth in your development environemnt, see Disabling Firebase Auth.
Create a new project on your Firebase Console for development purposes.
Setup is done using manual installation as described on FlutterFire docs.
- Download
google-services.json
from Dropezy Android App on Firebase Console. - Put the file in
android/app/google-services.json
.
- Download
GoogleService-Info.plist
from Dropezy iOS App on Firebase Console. - Put the file in
ios/GoogleService-Info.plist
. - Create a Xcode Configuration file for Firebase in
Flutter/Firebase.xcconfig
. For quick setup, copyFlutter/Firebase.xcconfig.example
with this command:
cp ./ios/Flutter/Firebase.xcconfig.example ./ios/Flutter/Firebase.xcconfig
Q: Why not use Dart initialization (FlutterFire CLI)?
A: There is an issue with Dart initialization when running on physical iOS device. See this issue.
Environment variables are loaded using flutter_dotenv package.
Create a file named env/.env
in your local repository. This file should not be commited and
is added into .gitignore
.
To quickly setup your local environment, copy the env.example
file with this command:
cp ./env/.env.example ./env/.env
Then make changes as necessary.
In the Flutter App, all references to environment variables are placed in classes inside lib/core/config
directory
and divided according to their domain for easier maintenance.
We have set up Git hooks to prevent extra whitespace and other possible mistakes before pushing the code to your branch. Run the below command in the project root directory to copy the pre-push hooks to your local .git
directory.
cp ./hooks/pre-push.example ./.git/hooks/pre-push
Please add any resource to the appropriate file in res
folder and use your variable via importing package:storefront_app/core/utils/build_context.ext.dart
. Example usage of string will be context.res.strings.superEasyWithDropezy
To update the icons font with a new svg, go to FlutterIcons
- Appended to the
Download
button is a settings button, tap that and chooseImport
. - Browse to your project folder and choose the config.json file that contains the font configuration. That should restore the existing font.
- Drag your svg to the
Custom Icons
section then select it. - Switch to the names tab right next to the icons tab.
- Give your icon an appropriate name then
Download
- Replace the corresponding config.json ,Dropezy.ttf and dropezy_icons.dart files in the project.
- Use your new icon
Note I : If the icon preview in FlutterIcons is not how you expect the icon to look, reach out to the design team to help flatten the svg or use inkscape to do it.
Note II :All icons have a default padding set by the figma
IconSystem
which ensures they fit square bounds.
Note III :Icons can be previewed here.