Skip to main content
Wire NeoApp into main.dart as part of installing Neo. An agent can do the same with /create-neo-project.
Placement Note: While currently categorized under utilities, NeoApp may be reorganized into a more appropriate category in future releases as we refine our documentation structure and terminology.

Example

Properties

Required

String
required
The title of the application. Used by the operating system to identify your app (e.g., in the task switcher) and as the browser tab title on web platforms.
RouterConfig<Object>
required
The router configuration for navigation. Typically an AutoRouter configuration from the auto_route package that defines your app’s routes and navigation structure.

Theming

NeoThemeMode
default:"NeoThemeMode.system"
The initial theme mode to use when the app starts.
NeoTheme
default:"NeoTheme.light()"
Custom light theme to use instead of the default Neo light theme.
NeoTheme
default:"NeoTheme.dark()"
Custom dark theme to use instead of the default Neo dark theme.

Config

NeoConfig?
Optional framework config seeded before the first frame. See NeoConfig.

Enums

NeoThemeMode

Controls how the app determines which theme to use.
  • system: Automatically switches between light and dark themes based on the device’s system setting. Responds to system-level theme changes in real-time.
  • light: Always uses the light theme regardless of system settings.
  • dark: Always uses the dark theme regardless of system settings.

Best Practices

  • Riverpod Required: NeoApp requires ProviderScope as an ancestor widget for state management. Wrap your app with ProviderScope in your main() function.
  • Seed lightTheme / darkTheme / config on NeoApp so the first frame resolves your intended theme and config without a flash.

Integration Notes

  • Initialization: NeoApp works with NeoInitializer.initialize() to properly set up the Neo framework before the app starts.
  • CupertinoTheme brightness follows the active Neo theme (theme.isDark).
Last modified on September 17, 2026