Flutter

Install ansight_flutter, initialize the native runtime, capture Flutter telemetry, and inspect widget and native visual trees.

ansight_flutter brings the native Ansight iOS and Android runtimes to Flutter and adds framework-aware lifecycle, navigation, error, frame-timing, and widget-tree instrumentation.

Status: The Flutter SDK is in beta. Use the preview package in development builds and validate the exact preview version before distributing it.

Supported Targets

TargetRequirement
Flutter3.0 or newer
AndroidAPI 24 or newer, Android embedding v2
iOS / iPadOS15 or newer
Dart packageansight_flutter 1.0.2-preview.7

Quick Start

dependencies:
  ansight_flutter: ^1.0.2-preview.7
import 'package:ansight_flutter/ansight.dart';
import 'package:flutter/material.dart';

Future<void> main() async {
  WidgetsFlutterBinding.ensureInitialized();

  await Ansight.instance.initializeAndActivate(
    AnsightOptions.developer(
      clientName: 'My Flutter App',
      toolGuard: AnsightToolGuard.readOnly,
    ),
  );
  await AnsightFlutterInstrumentation.instance.install();

  runApp(const MyApp());
}

Add AnsightNavigatorObserver() to MaterialApp.navigatorObservers to capture route changes and expose navigation state.

What the Integration Adds

  • Native iOS and Android enrollment, screenshots, touches, performance telemetry, logs, artifacts, and remote tool suites.
  • Flutter frame build, raster, total-time, and frame-count channels.
  • Automatic Flutter lifecycle and error capture.
  • flutter.* widget-tree, widget inspection, search, and navigation tools.
  • A Flutter source in the native ui.* visual-tree tools.

Use Flutter Security before putting the package or enrollment UI in any distributable build.