air_framework 1.0.0 copy "air_framework: ^1.0.0" to clipboard
air_framework: ^1.0.0 copied to clipboard

A modular, reactive, and scalable framework for Flutter. Build industrial-grade apps with a decoupled architecture.

example/lib/main.dart

import 'package:air_framework/air_framework.dart';
import 'package:flutter/material.dart';

import 'app.dart';
import 'modules/dashboard/dashboard_module.dart';
import 'modules/notes/notes_module.dart';
import 'modules/shell/shell_module.dart';
import 'modules/weather/weather_module.dart';

/// Entry point for AirNotes Pro - Air Framework Example App
///
/// This example demonstrates:
/// - Module registration and lifecycle (onBind/onInit)
/// - Dependency injection with AirDI
/// - Reactive state management with @GenerateState
/// - Cross-module communication via EventBus
/// - Routing with AirRouter
/// - DevTools integration
void main() async {
  WidgetsFlutterBinding.ensureInitialized();

  // Configure Air State for reactive state management
  configureAirState();

  // Register all modules
  // Order matters: register dependencies before dependents
  final manager = ModuleManager();

  // Core modules
  await manager.register(NotesModule());
  await manager.register(WeatherModule());

  // Composite modules that may depend on others
  await manager.register(DashboardModule());

  // Shell module for navigation
  await manager.register(ShellModule());

  runApp(const AirNotesApp());
}
0
likes
160
points
48
downloads

Publisher

unverified uploader

Weekly Downloads

A modular, reactive, and scalable framework for Flutter. Build industrial-grade apps with a decoupled architecture.

Repository (GitHub)
View/report issues

Topics

#flutter #framework #state-management #modular #architecture

Documentation

API reference

License

MIT (license)

Dependencies

air_state, archive, cupertino_icons, flutter, go_router, path

More

Packages that depend on air_framework