See the native app state behind the UI
Inspect exposed native runtime objects in your Flutter app to understand the state driving its behavior.
Reflection tools let you examine exposed runtime objects when a screen alone does not explain an app’s behavior. Keep roots and traversal narrow, and enable inspection, mutation, or invocation only under the required tool policy. This inspects supported native Android and Apple roots, not arbitrary Dart objects.
const reflection = AnsightReflectionToolsOptions(
includeBuiltInRoots: true,
allowedRootIds: <String>['application'],
allowedTypePrefixes: <String>['com.example.'],
);
Pass the options through AnsightRemoteToolsOptions. Native reflection exposes reflect.list_roots, reflect.inspect_object, reflect.describe_type, reflect.set_member_value, and reflect.invoke_method according to platform support and the active tool guard. Read-only access enables list and describe. Object inspection, mutation, and invocation use Critical and require withAllToolAccess() for the local development workflow, with roots and type traversal kept narrow.
These are native Swift/JVM roots, not arbitrary Dart object reflection. Use Flutter widget tools for framework UI state. Keep reflection development-only.