Skip to content

Conversation

@juanRodriguez17
Copy link

@juanRodriguez17 juanRodriguez17 commented Jul 31, 2025

Description

This pull request introduces a new notification service that handles managing local notifications and syncing notification preferences with the backend

This service aims to introduce to the Flutter base repository a new way to ensure users don't miss important events, centralize notification logic for better maintainability and use it for future projects.

Changes Made

  • NotificationsService added. This new service class encapsulates all logic related about show and close notifications across the hole app.
  • NotificationStatus for the different types of notifications. Widely modifiable to add more in the future if required.
  • NotificationCubit and NotificationState for the management of the different states.
  • Custom NotificationWidget with progress bar animation in order to build the notifications
  • Add to the App widget the usage of the NotificationWidget for showing the different notifications produced
  • Init dependencies correctly

Issue [Flutter Community board]

Preview

Screen_recording_20250731_153148.mp4

@rs-gpt-review Describe the changes in this PR. Recommend improvements (including code improvements), possible memory leaks, and best practices.

}
},
child: child,
child: Stack(
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Podemos mover estos cambios para el modulo example asi es mas facil de quitar cuando empezamos un proyecto nuevo usando el template

@@ -1 +1 @@
{"info":"This is a generated file; do not edit or check into version control.","plugins":{"ios":[{"name":"package_info_plus","path":"/Users/fabianvalencia/.pub-cache/hosted/pub.dev/package_info_plus-4.2.0/","native_build":true,"dependencies":[]},{"name":"permission_handler_apple","path":"/Users/fabianvalencia/.pub-cache/hosted/pub.dev/permission_handler_apple-9.1.4/","native_build":true,"dependencies":[]}],"android":[{"name":"package_info_plus","path":"/Users/fabianvalencia/.pub-cache/hosted/pub.dev/package_info_plus-4.2.0/","native_build":true,"dependencies":[]},{"name":"permission_handler_android","path":"/Users/fabianvalencia/.pub-cache/hosted/pub.dev/permission_handler_android-10.3.6/","native_build":true,"dependencies":[]}],"macos":[{"name":"package_info_plus","path":"/Users/fabianvalencia/.pub-cache/hosted/pub.dev/package_info_plus-4.2.0/","native_build":true,"dependencies":[]}],"linux":[{"name":"package_info_plus","path":"/Users/fabianvalencia/.pub-cache/hosted/pub.dev/package_info_plus-4.2.0/","native_build":false,"dependencies":[]}],"windows":[{"name":"package_info_plus","path":"/Users/fabianvalencia/.pub-cache/hosted/pub.dev/package_info_plus-4.2.0/","native_build":false,"dependencies":[]},{"name":"permission_handler_windows","path":"/Users/fabianvalencia/.pub-cache/hosted/pub.dev/permission_handler_windows-0.1.3/","native_build":true,"dependencies":[]}],"web":[{"name":"package_info_plus","path":"/Users/fabianvalencia/.pub-cache/hosted/pub.dev/package_info_plus-4.2.0/","dependencies":[]}]},"dependencyGraph":[{"name":"package_info_plus","dependencies":[]},{"name":"permission_handler","dependencies":["permission_handler_android","permission_handler_apple","permission_handler_windows"]},{"name":"permission_handler_android","dependencies":[]},{"name":"permission_handler_apple","dependencies":[]},{"name":"permission_handler_windows","dependencies":[]}],"date_created":"2024-05-02 16:35:44.210631","version":"3.19.3"} No newline at end of file
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

podes agregar los .flutter-plugins y flutter-plugins dependencies a los gitignore?

class NotificationCubit extends Cubit<NotificationState?> {
NotificationCubit() : super(null);

void showNotification({
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

te parece agregarle unit test a showNotification y a clearNotification?

Copy link
Contributor

@agustinkoll-rootstrap agustinkoll-rootstrap left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Excelente trabajo! solo me parece que habria que mover los cambios de app para example, te parece bien?

Copy link

@tarruk tarruk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Esta genial!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants