orbital 0.2.2 copy "orbital: ^0.2.2" to clipboard
orbital: ^0.2.2 copied to clipboard

Full Orbital package that reexports core, injector, router and state.

orbital #

Convenience bundle that reexports the full Orbital runtime from a single import.

When to use this package #

Use orbital when you want:

  • one import for core contracts, injector, router and state
  • the default scope runtime available immediately
  • the convenience enableOrbitalDevtools(...) wrapper in the same package
import 'package:orbital/orbital.dart';

Choose the individual packages when you want tighter dependency boundaries:

  • orbital_core for contracts, logging and debug primitives
  • orbital_injector for scope trees without Flutter routing
  • orbital_router for Flutter navigation on top of Orbital scopes
  • orbital_state for the reactive StateMixin<T> on OrbitalLifecycle objects
  • orbital_devtools for the Flutter DevTools extension UI

Quick start #

final logger = OrbitalLogger();
enableOrbitalDevtools(logger: logger, appId: 'my-app');
final router = OrbitalRouter(
  logger: logger,
  scopeFactory: const DefaultOrbitalScopeFactory(),
  initialUri: Uri.parse('/'),
  modules: [
    OrbitalModule(
      path: '/',
      routes: [
        OrbitalPageRoute(
          path: '/',
          builder: (context, routeContext) => const HomePage(),
        ),
      ],
    ),
  ],
);

MaterialApp.router(
  routerConfig: router,
);

Installing the DevTools extension #

Flutter DevTools discovers package extensions from the app package config. Add orbital_devtools to the app's dev_dependencies so the Orbital tab appears while debugging:

dev_dependencies:
  orbital_devtools: ^0.2.1

Then enable the runtime bridge in debug builds:

final logger = OrbitalLogger();
enableOrbitalDevtools(logger: logger, appId: 'my-app');

What the bundle reexports #

  • all public APIs from orbital_core
  • all public APIs from orbital_injector
  • all public APIs from orbital_router
  • all public APIs from orbital_state
  • enableOrbitalDevtools(...), a convenience wrapper around OrbitalDebugBridge.enable(...)

Design intent #

The bundle adds almost no new runtime behavior. Its value is ergonomic:

  • single-import app bootstrapping
  • aligned versions of the Orbital packages
  • one obvious entrypoint for example apps and app-level tests

The underlying behavior still lives in the granular packages.

More detail #

See doc.md for package relationships, lifecycle flow and when to use the bundle versus granular imports.

0
likes
0
points
443
downloads

Publisher

unverified uploader

Weekly Downloads

Full Orbital package that reexports core, injector, router and state.

Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

flutter, orbital_core, orbital_injector, orbital_router, orbital_state

More

Packages that depend on orbital