setIsolateDebugName method

  1. @Deprecated('Use WidgetTester.platformDispatcher.setIsolateDebugName(name) instead. ' 'Deprecated to prepare for the upcoming multi-window support. ' 'This feature was deprecated after v3.9.0-0.1.pre.')
  2. @override
void setIsolateDebugName(
  1. String name
)
override

Set the debug name associated with this platform dispatcher's root isolate.

Accessing this value returns the value contained in the PlatformDispatcher singleton, so instead of getting it from here, you should consider getting it from WidgetsBinding.instance.platformDispatcher instead (or, when WidgetsBinding isn't available, from PlatformDispatcher.instance). The reason this value forwards to the PlatformDispatcher is to provide convenience for applications that only use a single main window.

Normally debug names are automatically generated from the Dart port, entry point, and source file. For example: main.dart$main-1234.

This can be combined with flutter tools --isolate-filter flag to debug specific root isolates. For example: flutter attach --isolate-filter=[name]. Note that this does not rename any child isolates of the root.

Implementation

@Deprecated(
  'Use WidgetTester.platformDispatcher.setIsolateDebugName(name) instead. '
  'Deprecated to prepare for the upcoming multi-window support. '
  'This feature was deprecated after v3.9.0-0.1.pre.'
)
@override
void setIsolateDebugName(String name) {
  platformDispatcher.setIsolateDebugName(name);
}