FlutterSdbx is a sandbox for Flutter and Dart code snippets and experiments.
A flutter screen to demonstrat function tear-offs in Dart via passing a function, from a ViewModel, as a parameter to a Flutter screen and eventurally a widget.
- What are Dart function tear-offs?
- What the app does, allows the selection of a favorite hobby for a person
- Typedef of the Function to specify selected hobby for person
- Also includes
- Simple VoidCallback
- ViewModel architecture based on Stacked package
- OutlineBorder using Stack and Container with rounded corners
- Spread operator for person list and Hobby enumeration
next video possibilities
-
view model for each person, need to have 'add person' fuctionality to really clarify screen view model and hobby list view model
-
widget testing using view model as test env by passing in person list, need to change person list to hold fav hobby so it can be used to test against