diff --git a/doc/leak_tracking/DETECT.md b/doc/leak_tracking/DETECT.md index 9527c30f..f681491c 100644 --- a/doc/leak_tracking/DETECT.md +++ b/doc/leak_tracking/DETECT.md @@ -80,11 +80,13 @@ the Flutter memory allocation events: ... - LeakTracking.start(); - FlutterMemoryAllocations.instance.addListener( - (ObjectEvent event) => LeakTracking.dispatchObjectEvent(event.toMap()), - ); - runApp(...); + void main() { + LeakTracking.start(); + FlutterMemoryAllocations.instance.addListener( + (ObjectEvent event) => LeakTracking.dispatchObjectEvent(event.toMap()), + ); + runApp(...); + } ```