@@ -207,7 +207,7 @@ mixin class ChangeNotifier implements Listenable {
207207 @protected
208208 bool get hasListeners => _count > 0 ;
209209
210- /// Dispatches event of the [ object] creation to [MemoryAllocations.instance] .
210+ /// Dispatches event of object creation to [MemoryAllocations.instance] .
211211 ///
212212 /// If the event was already dispatched or [kFlutterMemoryAllocationsEnabled]
213213 /// is false, the method is noop.
@@ -227,16 +227,16 @@ mixin class ChangeNotifier implements Listenable {
227227 /// Make sure to invoke it with condition `if (kFlutterMemoryAllocationsEnabled) ...`
228228 /// so that the method is tree-shaken away when the flag is false.
229229 @protected
230- static void maybeDispatchObjectCreation (ChangeNotifier object ) {
230+ void maybeDispatchObjectCreation () {
231231 // Tree shaker does not include this method and the class MemoryAllocations
232232 // if kFlutterMemoryAllocationsEnabled is false.
233- if (kFlutterMemoryAllocationsEnabled && ! object. _creationDispatched) {
233+ if (kFlutterMemoryAllocationsEnabled && ! _creationDispatched) {
234234 MemoryAllocations .instance.dispatchObjectCreated (
235235 library: _flutterFoundationLibrary,
236236 className: '$ChangeNotifier ' ,
237- object: object ,
237+ object: this ,
238238 );
239- object. _creationDispatched = true ;
239+ _creationDispatched = true ;
240240 }
241241 }
242242
@@ -271,7 +271,7 @@ mixin class ChangeNotifier implements Listenable {
271271 assert (ChangeNotifier .debugAssertNotDisposed (this ));
272272
273273 if (kFlutterMemoryAllocationsEnabled) {
274- maybeDispatchObjectCreation (this );
274+ maybeDispatchObjectCreation ();
275275 }
276276
277277 if (_count == _listeners.length) {
@@ -535,7 +535,7 @@ class ValueNotifier<T> extends ChangeNotifier implements ValueListenable<T> {
535535 /// Creates a [ChangeNotifier] that wraps this value.
536536 ValueNotifier (this ._value) {
537537 if (kFlutterMemoryAllocationsEnabled) {
538- ChangeNotifier . maybeDispatchObjectCreation (this );
538+ maybeDispatchObjectCreation ();
539539 }
540540 }
541541
0 commit comments