Quick Start
Install Fluxy and create your first project in minutes.
Quick Start
Get started with Fluxy v1.2.0 industrial architecture in just a few commands.
Installation
Install the Fluxy CLI globally using Dart. This tool will manage your projects, modules, and generate code for you.
dart pub global activate fluxyCreating a Project
Initialize a new Fluxy project structure. This command sets up the official core/features architecture.
fluxy init my_awesome_appAdding Modules (v1.2.0)
Fluxy v1.2.0 is modular. Add only the features you need using the module command:
# Core framework is always included
# Add specific modules as needed
fluxy module add auth # Authentication & biometrics
fluxy module add camera # Camera functionality
fluxy module add notifications # Push notifications
fluxy module add storage # Data persistence
fluxy module add forms # Forms and validation
fluxy module add analytics # Analytics and trackingWorkspace Management
For modular projects, use Melos to manage your packages:
# 1. Activate Melos
dart pub global activate melos
# 2. Bootstrap workspace
fluxy melos bootstrapYour First App (v1.2.0)
A professional Fluxy application with modular architecture requires initialization. Here is a minimal main.dart setup:
import 'package:flutter/material.dart';
import 'package:fluxy/fluxy.dart';
// Import specific modules if needed
import 'package:fluxy_auth/fluxy_auth.dart';
import 'package:fluxy_storage/fluxy_storage.dart';
void main() async {
// 1. Setup core engine
await Fluxy.init();
// 2. Auto-register all installed modules
Fluxy.autoRegister();
runApp(
FluxyApp(
title: "Hello Fluxy v1.2.0",
initialRoute: FxRoute(
path: "/",
builder: (context, args) => Fx.center(
child: Fx.col([
Fx.text("Hello Fluxy v1.2.0!")
.font.xxl()
.font.bold()
.color(Fx.primary)
.center(),
Fx.text("Modular Architecture")
.font.lg()
.color(FxTokens.colors.muted)
.center(),
Fx.button("Get Started")
.primary
.onTap(() => print("Button clicked!"))
.center()
.mt(4),
]).gap(2),
),
),
),
);
}Using Modular Features
With v1.2.0, you can use modular features like this:
// Using authentication module
Future<void> login() async {
final auth = Fx.platform.auth;
final result = await auth.signIn(email: 'user@example.com', password: 'password');
if (result.success) {
print('Logged in successfully!');
}
}
// Using storage module
Future<void> saveData() async {
final storage = Fx.platform.storage;
await storage.set('user_preference', 'dark_mode');
final preference = await storage.get('user_preference');
print('Preference: $preference');
}
// Using camera module
Future<void> takePhoto() async {
final camera = Fx.platform.camera;
final image = await camera.capture();
print('Photo captured: ${image.path}');
}Package Structure (v1.2.0)
Your pubspec.yaml will look like this:
dependencies:
# Core Framework
fluxy: ^1.2.0
# Modular Packages (add as needed)
fluxy_auth: ^1.2.0 # Authentication & biometrics
fluxy_camera: ^1.2.0 # Camera functionality
fluxy_notifications: ^1.2.0 # Push notifications
fluxy_storage: ^1.2.0 # Data persistence
fluxy_forms: ^1.2.0 # Forms and validation
fluxy_analytics: ^1.2.0 # Analytics and tracking
# ... and 13 more modulesBenefits of v1.2.0
- Smaller Core: Focused & lightweight foundation
- Flexible Dependencies: Add only features you use
- Independent Versioning: Each module evolves separately
- Better Performance: Faster installation and smaller apps
Next Steps
Once your project is set up, explore the core concepts:
- Reactivity: Learn about Flux signals and automatic updates.
- Atomic Styling DSL: Use the
Fxnamespace to build flat UI trees. - Ecosystem: Explore the power of Platform Modules.
- Routing: Set up type-safe navigation with automated controller registration.