Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
This PR is intended to kickstart the process of adding a base implementation Mirai State Management using ChangeNotifier and InheritedWidget
create mirai_sm.dart
Here we are going to extend ChangeNotifier. instances of MiraiSM gain the ability to notify listeners when their internal state changes. state of type T. This variable will hold the internal state of the MiraiSM instance.
create mirai_Inherited_widget.dart
Overall, MiraiInheritedWidget is a wrapper around InheritedWidget that specifically works with MiraiSM instances. It allows widgets in the widget tree to access the MiraiSM instance provided by the nearest ancestor MiraiInheritedWidget. When the state managed by MiraiSM changes, widgets that depend on it will automatically rebuild.
create number_sm_example.dart
NumberStateManagement is a specific implementation of MiraiSM, intended for managing state of type T. It allows you to create instances of NumberStateManagement with an initial state provided by the superclass constructor.
******* Increment Operation *******
******* Decrement Operation ********
main.dart
Related Issues
Closes #
Type of Change