Before you can run the app, you need to ensure you have the following installed:
- Flutter SDK (Version: 3.10.0 or higher)
- Dart SDK (Version: 3.4.0 or higher)
- Android Studio or Visual Studio Code for IDE (with Flutter plugin)
- Xcode (for iOS development on Mac)
- Android SDK
First, clone the repository to your local machine using the following command:
git clone https://github.com/your-username/your-flutter-project.git
cd your-flutter-projectInstall the required Flutter packages:
flutter pub getMake sure you have a connected device or emulator running:
- For Android, start an Android emulator using Android Studio.
- For iOS, start an iOS simulator or connect an iPhone (on macOS only).
You can check if Flutter detects your device by running:
flutter devicesTo test in Starknet Sepolia, set the environment variable in lib.env.dart build to DEBUG.
'build': 'DEBUG', // Modify this line
To run the app on your connected device or emulator, use:
flutter runFor running on a specific device (e.g., iOS, Android):
flutter run -d <device_id>Replace <device_id> with the ID of the device shown by the flutter devices command.
To build an APK for Android, run:
flutter build apk --releaseThe APK will be generated in the build/app/outputs/flutter-apk directory.
To build the app for iOS, you will need to open the iOS project in Xcode:
open ios/Runner.xcworkspaceFrom Xcode, configure signing, then build and run the app.
To run all tests, use the command
flutter testTo run a specific test file, use
flutter test [PATH TO TEST FILE]-
Cleaning the project:
Clean up build files and other cache:flutter clean
If you encounter issues, try these common fixes:
-
Ensure Packages are up to date:
flutter pub upgrade
-
Ensure Flutter and Dart SDKs are up to date:
flutter upgrade
-
Run doctor to check for setup issues:
flutter doctor