Skip to content

Commit 4e4f028

Browse files
committed
no ? needed
1 parent 1a217a7 commit 4e4f028

1 file changed

Lines changed: 9 additions & 8 deletions

File tree

lib/src/watch_it.dart

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -133,14 +133,14 @@ R watchValue<T extends Object, R>(
133133
bool allowObservableChange = false,
134134
String? instanceName,
135135
GetIt? getIt,
136-
dynamic? param1,
137-
dynamic? param2,
136+
dynamic param1,
137+
dynamic param2,
138138
}) {
139139
assert(_activeWatchItState != null,
140140
'watchValue can only be called inside a build function within a WatchingWidget or a widget using the WatchItMixin');
141141
final getItInstance = getIt ?? di;
142-
final parentObject = getItInstance<T>(instanceName: instanceName,
143-
param1: param1, param2: param2);
142+
final parentObject = getItInstance<T>(
143+
instanceName: instanceName, param1: param1, param2: param2);
144144
final observedObject = _activeWatchItState!.watchListenable<T, R>(
145145
parentOrListenable: parentObject,
146146
selector: selectProperty,
@@ -333,15 +333,16 @@ void registerHandler<T extends Object, R>({
333333
bool executeImmediately = false,
334334
String? instanceName,
335335
GetIt? getIt,
336-
dynamic? param1,
337-
dynamic? param2,
336+
dynamic param1,
337+
dynamic param2,
338338
}) {
339339
assert(_activeWatchItState != null,
340340
'registerHandler can only be called inside a build function within a WatchingWidget or a widget using the WatchItMixin');
341341

342342
final getItInstance = getIt ?? di;
343-
final parentObject = target ?? getItInstance<T>(instanceName: instanceName,
344-
param1: param1, param2: param2);
343+
final parentObject = target ??
344+
getItInstance<T>(
345+
instanceName: instanceName, param1: param1, param2: param2);
345346

346347
// Validate target type when no select function is provided
347348
if (select == null && parentObject is! Listenable) {

0 commit comments

Comments
 (0)