Get started with Hux UI in your Flutter project
Before installing Hux UI, ensure your development environment meets these requirements:
Flutter SDK
Flutter 3.16.0 or higher
Dart SDK
Dart 3.0.0 or higher (included with Flutter)
Platform Support
Add Hux UI to your Flutter project using the command line:
This will automatically add the latest version of Hux UI to your pubspec.yaml
file and run flutter pub get
.
Alternatively, you can manually add Hux UI to your pubspec.yaml
file:
Then run:
Import Hux UI in your Dart files where you want to use the components:
This single import gives you access to all Hux UI components and utilities.
Wrap your MaterialApp
with Hux UI themes for the best experience:
You’re now ready to use Hux UI components in your app:
To verify that Hux UI is properly installed and working:
Ensure these dependencies are listed in your pubspec.yaml
:
Create a simple test to verify the import:
Start your Flutter app:
If you see Hux UI components rendering correctly, the installation is complete!
Dependency Conflicts
If you encounter dependency conflicts, try:
Check for version conflicts with other packages in your pubspec.yaml
.
Import Errors
If you get import errors:
import 'package:hux/hux.dart';
pubspec.yaml
flutter pub get
to fetch dependenciesTheme Issues
If themes aren’t working correctly:
HuxTheme.lightTheme
and HuxTheme.darkTheme
MaterialApp
is properly configuredMaterialApp
contextPlatform Specific Issues
For web applications, ensure you have the latest Flutter web support:
For desktop platforms:
Now that Hux UI is installed, you can:
Learn the basics with our quickstart guide
Discover all available UI components
Customize themes and design tokens
See practical implementation examples