Last active
February 8, 2019 19:15
-
-
Save dsrenesanse/c9f837cdaa0f7984c2fbf9cf7231bd54 to your computer and use it in GitHub Desktop.
Mutator
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import 'state.dart'; | |
enum Actions{ Increment } | |
class Mutator { | |
mutateState(action) { | |
switch(action){ | |
case Actions.Increment : { | |
state.valueElementState.value++; | |
state.valueElementState.valueBroadcaster | |
.add(state.valueElementState.value.toString()); | |
break; | |
} | |
} | |
} | |
} | |
final mutator = Mutator(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment