flutter_notification_system 2.0.0 copy "flutter_notification_system: ^2.0.0" to clipboard
flutter_notification_system: ^2.0.0 copied to clipboard

Self-configuring notification system for Flutter with Clean Architecture. Auto-setup with GetIt, Provider, multiple notification types, queue management, and customizable themes.

2.0.0 #

BREAKING CHANGES - Nueva API simplificada y auto-configurable

🚀 Mejoras Principales #

  • Auto-configuración completa: Ya no es necesario registrar dependencias manualmente con GetIt
  • ChangeNotifierProvider incluido: AppNotificationListener configura todo internamente
  • Nueva API simplificada: Dos formas fáciles de mostrar notificaciones
    • Extensión de BuildContext: context.showSuccess('mensaje')
    • Helper estático: NotificationSystem.showSuccess('mensaje')
  • GetIt interno: La librería gestiona su propia instancia de GetIt sin conflictos
  • Menos boilerplate: De ~30 líneas de configuración a solo 1 widget wrapper

✨ Nuevas Características #

  • Clase NotificationSystem para acceso global sin BuildContext
  • Extensión NotificationContextExtension en BuildContext
  • Función helper getNotificationViewModel() con auto-inicialización
  • Función resetNotificationSystem() para testing y reinicio

🔄 Migración desde 1.x #

Antes (v1.x):

final getIt = GetIt.instance;

void main() {
  registerNotificationModule(getIt);
  runApp(MyApp());
}

class MyApp extends StatelessWidget {
  Widget build(context) => ChangeNotifierProvider.value(
    value: getIt<NotificationViewModel>(),
    child: Consumer<NotificationViewModel>(
      builder: (context, vm, _) {
        vm.setAppContext(context);
        return AppNotificationListener(child: MaterialApp(...));
      },
    ),
  );
}

// Uso
getIt<NotificationViewModel>().showSuccess(message: 'OK');

Ahora (v2.0):

void main() => runApp(MyApp());

class MyApp extends StatelessWidget {
  Widget build(context) => AppNotificationListener(
    child: MaterialApp(...),
  );
}

// Uso - Opción 1
context.showSuccess('OK');

// Uso - Opción 2
NotificationSystem.showSuccess('OK');

⚠️ Cambios Deprecados #

  • registerNotificationModule() - Ahora se configura automáticamente
  • unregisterNotificationModule() - Usar resetNotificationSystem() en su lugar
  • resetNotificationModule() - Usar resetNotificationSystem() en su lugar
  • Uso manual de GetIt externo - La librería usa su propia instancia interna

📝 Notas #

  • Los métodos deprecados siguen funcionando para compatibilidad hacia atrás
  • Se recomienda migrar a la nueva API para código más limpio y simple
  • Ejemplos actualizados con la nueva API en el package

1.0.1 #

  • Added comprehensive example app demonstrating all features
  • Basic notifications example with all types (success, error, warning, info)
  • Advanced features example (custom animations, themes, queue management)
  • Operation tracking example with CRUD operations and mixins
  • Improved package score for pub.dev

1.0.0 #

  • Initial release of Flutter Notification System
  • Complete notification management system following Clean Architecture
  • Support for SnackBars with customizable themes and animations
  • Support for dialogs with confirmation callbacks
  • Error handling system with ErrorItem models
  • NotificationQueue for managing multiple notifications
  • Priority-based notification system (low, medium, high, critical)
  • Type-safe notification types (success, error, warning, info)
  • Dependency injection support with GetIt
  • Provider integration for state management
  • Fully customizable themes and animations
  • Built-in fade and slide animations
  • Operation result pattern with Either monad (dartz)
  • Comprehensive test coverage
0
likes
150
points
0
downloads

Publisher

unverified uploader

Weekly Downloads

Self-configuring notification system for Flutter with Clean Architecture. Auto-setup with GetIt, Provider, multiple notification types, queue management, and customizable themes.

Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (license)

Dependencies

collection, dartz, equatable, flutter, get_it, provider

More

Packages that depend on flutter_notification_system