Nylo  class 
 
 
    
    
  
    Constructors 
    
        
          Nylo ({NyRouter ?  router , bool   useNyRouteObserver  = true  }) 
         
        
          Create a new Nylo instance.
         
     
   
    
  
    
  
    Methods 
    
        
  addApiDecoders (Map <Type  , dynamic >   apiDecoders  )
    → void 
   
  
 
  Set API decoders
  
 
        
  addAuthKey (String   key  )
    → void 
   
  
 
  Add an auth key to the Nylo instance
  
 
        
  addControllers (Map <Type  , dynamic >   controllers  )
    → void 
   
  
 
  Add Controllers to your Nylo project.
  
 
        
  addEventBus ({int   maxHistoryLength  = 10 , bool   allowLogging  = false  })
    → void 
    
  
 
  Add an EventBus  to your Nylo project.
  
 
        
  addEvents (Map <Type  , NyEvent  >   events  )
    → Future <void >  
   
  
 
  Add events to Nylo
  
 
        
  addFormCasts (Map <String  , dynamic >   formTypes  )
    → void 
   
  
 
  Add form casts to Nylo
  
 
        
  addFormStyle (NyFormStyle   formStyle  )
    → void 
   
  
 
  Set the form style
  
 
        
  addLoader (Widget   appLoader  )
    → void 
   
  
 
  Add appLoader
  
 
        
  addLogo (Widget   appLogo  )
    → void 
   
  
 
  Add appLogo
  
 
        
  addModelDecoders (Map <Type  , dynamic >   modelDecoders  )
    → void 
   
  
 
  Add modelDecoders to Nylo
  
 
        
  addNavigatorObserver (NavigatorObserver   observer  )
    → void 
   
  
 
  Add a navigator observer.
  
 
        
  addRouter (NyRouter   router  )
    → Future <void >  
   
  
 
  Allows you to add additional Router's to your project.
  
 
        
  addThemes <T extends BaseColorStyles  > (List <BaseThemeConfig <T >  >   themes  )
    → void 
   
  
 
  Add themes to Nylo
  
 
        
  addToastNotification (Widget   toastNotification ({Function ?  onDismiss , required  ToastNotificationStyleType   style , dynamic  toastNotificationStyleMeta (ToastNotificationStyleMetaHelper   helper  )? }) )
    → void 
   
  
 
  Add toast notification
  
 
        
  addValidationRules (Map <String  , dynamic >   validators  )
    → void 
   
  
 
  Add validators to Nylo
  
 
        
  broadcastEvents ([bool   broadcast  = true  ])
    → void 
    
  
 
  Set if you want to broadcast all events
  
 
        
  getApiDecoders ()
    → Map <Type  , NyApiService  Function()  >  
    
  
 
  Get API decoders
  
 
        
  getAuthKey ()
    → String ? 
    
  
 
  Get the auth key
  
 
        
  getController (dynamic  controller  )
    → dynamic 
   
  
 
  Find a controller
  
 
        
  getEvent (Type   event  )
    → NyEvent ? 
   
  
 
  Return an event.
  
 
        
  getEvents ()
    → Map <Type  , NyEvent  >  
    
  
 
  Return all the registered events.
  
 
        
  getFormCasts ()
    → Map <String  , dynamic >  
    
  
 
  Get form types from Nylo
  
 
        
  getFormStyle ()
    → NyFormStyle ? 
    
  
 
  Get the form style
  
 
        
  getInitializationSettings ()
    → InitializationSettings? 
    
  
 
  Get initialization settings
  
 
        
  getInitialRoute ()
    → String  
    
  
 
  Get the initial route.
  
 
        
  getLocalNotifications ()
    → FlutterLocalNotificationsPlugin? 
    
  
 
  Get local notifications
  
 
        
  getModelDecoders ()
    → Map <Type  , dynamic >  
    
  
 
  Return all the registered events.
  
 
        
  getNavigatorObservers ()
    → List <NavigatorObserver  >  
    
  
 
  Return all the registered navigator observers.
  
 
        
  getOnDidReceiveBackgroundNotificationResponse ()
    → dynamic Function(NotificationResponse  notificationResponse  ) ? 
    
  
 
  Get on did receive background notification response
  
 
        
  getOnDidReceiveNotificationResponse ()
    → dynamic Function(NotificationResponse  notificationResponse  ) ? 
    
  
 
  Get on did receive notification response
  
 
        
  getValidationRules ()
    → Map <String  , dynamic >  
    
  
 
  Get validators from Nylo
  
 
        
  initializeLocalNotifications ()
    → Future <bool ? > ? 
    
  
 
  Initialize local notifications
  
 
        
  initRoutes ({String ?  initialRoute  })
    → void 
    
  
 
  Initialize routes
  
 
        
  monitorAppUsage ()
    → void 
    
  
 
  Set if the app should monitor app usage like:
  
 
        
  noSuchMethod (Invocation   invocation  )
    → dynamic 
   
  
 
  Invoked when a nonexistent method or property is accessed.
  inherited 
 
        
  onDeepLink (dynamic  callback (String   route , dynamic  data  ) )
    → void 
   
  
 
  Set the deep link action.
e.g. nylo.onDeepLink((route, data) {
print("Deep link route: $route");
print("Deep link data: $data");
});
  
 
        
  removeNavigatorObserver (NavigatorObserver   observer  )
    → void 
   
  
 
  Remove a navigator observer.
  
 
        
  setInitialRoute (String   routeName  )
    → void 
   
  
 
  Set the initial route from a routeName.
  
 
        
  setLocalNotifications (FlutterLocalNotificationsPlugin  localNotifications  )
    → void 
   
  
 
  Set local notifications
  
 
        
  shouldBroadcastEvents ()
    → bool  
    
  
 
  Check if the app should broadcast events
  
 
        
  shouldMonitorAppUsage ()
    → bool  
    
  
 
  Check if the app should monitor app usage
  
 
        
  shouldShowDateTimeInLogs ()
    → bool  
    
  
 
  Check if the app should show date time in logs
  
 
        
  showDateTimeInLogs ()
    → void 
    
  
 
  Show date time in logs
  
 
        
  syncKeys (dynamic  keys  )
    → Future <void >  
   
  
 
  Sync keys to the backpack instance.
  
 
        
  syncToBackpack (String   key , dynamic  data  )
    → Future <void >  
   
  
 
  Sync a model to the backpack instance.
  
 
        
  toString ()
    → String  
    
  
 
  A string representation of this object.
  inherited 
 
        
  useErrorStack ({ErrorStackLogLevel  level  = ErrorStackLogLevel.verbose , Widget   errorWidget (FlutterErrorDetails   errorDetails  )? })
    → void 
    
  
 
  Use ErrorStack
level is the log level for ErrorStack
errorWidget is a custom error widget
  
 
        
  useLocalNotifications ({DarwinInitializationSettings?  iosSettings , AndroidInitializationSettings?  androidSettings , LinuxInitializationSettings?  linuxSettings , dynamic  onDidReceiveLocalNotification (NotificationResponse  details  )?, dynamic  onDidReceiveBackgroundNotificationResponse (NotificationResponse  details  )? })
    → void 
    
  
 
  Use local notifications
  
 
        
  wipeStorage ()
    → Future <void >  
    
  
 
  Wipe all storage data
  
 
     
   
    
  
    
  
    Static Properties 
    
        
  instance  
  → Nylo  
  
 
  Get Nylo from Backpack
  no setter 
 
     
   
    
  
    Static Methods 
    
        
  addRouteHistory (Route   route  )
    → void 
   
  
 
  Add a route to the route history.
  
 
        
  apiDecoder <T > ()
    → NyApiService  
    
  
 
  Get a API Decoder
  
 
        
  apiDecoders ()
    → Map <Type  , NyApiService  >  
    
  
 
  Get api decoders
  
 
        
  appFirstLaunchDate ()
    → Future <DateTime ? >  
    
  
 
  Days since first launch
  
 
        
  appLaunchCount ()
    → Future <int ? >  
    
  
 
  App launch count - this method will return the app launch count.
  
 
        
  appLaunched ()
    → Future <void >  
    
  
 
  App launched - this method will increment the app launch count.
  
 
        
  appLoader ()
    → Widget  
    
  
 
  Get appLoader
  
 
        
  appLogo ()
    → Widget  
    
  
 
  Get appLogo
  
 
        
  appTotalDaysSinceFirstLaunch ()
    → Future <int  >  
    
  
 
  Days since first launch
  
 
        
  authKey ()
    → String  
    
  
 
  Get the auth user
  
 
        
  canMonitorAppUsage ()
    → void 
    
  
 
  Check if the app can monitor data
  
 
        
  containsRoute (String   route  )
    → bool  
   
  
 
  Check if the router contains specific route
  
 
        
  containsRoutes (List <String  >   routes  )
    → bool  
   
  
 
  Check if the router contains specific routes
  
 
        
  events ()
    → Map <Type  , NyEvent  >  
    
  
 
  Get events
  
 
        
  getAppThemes ()
    → List <AppTheme >  
    
  
 
  Get all app themes
  
 
        
  getCurrentRoute ()
    → Route ? 
    
  
 
  Get current route
  
 
        
  getCurrentRouteArguments ()
    → dynamic 
    
  
 
  Get current route arguments
  
 
        
  getCurrentRouteName ()
    → String ? 
    
  
 
  Get current route name
  
 
        
  getLocale ()
    → String  
    
  
 
  Get the current locale
  
 
        
  getPreviousRoute ()
    → Route ? 
    
  
 
  Get previous route
  
 
        
  getPreviousRouteArguments ()
    → dynamic 
    
  
 
  Get previous route arguments
  
 
        
  getPreviousRouteName ()
    → String ? 
    
  
 
  Get previous route name
  
 
        
  getRouteHistory ()
    → List  
    
  
 
  Get the route history.
  
 
        
  init ({Function ?  setup , dynamic  setupFinished (Nylo   nylo  )?, bool ?  showSplashScreen , Map <AppLifecycleState  , dynamic Function()  > ?  appLifecycle  })
    → Future <Nylo  >  
    
  
 
  Initialize Nylo
  
 
        
  isCurrentRoute (String   routeName  )
    → bool  
   
  
 
  Check if the current route is routeName
  
 
        
  isDebuggingEnabled ()
    → bool  
    
  
 
  Check if the app is in debug mode
  
 
        
  isEnvDeveloping ()
    → bool  
    
  
 
  Check if the app is in developing
  
 
        
  isEnvProduction ()
    → bool  
    
  
 
  Check if the app is in production
  
 
        
  isInitialized ()
    → bool  
    
  
 
  Check if Nylo  is initialized
  
 
        
  localNotifications (dynamic  callback (FlutterLocalNotificationsPlugin  localNotifications  ) )
    → Future <void >  
   
  
 
  Get the local notifications plugin
  
 
        
  notificationTapBackground (NotificationResponse  notificationResponse  )
    → void 
   
  
 
  
  
 
        
  onDidReceiveNotificationResponse (NotificationResponse  notificationResponse  )
    → void 
   
  
 
  On did receive notification response
  
 
        
  removeLastRouteHistory ()
    → void 
    
  
 
  Remove a route from the route history.
  
 
        
  removeRouteHistory (Route   route  )
    → void 
   
  
 
  Remove a route from the route history.
  
 
        
  scheduleOnce (String   name , dynamic  callback () )
    → Future <void >  
   
  
 
  Schedule something to happen once
  
 
        
  scheduleOnceAfterDate (String   name , dynamic  callback (), {required  DateTime   date  })
    → Future <void >  
   
  
 
  Schedule something to happen once after a date
  
 
        
  scheduleOnceDaily (String   name , dynamic  callback (), {DateTime ?  endAt  })
    → Future <void >  
   
  
 
  Schedule something to happen once daily
  
 
        
  updateRouteStack (List <String  >   routes , {bool   replace  = true , bool   deepLink  = false , Map <String  , dynamic > ?  dataForRoute  })
    → void 
   
  
 
  Update the stack on the router.
routes is a list of routes to navigate to. E.g. HomePage.path, SettingPage.path
replace is a boolean that determines if the current route should be replaced.
dataForRoute is a map of data to pass to the route. E.g. {HomePage.path: {"name": "John Doe"}}
Example:
  
 
        
  user <T > ()
    → T? 
    
  
 
  Get the auth user
  
 
        
  wipeAllStorageData ({List <String  > ?  excludeKeys , bool   andFromBackpack  = true  })
    → Future <void >  
    
  
 
  Wipe all storage data