-
Install Flutter: Follow the instructions on the official Flutter website to install Flutter on your machine.
-
Install Dart: Dart comes with Flutter, but make sure you have the latest version. You can check the version with:
dart --version
Before building the project, you need to install the required dependencies.
-
Navigate to the project directory:
cd path/to/your/mbus/project
-
Install Flutter dependencies:
flutter pub get
MBus uses flutter_functional_widget to write new widgets. This package works by using the build_runner dependency to generate the widget code.
To build the project, first run:
dart run build_runner watch
This will generate the necessary .g.dart files for the project. Do not edit or commit these files.
To use the Google Maps SDK, you will need to create a new project on the Google Cloud Platform and enable the Maps SDK for Android and iOS.
To set your keys for Android, (create and) edit the local.properties
file in the android
directory and define a googlemaps.apiKey
property with your API key.
To set your keys for iOS, create the gmap.xcconfig
file in ios/Flutter
and define a GMAP_API_KEY
property with your API key for the Google Maps SDK.
To set the backend URL, add --dart-define=BACKEND_URL=<URL>
to the flutter run
arguments.
To run the project, use the following command:
flutter run