-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Description
A couple of comments.
-
The vanilla sample is too complex for a flutter/dart beginner. The discussion located at flutter_architecture_samples/example/vanilla/ is useful in explaining how flutter can implement inter-widget communications out of the box. However, IMHO it is extraordinarily complex. It has pieces scattered all over the directory structure. Is there a simpler example? Somewhere you wrote that for multiple state values, I might try a Map. Vanilla was the closest example I could find. The example at https://medium.com/@maksimrv/reactive-app-state-in-flutter-73f829bcf6a7 is fine for a single state value but offers no help with multiple values.
-
The following code (from flutter_architecture_samples-master\example\vanilla\lib\models.dart) presumably (from its name) toggles the value of the complete member of each TodoEntry
void toggleAll() {
final allCompleted = this.allComplete;
todos.forEach((todo) => todo.complete = !allCompleted);
}
Why is allCompleted invoked? Why doesn't the code read
todos.forEach((todo) => todo.complete = !todo.complete);
If that was not what was intended, then the method's name should changed or a /// comment added preceding the declaration.
Kudos: Thank you for your teaching efforts. It is fantastic work!