-
Install Flutter
Follow the official Flutter installation guide to set up Flutter in your environment.- For VS Code users:
- Add the Flutter extension to your editor.
- Configure the Flutter SDK path in the environment variables.
- For VS Code users:
-
Clone the Repository
Navigate to the project folder and clone the repository:
(Repository URL to be added) -
Configure Base URL
Openlib/services/api_services_baseUrl.dart
and update thebaseUrl
to your server's URL. -
Install Dependencies
Run the following command to install dependencies:flutter pub get
-
Start the App
Use the following command to start the app:flutter run
- You will be prompted to select the device to run the app on.
Note:
- If testing on a physical phone:
- Enable Developer Options > USB Debugging on your phone.
- Allow installation via USB.
- If using an emulator, set it up in Android Studio or Xcode.
-
Locate APK Files
- Debug APK: After a successful build, find it at:
build/app/outputs/apk/debug/app-debug.apk
- Release APK: Build the release version using:
Output:
flutter build apk --release
build/app/outputs/flutter-apk/app-release.apk
- Debug APK: After a successful build, find it at:
You can rename the "sampleEnv" file in the folder to .env or create a .env
file in the app's root directory to configure app credentials. Make sure to fill in with your respective endpoint credentials Add the following parameters:
SERVER_URL='https://your_server_url'
ACCESS_ENCODE='84724' # Replace with your access-code encoder value
BOX_ID='--' # Replace with the respective box ID
PHONE_NUMBER = '----------' //Add you business whatsapp number with instructions for sharing the app
The app's code follows this structure:
- lib/data: Database-related code.
- lib/enums: Enum values used throughout the app.
- lib/models: Models for assignments and checkbox status.
- lib/providers: Listeners for recorders, players, and checkboxes.
- lib/screens: Screens for navigation (microtask screens are in the
microtask
folder). - lib/services: API calls and server-related functions.
- lib/utils: Helper functions reused across tasks.
- lib/widgets: Common widgets (e.g., players, recorders, cards).
- database:
- dao: Data access objects to interact with database tables.
- models: Table structures.
- repo: Repositories for managing JSON data.
- utility: Utilities like JSON-to-object conversion.
- manager: Contains
karya_db
, which handles tables and DAOs.
- All assets and metadata are stored in the
assets
folder.
Note: Files with the .g.dart
extension are autogenerated. Do not edit them directly. To regenerate these files after changes, run:
flutter pub run build_runner build
Below are the external plugins used in the app:
cupertino_icons: ^1.0.6
fluttertoast: ^8.2.6
path: ^1.9.0
path_provider: ^2.1.4
drift: ^2.15.0
drift_flutter: ^0.1.0
file_picker: ^8.0.6
flutter_sound: ^9.9.5
provider: ^6.1.2
json_annotation: ^4.9.0
permission_handler: ^11.3.1
dio: ^5.5.0+1
shared_preferences: ^2.3.2
archive: ^3.6.1
crypto: ^3.0.5
audio_session: ^0.1.21
just_audio: ^0.9.28
video_player: ^2.9.2
chewie: ^1.8.5
camera: ^0.11.0+2
url_launcher: ^6.3.1
android_play_install_referrer: ^0.4.0
firebase_core: ^3.7.0
firebase_crashlytics: ^4.1.4
flutter_test:
sdk: flutter
flutter_lints: ^3.0.0
build_runner: ^2.4.11
drift_dev: ^2.19.1
flutter_launcher_icons: ^0.14.1