Before we start developing our hotkey application, we need to set up the development environment. This chapter will guide you through all the necessary configurations.
Install Flutter SDK
Visit the Flutter official website to download the latest SDK: https://flutter.dev/docs/get-started/install/macos
Extract the downloaded file to your preferred location, for example:
Terminal window cd ~/developmentunzip ~/Downloads/flutter_macos_arm64_3.x.x-stable.zipAdd Flutter to your environment variables by editing
~/.zshrcor~/.bash_profile:Terminal window export PATH="$PATH:~/development/flutter/bin"Run the following command to verify the installation:
Terminal window flutter doctor
Install Xcode
Since we’re developing a macOS application, we need to install Xcode:
Install Xcode from the Mac App Store
After installation, run the following command to accept the license agreement:
Terminal window sudo xcodebuild -license acceptInstall Xcode command-line tools:
Terminal window sudo xcode-select --install
Configure VS Code
Install VS Code: https://code.visualstudio.com/
Install necessary extensions:
- Flutter
- Dart
Enable macOS Desktop Support
Enable macOS desktop support:
Terminal window flutter config --enable-macos-desktopVerify that macOS is in the list of supported platforms:
Terminal window flutter devices
Verify Environment
Run the following command to check if the environment is configured correctly:
flutter doctorEnsure all check items show ✓. If there are any issues, follow the prompts to resolve them.
Common Issues
Slow Flutter SDK Download
- Use a mirror site
- Or use a proxy for downloading
Xcode Installation Failure
- Ensure Mac App Store login is working
- Check network connection
- Ensure sufficient disk space
VS Code Plugin Installation Failure
- Check network connection
- Try using a proxy
Next Step
Once the environment setup is complete, we can proceed to Create Project.
