Skip to content

v7.0.0

Latest

Choose a tag to compare

@agordn52 agordn52 released this 06 Feb 14:15
· 19 commits to 7.x since this release

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

  • Boot class now returns BootConfig instead of using separate nylo() and finished() static methods. The new BootConfig pattern consolidates setup and boot into a single configuration object.
  • Nylo.init() API changed - now accepts env, setup (a BootConfig), and appLifecycle parameters instead of setup/setupFinished callbacks.
  • _setup() renamed to _init() in boot.dart for clarity.
  • Removed lib/bootstrap/app.dart - the Main widget has moved to lib/resources/widgets/main_widget.dart.

Provider API Changes

  • AppProvider.boot() renamed to AppProvider.setup() - the primary provider method is now setup().
  • afterBoot() renamed to boot() - runs after initialization is complete.
  • New nylo.configure() method replaces the previous chain of nylo.addX() calls. All configuration (themes, decoders, controllers, localization, toast notifications, etc.) is now passed through a single configure() method.

Configuration File Reorganization

  • config/decoders.dart moved to bootstrap/decoders.dart
  • config/events.dart moved to bootstrap/events.dart
  • config/providers.dart moved to bootstrap/providers.dart
  • config/theme.dart moved to bootstrap/theme.dart
  • config/keys.dart renamed to config/storage_keys.dart - Keys class renamed to StorageKeysConfig.
  • config/toast_notification_styles.dart replaced by config/toast_notification.dart - now uses ToastNotificationConfig class with a styles map.

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

  • ColorStyles now extends ThemeColor (previously BaseColorStyles) and uses structured color groups (GeneralColors, AppBarColors, BottomTabBarColors) instead of flat color properties.
  • Theme files reorganized into light/ and dark/ subdirectories under resources/themes/.
  • New shared base_theme.dart - buildAppTheme() function provides a shared theme builder for both light and dark themes, eliminating duplicate theme code.
  • ThemeColor helper renamed to ThemeColorResolver in bootstrap/helpers.dart.
  • Theme functions now accept ColorStyles and Brightness instead of just ColorStyles.

Networking Changes

  • ApiService constructor simplified - no longer accepts BuildContext. Constructor is now parameterless.
  • PrettyDioLogger removed - replaced with built-in useNetworkLogger: true option.
  • Interceptors now use spread syntax with ...super.interceptors for proper inheritance.
  • url_launcher dependency removed - replaced with framework-provided openUrl() helper.

Asset Directory Change

  • public/ directory replaced with assets/ - all assets (fonts, images, app icons) moved from public/ to assets/.
  • 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_framework updated to ^7.0.0 (from ^6.9.2).
  • google_fonts updated to ^8.0.1 (from ^6.3.3).
  • analyzer updated 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.dart provides a centralized AppConfig final class with static fields for appName, version, environment, apiBaseUrl, assetPath, and showSplashScreen.

New Main Widget

  • lib/resources/widgets/main_widget.dart - a dedicated Main widget 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 - new BottomSheetModal class extending NyBaseModal for 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 calls routeToAuthenticatedRoute() 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 from design.dart, updates pubspec.yaml with font families, and updates the design configuration.

Spanish Localization

  • lang/es.json - added Spanish language translation file.

New Test Files

  • test/example_test.dart and test/home_page_test.dart replace the previous test/widget_test.dart.

Environment Configuration

  • Nylo.init() now accepts an env parameter for environment variable resolution (using generated Env.get).
  • .env and lib/bootstrap/env.g.dart added to .gitignore.

Changed

Simplified Metro Command Usage

  • Commands now use the shorter metro CLI format (e.g., metro app:current_time) instead of the longer dart run nylo_framework:main prefix.
  • Custom commands file renamed from custom_commands.json to commands.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() and ToastAnimation.fadeOut() for entrance and exit animations.

Loading Style Default

  • Default loading style changed to LoadingStyle.skeletonizer() (from LoadingStyle.normal()).

Model Improvements

  • User.key is now static final instead of static.

Documentation Links

  • All documentation links updated from 6.x to 7.x across the entire codebase.

Upgrade Guide

To upgrade from Nylo v6.x to v7.0.0:

  1. Update pubspec.yaml to use nylo_framework: ^7.0.0
  2. Move config files: decoders.dart, events.dart, providers.dart, theme.dart from config/ to bootstrap/
  3. Rename config/keys.dart to config/storage_keys.dart and update the class name to StorageKeysConfig
  4. Rewrite AppProvider to use setup() and boot() methods with nylo.configure()
  5. Update Boot class to use the new BootConfig pattern
  6. Move assets from public/ to assets/
  7. Restructure theme files into light/ and dark/ subdirectories with the new ColorStyles interface
  8. Remove unused dependencies (url_launcher, pretty_dio_logger, etc.)
  9. Create lib/config/app.dart with AppConfig class
  10. Add lib/resources/widgets/main_widget.dart