Last active
January 10, 2021 18:28
-
-
Save corelmax/d57601a2999488a8975a56c371255168 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
@@ -2,6 +2,11 @@ | |
import 'package:uuid/uuid.dart'; | |
class TodoList extends StatefulWidget { | |
+ | |
+ static TodoListState of(BuildContext context) { | |
+ return context.findAncestorStateOfType<TodoListState>(); | |
+ } | |
+ | |
@override | |
State<StatefulWidget> createState() { | |
return TodoListState(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment