-
-
Save marcossevilla/6cc4b794d34ee674a0e96de3a5baef45 to your computer and use it in GitHub Desktop.
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
class NamesNotifier extends StateNotifier<List<String>> { | |
NamesNotifier([List<String>? initialNames]) : super(initialNames ?? []); | |
void add(String newName) { | |
state = [...state, newName]; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment