McpScreenCapture class

Captura la pantalla usando el layer tree interno de Flutter.

No requiere widgets adicionales en el árbol ni claves especiales. Solo disponible en debug/profile; retorna error en release.

Uso:

final json = await McpScreenCapture.capture();
if (json.containsKey('error')) {
  // no disponible (release mode o error)
} else {
  final base64 = json['base64'] as String;
  // enviar como imagen MCP o mostrar
}

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited

Static Methods

capture() Future<Map<String, dynamic>>
Captura el frame actual como PNG.