Flutter beta Quick Start
Welcome to the Flutter Quick Start Guide! This guide will help you clone, set up, and run the Ditto Demo Flutter Application from a public GitHub repository.
By the end of this quick start, you will have successfully run the Ditto Task Application on either iOS, Android, or both, and will be able to sync data without needing an internet connection.
Installed code editor (preferably Visual Studio Code or Android Studio)
Flutter SDK installed on your machine
Git installed on your machine
Ditto Portal account with a Ditto Application (see Getting Playground Token Credentials)
For Android development:
Android Studio installed on your machine
A physical Android device or Android emulator
For iOS development:
macOS with the latest version of Xcode installed
A physical iOS device or iOS simulator
- Clone the repository from GitHub. Open a terminal and run the following command:
- Navigate to the project directory:
- Install the necessary dependencies.
This command will fetch all the dependencies listed in the pubspec.yaml file.
- Navigate to your application and obtain the App ID and Playground Token (see Getting Playground Token Credentials for more details)
- Open the lib/main.dart file or the appropriate configuration file where Ditto is initialized
- Update the code with the App ID and Playground Token from your Ditto Application
- Ensure you have an Android Emulator running or connect a physical device
- Run the following command in the terminal from the root of the application
- Select the Android Emulator/Device
- Ensure you have an iOS Simulator running or connect a physical iOS device
- Run the following command in the terminal and select the iOS Simulator/Device
- Select the iOS Simulator/Device
- Launch the application on multiple devices, emulators, or simulators
- Disconnect from your current WiFi network while keeping WiFi enabled on the device to allow for LAN connections
- Note: Android Emulators and iOS Simulators can only form offline connections with each other due to platform limitations
- Create new Tasks and update the Done status of existing tasks