A Flutter mobile application that demonstrates the use of Orbitron fonts across different weights and styles. This app showcases how to integrate custom fonts in Flutter mobile applications with support for both Android and iOS platforms.
- Orbitron Font Integration: Displays all available Orbitron font weights (Regular, Medium, SemiBold, Bold, ExtraBold, Black)
- Interactive Demo: Counter example with futuristic styling
- Cross-platform Support: Works on both Android and iOS
- Modern UI: Dark theme with cyan accents for a sci-fi aesthetic
# Create a development directory (recommended location)
mkdir -p ~/development
cd ~/development
# Download Flutter SDK
curl -o flutter_macos.zip https://storage.googleapis.com/flutter_infra_release/releases/stable/macos/flutter_macos_3.24.5-stable.zip
# Extract Flutter
unzip flutter_macos.zip
rm flutter_macos.zip
# Add Flutter to your PATH permanently
echo 'export PATH="$HOME/development/flutter/bin:$PATH"' >> ~/.zshrc
source ~/.zshrc
# Verify installation
flutter --version
flutter doctorFlutter requires Java 17 or later. Check your Java version:
java -versionIf you need to install or update Java:
# Install Java 17 using Homebrew
brew install openjdk@17
# Set Java 17 as default
echo 'export JAVA_HOME=/opt/homebrew/opt/openjdk@17/libexec/openjdk.jdk/Contents/Home' >> ~/.zshrc
source ~/.zshrc- Download and install Android Studio
- During installation, ensure you install:
- Android SDK
- Android SDK Platform-Tools
- Android Virtual Device (AVD)
- Create at least one Android Virtual Device (AVD) through Tools → AVD Manager
- Install Xcode from the Mac App Store
- Run:
sudo xcode-select --switch /Applications/Xcode.app/Contents/Developer - Accept license:
sudo xcodebuild -license accept - Install CocoaPods:
sudo gem install cocoapods
git clone https://github.com/arktoswb/orbitron-flutter-mobile-example.git
cd orbitron-flutter-mobile-exampleflutter pub getflutter doctorEnsure all checkmarks are green for the platforms you want to target. If you see issues:
- Android toolchain: Make sure Android Studio is installed and SDK licenses are accepted
- Xcode: Install Xcode and accept licenses
- Java version issues: Ensure you have Java 17+ installed
-
Start Android Emulator
# List available AVDs flutter emulators # Launch an emulator (replace with your emulator name) flutter emulators --launch <emulator_id>
Or open Android Studio → Tools → AVD Manager → Click the play button next to your virtual device.
-
Run the App
flutter run
-
Start iOS Simulator
# List available simulators xcrun simctl list devices # Open iOS Simulator open -a Simulator
-
Run the App
flutter run
- Enable Developer Options and USB Debugging on your Android device
- Connect device via USB
- Run:
flutter devicesto verify device is detected - Run:
flutter run
- Connect your iOS device via USB
- Open the project in Xcode:
open ios/Runner.xcworkspace - Set up provisioning profile and signing
- Run from Xcode or use:
flutter run
flutter testflutter build apk --releaseflutter build ios --releaseflutter analyzeThis app uses the Orbitron font family, which includes:
- Regular (400)
- Medium (500)
- SemiBold (600)
- Bold (700)
- ExtraBold (800)
- Black (900)
The fonts are located in the fonts/Orbitron/static/ directory and are configured in pubspec.yaml.
lib/
main.dart # Main application entry point
android/ # Android-specific configuration
ios/ # iOS-specific configuration
fonts/Orbitron/ # Font files
static/ # Static font files (.ttf)
test/ # Unit and widget tests
-
Flutter doctor shows issues
- Follow the suggested fixes from
flutter doctor - Ensure all required SDKs are installed
- Follow the suggested fixes from
-
Java/Gradle compatibility errors
Unsupported class file major version 65- Make sure you have Java 17+ installed
- The project uses Gradle 8.4+ which supports Java 21
- If issues persist, set JAVA_HOME to Java 17:
export JAVA_HOME=/opt/homebrew/opt/openjdk@17/libexec/openjdk.jdk/Contents/Home flutter run
-
Android resource linking failed
error: resource mipmap/ic_launcher not found- The project includes all necessary Android resources
- If you encounter this, try:
flutter clean flutter pub get flutter run
-
Fonts not loading
- Verify font paths in
pubspec.yaml - Run
flutter clean && flutter pub get
- Verify font paths in
-
iOS build issues
- Open
ios/Runner.xcworkspacein Xcode - Check signing and provisioning profiles
- Update iOS deployment target if needed
- Make sure CocoaPods is installed:
sudo gem install cocoapods
- Open
-
Android build issues
- Check
android/app/build.gradlefor correct SDK versions - Ensure Android SDK tools are up to date
- Make sure you have created an Android Virtual Device (AVD)
- Check
- macOS: 10.14 (Mojave) or later
- Disk space: At least 2.8 GB (does not include disk space for IDE/tools)
- Java: OpenJDK 17 or later
- Tools: Git, Android Studio, Xcode (for iOS)
This project is for demonstration purposes. The Orbitron font is licensed under the SIL Open Font License (see fonts/Orbitron/OFL.txt).