state_buddy

Creator: coderz1093

Last updated:

0 purchases

TODO
Add to Cart

Description:

state buddy

state budy #
as simple state manager
class CounterManager extends Manager<int>{
CounterManager():super(0);

void increment() => emit(state++);
}

void main(){
//Add the manager to the ManagerTable to make it accesible throughout the entire application
ManagerTable.addManager(CounterManager());
//you can find the manager in the table like this
final manager = ManagerTable.find<CounterManager>();
//print the state every time it changes
manager.addListener((state) => print(state));
//this will print 1
manager.increment();
//this will print 2
manager.increment();
}

copied to clipboard

License

For personal and professional use. You cannot resell or redistribute these repositories in their original state.

Files In This Product:

Customer Reviews

There are no reviews.