### Manage Flutter SDK Versions Source: https://docs.flutterflow.io/testing/local-run Commands to manage different Flutter SDK versions. Use 'downgrade' to switch to an older version and 'upgrade --force' to install a specific version. Ensure the version matches FlutterFlow project requirements to avoid compatibility issues. ```bash flutter --version ``` ```bash flutter downgrade ``` ```bash flutter upgrade --force ``` ```bash flutter upgrade ``` -------------------------------- ### App Versioning in pubspec.yaml Source: https://docs.flutterflow.io/deployment/deploy-from-github This example demonstrates how to manually manage app versioning within the `pubspec.yaml` file for Flutter projects. It shows the format for setting both the version name and the build number, which is necessary when deploying from a GitHub branch. ```yaml version: 1.1.0+2 ``` -------------------------------- ### Configure Signing for Release Builds in Android (Gradle) Source: https://docs.flutterflow.io/deployment/deploy-from-github This snippet shows how to configure signing for release builds in your Android project's `build.gradle` file. It includes loading keystore properties from a `key.properties` file and defining the release signing configuration. This is crucial for deploying apps to the Google Play Store. ```gradle def keystoreProperties = new Properties() def keystorePropertiesFile = rootProject.file('key.properties') if (keystorePropertiesFile.exists()) { keystoreProperties.load(new FileInputStream(keystorePropertiesFile)) } signingConfigs { release { keyAlias keystoreProperties['keyAlias'] keyPassword keystoreProperties['keyPassword'] storeFile keystoreProperties['storeFile'] ? file(keystoreProperties['storeFile']) : null storePassword keystoreProperties['storePassword'] } } ``` -------------------------------- ### Run Flutter App in VS Code Source: https://docs.flutterflow.io/testing/local-run Steps to run a Flutter application using Visual Studio Code. This involves fetching project dependencies and executing the app. Output is visible in the VS Code terminal, and the app launches on the selected device or emulator. ```bash flutter pub get ``` ```bash flutter run ``` -------------------------------- ### Custom Action with No Return Value (Dart) Source: https://docs.flutterflow.io/concepts/custom-code/custom-actions This example demonstrates a basic Custom Action in Dart that does not return any specific value. It's suitable for operations that perform an action without needing to pass data back to the action flow. The `async` keyword indicates it's an asynchronous operation. ```dart Future executeSearch(String searchItem) async { // Add your function code here! } ``` -------------------------------- ### Run Flutter App in Android Studio Source: https://docs.flutterflow.io/testing/local-run Instructions for running a Flutter application within Android Studio. This includes fetching dependencies via the terminal and initiating the app build and launch using the IDE's 'Run' button. App status and output are displayed in the 'Run' panel. ```bash flutter pub get ``` -------------------------------- ### Launch Flutter Emulator Source: https://docs.flutterflow.io/testing/local-run This command allows you to launch a specific Flutter emulator using its ID. This is helpful when a device isn't detected and you need to restart or launch an emulator directly. ```bash flutter emulators --launch ```