Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR DART

consumer in dart

@override
Widget build(BuildContext context) {
  return ChangeNotifierProvider(
    create: (_) => Foo(),
    child: Consumer<Foo>(
      builder: (_, foo, __) => Text(foo.value),
    },
  );
}
Source by pub.dev #
 
PREVIOUS NEXT
Tagged: #consumer #dart
ADD COMMENT
Topic
Name
6+3 =