Nylo v7.0.0
Nylo v7.0.0 is a major release with significant architectural improvements, a streamlined project structure, and modernized APIs. This release focuses on simplifying configuration, improving the developer experience, and bringing the framework up to date with the latest Dart and Flutter standards.
Breaking Changes
Boot Sequence Rewrite
Bootclass now returnsBootConfiginstead of using separatenylo()andfinished()static methods. The newBootConfigpattern consolidates setup and boot into a single configuration object.Nylo.init()API changed - now acceptsenv,setup(aBootConfig), andappLifecycleparameters instead ofsetup/setupFinishedcallbacks._setup()renamed to_init()in boot.dart for clarity.- Removed
lib/bootstrap/app.dart- theMainwidget has moved tolib/resources/widgets/main_widget.dart.
Provider API Changes
AppProvider.boot()renamed toAppProvider.setup()- the primary provider method is nowsetup().afterBoot()renamed toboot()- runs after initialization is complete.- New
nylo.configure()method replaces the previous chain ofnylo.addX()calls. All configuration (themes, decoders, controllers, localization, toast notifications, etc.) is now passed through a singleconfigure()method.
Configuration File Reorganization
config/decoders.dartmoved tobootstrap/decoders.dartconfig/events.dartmoved tobootstrap/events.dartconfig/providers.dartmoved tobootstrap/providers.dartconfig/theme.dartmoved tobootstrap/theme.dartconfig/keys.dartrenamed toconfig/storage_keys.dart-Keysclass renamed toStorageKeysConfig.config/toast_notification_styles.dartreplaced byconfig/toast_notification.dart- now usesToastNotificationConfigclass with astylesmap.
Removed Files
config/form_casts.dart- form casts configuration removed.config/validation_rules.dart- validation rules configuration removed.app/forms/login_form.dart- login form removed from boilerplate.app/forms/style/form_style.dart- form style class removed.resources/widgets/safearea_widget.dart- safe area widget removed.
Theme System Overhaul
ColorStylesnow extendsThemeColor(previouslyBaseColorStyles) and uses structured color groups (GeneralColors,AppBarColors,BottomTabBarColors) instead of flat color properties.- Theme files reorganized into
light/anddark/subdirectories underresources/themes/. - New shared
base_theme.dart-buildAppTheme()function provides a shared theme builder for both light and dark themes, eliminating duplicate theme code. ThemeColorhelper renamed toThemeColorResolverinbootstrap/helpers.dart.- Theme functions now accept
ColorStylesandBrightnessinstead of justColorStyles.
Networking Changes
ApiServiceconstructor simplified - no longer acceptsBuildContext. Constructor is now parameterless.PrettyDioLoggerremoved - replaced with built-inuseNetworkLogger: trueoption.- Interceptors now use spread syntax with
...super.interceptorsfor proper inheritance. url_launcherdependency removed - replaced with framework-providedopenUrl()helper.
Asset Directory Change
public/directory replaced withassets/- all assets (fonts, images, app icons) moved frompublic/toassets/.public/postman/directory removed entirely.
SDK Requirements
- Dart SDK requirement updated to
^3.10.7(previously>=3.4.0 <4.0.0). - Flutter version constraint removed from pubspec (previously
>=3.24.0 <4.0.0).
Dependency Changes
nylo_frameworkupdated to^7.0.0(from^6.9.2).google_fontsupdated to^8.0.1(from^6.3.3).analyzerupdated to^10.0.0(from^9.0.0).- Removed:
url_launcher,pretty_dio_logger,path_provider,flutter_local_notifications,scaffold_ui,rename.
Added
New AppConfig Class
- New
lib/config/app.dartprovides a centralizedAppConfigfinal class with static fields forappName,version,environment,apiBaseUrl,assetPath, andshowSplashScreen.
New Main Widget
lib/resources/widgets/main_widget.dart- a dedicatedMainwidget that serves as the app shell with routing, theme mode, and lifecycle management.
New LocalAsset Widget
lib/resources/widgets/local_asset_widget.dart- convenience widget for displaying local image assets with support for width, height, fit, opacity, and border radius.
Bottom Sheet Modals System
lib/resources/widgets/bottom_sheet_modals/bottom_sheet_modals.dart- newBottomSheetModalclass extendingNyBaseModalfor displaying modal bottom sheets.lib/resources/widgets/bottom_sheet_modals/modals/logout_modal.dart- pre-built logout confirmation modal.
AuthenticatedEvent
lib/app/events/authenticated_event.dart- new event that callsrouteToAuthenticatedRoute()for handling post-authentication navigation.
Download Fonts Metro Command
lib/app/commands/download_fonts.dart- new Metro CLI command (metro app:download_fonts) that downloads Google Fonts, auto-detects the font fromdesign.dart, updatespubspec.yamlwith font families, and updates the design configuration.
Spanish Localization
lang/es.json- added Spanish language translation file.
New Test Files
test/example_test.dartandtest/home_page_test.dartreplace the previoustest/widget_test.dart.
Environment Configuration
Nylo.init()now accepts anenvparameter for environment variable resolution (using generatedEnv.get)..envandlib/bootstrap/env.g.dartadded to.gitignore.
Changed
Simplified Metro Command Usage
- Commands now use the shorter
metroCLI format (e.g.,metro app:current_time) instead of the longerdart run nylo_framework:mainprefix. - Custom commands file renamed from
custom_commands.jsontocommands.json.
Home Page Redesigned
- Complete UI overhaul of the home page with a links-based layout, skeletonizer loading style, and improved structure.
Router Simplified
- Removed boilerplate comments and example code from
lib/routes/router.dart.
Toast Notifications
- Toast notification styling now uses
ToastAnimation.springFromTop()andToastAnimation.fadeOut()for entrance and exit animations.
Loading Style Default
- Default loading style changed to
LoadingStyle.skeletonizer()(fromLoadingStyle.normal()).
Model Improvements
User.keyis nowstatic finalinstead ofstatic.
Documentation Links
- All documentation links updated from
6.xto7.xacross the entire codebase.
Upgrade Guide
To upgrade from Nylo v6.x to v7.0.0:
- Update
pubspec.yamlto usenylo_framework: ^7.0.0 - Move config files:
decoders.dart,events.dart,providers.dart,theme.dartfromconfig/tobootstrap/ - Rename
config/keys.darttoconfig/storage_keys.dartand update the class name toStorageKeysConfig - Rewrite
AppProviderto usesetup()andboot()methods withnylo.configure() - Update
Bootclass to use the newBootConfigpattern - Move assets from
public/toassets/ - Restructure theme files into
light/anddark/subdirectories with the newColorStylesinterface - Remove unused dependencies (
url_launcher,pretty_dio_logger, etc.) - Create
lib/config/app.dartwithAppConfigclass - Add
lib/resources/widgets/main_widget.dart