Skip to content

Commit 205426e

Browse files
committed
make the context required but nullable in .of()
1 parent 3c65587 commit 205426e

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

lib/shared_value.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ class SharedValue<T> {
8484

8585
/// Get the value held by this state,
8686
/// and also rebuild the widget in [context] whenever [mutate] is called.
87-
T of([BuildContext? context]) {
87+
T of(BuildContext? context) {
8888
if (context != null) {
8989
InheritedModel.inheritFrom<SharedValueInheritedModel>(
9090
context,

pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: shared_value
22
description: A straightforward way to manage global state in flutter apps.
3-
version: 2.1.1
3+
version: 2.1.2
44
author: Dev Aggarwal <[email protected]>
55
homepage: https://github.com/scientifichackers/flutter-shared-value
66

0 commit comments

Comments
 (0)