nivisi / controllable Goto Github PK
View Code? Open in Web Editor NEW๐ Easy and convenient state management; Set your business logic apart from the UI level.
Home Page: https://pub.dev/packages/controllable
License: MIT License
๐ Easy and convenient state management; Set your business logic apart from the UI level.
Home Page: https://pub.dev/packages/controllable
License: MIT License
Currently, uses a ??
operator so you can never pass a null value to emitWith
. This should be possible.
And allow to listen to all events by using XListener or to certain types by using XListener. Similar to NotificationListener
widgets
So if we have an event:
abstract class MyEvent implements Event {
// void we could do this:
@gatherParams // Probably come up with a better name...
void nameChanged(String newName, SomeObject details);
}
// In the controller we will get:
@override
void onNameChanged(_OnNameChangedParams params) {
emitWith(name: params.newName);
}
// And OnNameChangedParams is:
class _OnNameChangedParams {
_OnNameChangedParams(this.newName, this.details);
final String newName;
final SomeObject details
}
Some states/controller share the similar functionality, for example, lazy loading. Would be nice to make this reusable.
To achieve this, we can probably do the following:
mixin LazyLoadingState on XState {
bool get isLoading;
}
And our state:
abstract class OurState extends XState with LazyLoadingState {
/* Any data */
}
Then, in the generator, we could append the data from the mixing to the state so the controller will be able to use it.
The example is very primitive, need to come up with a better one.
Instead of defining our own interfaces like disposable
etc, let's use interfaces
For example:
Etc
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.