BootConfig class

Configuration for bootstrapping a Nylo application.

Contains the setup and boot functions that are called during Nylo.init(). The setup function initializes the application and returns a Nylo instance. The boot function is called after setup completes to finalize initialization.

Example:

class Boot {
  static BootConfig nylo() {
    return BootConfig(
      setup: () async {
        WidgetsFlutterBinding.ensureInitialized();
        return await setupApplication(providers);
      },
      boot: (Nylo nylo) async {
        await bootFinished(nylo, providers);
        runApp(Main(nylo));
      },
    );
  }
}

Constructors

BootConfig({required Future<Nylo> setup(), required Future<void> boot(Nylo nylo)})
Creates a new BootConfig with the given setup and boot functions.
const

Properties

boot Future<void> Function(Nylo nylo)
Function called after setup completes to finalize initialization.
final
hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
setup Future<Nylo> Function()
Function that initializes the application and returns a Nylo instance.
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited