Application Permissions & Dependencies
Last updated
Last updated
All content on this page by eGov Foundation is licensed under a Creative Commons Attribution 4.0 International License.
Make sure the below-mentioned Permissions are Allowed or Accepted:
Internet Access
FileStore Read and Write
Bluetooth connection
Request Packages
Query all packages
punjab-mgramseva/pubspec.yaml at develop · egovernments/punjab-mgramseva
Download the flutter sdk 2.8.1 from Flutter SDK releases
Install Android Studio for setting the IDE.
Open Android Studio, Open plugin preferences (File > Settings > Plugins) and select Marketplace, select the Flutter plugin and click Install as shown in the below image and also click Yes when prompted to install the Dart plugin.
Set the Flutter SDK path in android studio by navigating to (File > Settings > Plugins > Language & Frameworks >>flutter) flutter as shown in the image below.
Add the flutter path to the System path variable for running the flutter commands as shown in the below image.
Open a new terminal and run the flutter doctor command, this will download the respective Dart sdk version, run flutter doctor --android-licenses to accept the android licenses.
The steps below will guide us to run the project in both Web and Mobile 1. Clone the project from Git repo. 2. Open the project in android studio by selecting (File > open), select the flutter project (punjab-mgramseva/frontend/mgramseva) from the cloned path as shown in the image below.
Select the AVD manager from the right side top corner as shown in the image. Now, select any device by tapping on the play button. Thus, the Android studio launches the emulator and the device is auto-selected. There are two modes for running the application - play and debug. Tap on any one of the modes to launch the mgramseva application in the emulator as shown in the image.
Select the chrome option from device selection and tap on the play button. This launches the application on a chrome window.
Note: To resolve cors error follow the steps provided in this link.
Navigate to mgramseva Folder → cd punjab-mgramseva/frontend/mgramseva
.upgrading the version in the pubspec.yml ( version: 1.0.2+3) 1.0.2 => version name (which displayed in playstore)
+3 => version code (increment by +1 every time)
Comment the below line File → link export 'dart:js' show allowInterop, allowInteropCaptureThis;
Executing flutter clean command → flutter clean
Execute the flutter pub get command. → flutter pub get
1. Enable the USB debugging option on your Mobile Phone. (Reference Link )
2. Connect your Phone to the system and enable File transfer.
3. Select the AVD manager(your Phone) from the right side top corner in Android Studio
4. Go to the frontend/mgramseva/utils/execute_integration.sh file and run it.
5. Integration test will start on your device.
Clone the Repo → git clone GitHub - misdwss/punjab-mgramseva
Replace the base Url with Prod Url. File → app.config.dart _baseUrl: window.location.origin + "/", => _baseUrl: "mgramseva "
Download the key-store from the below link https://drive.google.com/file/d/14teTA0nqHaFLEkgg_LCHTcji5cRJDnXR/view?usp=sharing - Restricted link, try another account Add this properties file to the android app folder as shown in below image android → key.properties
Download the google service json from below link google-services.json Add this json file to the android app folder as shown in below image android → app → google-services.json
Build the prod app bundle → flutter build appbundle Kindly check the attached drive link below which includes key-store, version tracker and also updated the version and release date in the sheet. Path → D:\mgramseva_prod\punjab-mgramseva\frontend\mgramseva\build\app\outputs\bundle\release\app-release.aab https://docs.google.com/spreadsheets/d/1aH596FxtPISIlQzxw9jO_Ex1dttpJJvweib2F9nJj9o/edit#gid=0 - Restricted link, try another account