Skip to content

Commit 235a221

Browse files
author
GitLab CI
committed
style: dart format
1 parent ffe4703 commit 235a221

File tree

7 files changed

+40
-22
lines changed

7 files changed

+40
-22
lines changed

lib/src/cli/server.dart

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -672,7 +672,8 @@ class FlutterMcpServer {
672672
/// Execute a batch of actions in sequence
673673
Future<Map<String, dynamic>> _executeBatch(
674674
Map<String, dynamic> args, FlutterSkillClient client) async {
675-
final actions = (args['actions'] ?? args['commands'] ?? []) as List<dynamic>;
675+
final actions =
676+
(args['actions'] ?? args['commands'] ?? []) as List<dynamic>;
676677
final stopOnFailure = args['stop_on_failure'] ?? true;
677678

678679
final results = <Map<String, dynamic>>[];

lib/src/cli/tool_handlers/bf_inspection.dart

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,8 @@ extension _BfInspection on FlutterMcpServer {
180180
final result = await client.callMethod('inspect', {});
181181
result['source'] = 'bridge_inspect';
182182
result['framework'] = client.frameworkName;
183-
result['hint'] = 'This is the component/accessibility tree from the ${client.frameworkName} bridge SDK. '
183+
result['hint'] =
184+
'This is the component/accessibility tree from the ${client.frameworkName} bridge SDK. '
184185
'For Flutter apps, get_widget_tree returns the full widget tree via VM Service.';
185186
return result;
186187
}
@@ -197,7 +198,10 @@ extension _BfInspection on FlutterMcpServer {
197198
final fc = _asFlutterClient(client!, 'get_widget_properties');
198199
final wpKey = (args['key'] ?? args['element'] ?? '') as String;
199200
if (wpKey.isEmpty) {
200-
return {"success": false, "error": "key or element parameter required"};
201+
return {
202+
"success": false,
203+
"error": "key or element parameter required"
204+
};
201205
}
202206
return await fc.getWidgetProperties(wpKey);
203207
case 'get_text_content':

lib/src/cli/tool_handlers/flutter_helpers.dart

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -313,7 +313,8 @@ extension _FlutterHelpers on FlutterMcpServer {
313313
Future<Map<String, dynamic>> _assertText(
314314
Map<String, dynamic> args, FlutterSkillClient client) async {
315315
final key = args['key'] as String? ?? args['element'] as String? ?? '';
316-
final expected = args['expected'] as String? ?? args['text'] as String? ?? '';
316+
final expected =
317+
args['expected'] as String? ?? args['text'] as String? ?? '';
317318
final useContains = args['contains'] ?? false;
318319

319320
final actual = await client.getTextValue(key.isEmpty ? null : key);

lib/src/cli/tool_handlers/native_handlers.dart

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,7 @@ extension _NativeHandlers on FlutterMcpServer {
163163
"success": false,
164164
"error":
165165
"Could not read accessibility tree — check macOS Accessibility permissions for Terminal/IDE, "
166-
"or connect via bridge SDK (scan_and_connect) for bridge-based inspection"
166+
"or connect via bridge SDK (scan_and_connect) for bridge-based inspection"
167167
};
168168
}
169169

@@ -294,7 +294,8 @@ extension _NativeHandlers on FlutterMcpServer {
294294
},
295295
};
296296
}
297-
final gesture = (args['gesture'] ?? args['type'] ?? args['name']) as String;
297+
final gesture =
298+
(args['gesture'] ?? args['type'] ?? args['name']) as String;
298299
final result = await driver.gesture(gesture).timeout(
299300
const Duration(seconds: 15),
300301
onTimeout: () => NativeResult(

lib/src/cli/tool_handlers/tool_definitions.dart

Lines changed: 15 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -941,7 +941,8 @@ After starting, point the web SDK at ws://127.0.0.1:<port>.""",
941941
},
942942
{
943943
"name": "go_offline",
944-
"description": "Simulate offline mode (no network). Use go_online to restore.",
944+
"description":
945+
"Simulate offline mode (no network). Use go_online to restore.",
945946
"inputSchema": {"type": "object", "properties": {}}
946947
},
947948
{
@@ -1771,11 +1772,15 @@ By default, saves screenshot to a temporary file and returns file path. Optional
17711772
},
17721773
{
17731774
"name": "screenshot_element",
1774-
"description": "Take a screenshot of a specific element by CSS selector, key, or text content",
1775+
"description":
1776+
"Take a screenshot of a specific element by CSS selector, key, or text content",
17751777
"inputSchema": {
17761778
"type": "object",
17771779
"properties": {
1778-
"selector": {"type": "string", "description": "CSS selector (e.g. 'h1', '.my-class', '#my-id')"},
1780+
"selector": {
1781+
"type": "string",
1782+
"description": "CSS selector (e.g. 'h1', '.my-class', '#my-id')"
1783+
},
17791784
"key": {"type": "string", "description": "Element key"},
17801785
"text": {"type": "string", "description": "Text to find"},
17811786
},
@@ -2323,7 +2328,8 @@ home, lock, power, siri, volume_up, volume_down, app_switch
23232328
},
23242329
{
23252330
"name": "native_video_start",
2326-
"description": """Start recording the iOS Simulator screen to an MP4 video file.
2331+
"description":
2332+
"""Start recording the iOS Simulator screen to an MP4 video file.
23272333
23282334
[USE WHEN]
23292335
• Recording a test session or demo for documentation
@@ -2355,7 +2361,8 @@ home, lock, power, siri, volume_up, volume_down, app_switch
23552361
},
23562362
{
23572363
"name": "native_video_stop",
2358-
"description": """Stop recording the iOS Simulator screen and save the MP4 file.
2364+
"description":
2365+
"""Stop recording the iOS Simulator screen and save the MP4 file.
23592366
23602367
[USE WHEN]
23612368
• Finishing a recording started with native_video_start
@@ -2376,7 +2383,8 @@ home, lock, power, siri, volume_up, volume_down, app_switch
23762383
},
23772384
{
23782385
"name": "native_capture_frames",
2379-
"description": """Capture a burst of screenshot frames from the iOS Simulator.
2386+
"description":
2387+
"""Capture a burst of screenshot frames from the iOS Simulator.
23802388
23812389
[USE WHEN]
23822390
• Creating a lightweight visual recording without full video
@@ -2407,8 +2415,7 @@ home, lock, power, siri, volume_up, volume_down, app_switch
24072415
},
24082416
"duration_ms": {
24092417
"type": "integer",
2410-
"description":
2411-
"Capture duration in milliseconds (default: 3000)",
2418+
"description": "Capture duration in milliseconds (default: 3000)",
24122419
},
24132420
"quality": {
24142421
"type": "integer",

lib/src/drivers/native_driver.dart

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1632,8 +1632,7 @@ end tell
16321632
}
16331633
}
16341634
return NativeResult(
1635-
success: false,
1636-
message: 'Apple Pay button requires fs-ios-bridge');
1635+
success: false, message: 'Apple Pay button requires fs-ios-bridge');
16371636

16381637
case 'side':
16391638
case 'side-button':
@@ -1648,8 +1647,7 @@ end tell
16481647
}
16491648
}
16501649
return NativeResult(
1651-
success: false,
1652-
message: 'Side button requires fs-ios-bridge');
1650+
success: false, message: 'Side button requires fs-ios-bridge');
16531651

16541652
default:
16551653
return NativeResult(success: false, message: 'Unknown button: $button');

lib/src/engine/tool_registry.dart

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -941,7 +941,8 @@ After starting, point the web SDK at ws://127.0.0.1:<port>.""",
941941
},
942942
{
943943
"name": "go_offline",
944-
"description": "Simulate offline mode (no network). Use go_online to restore.",
944+
"description":
945+
"Simulate offline mode (no network). Use go_online to restore.",
945946
"inputSchema": {"type": "object", "properties": {}}
946947
},
947948
{
@@ -1779,11 +1780,15 @@ By default, saves screenshot to a temporary file and returns file path. Optional
17791780
},
17801781
{
17811782
"name": "screenshot_element",
1782-
"description": "Take a screenshot of a specific element by CSS selector, key, or text content",
1783+
"description":
1784+
"Take a screenshot of a specific element by CSS selector, key, or text content",
17831785
"inputSchema": {
17841786
"type": "object",
17851787
"properties": {
1786-
"selector": {"type": "string", "description": "CSS selector (e.g. 'h1', '.my-class', '#my-id')"},
1788+
"selector": {
1789+
"type": "string",
1790+
"description": "CSS selector (e.g. 'h1', '.my-class', '#my-id')"
1791+
},
17871792
"key": {"type": "string", "description": "Element key"},
17881793
"text": {"type": "string", "description": "Text content to find"}
17891794
}
@@ -2141,7 +2146,8 @@ This captures the ENTIRE device screen, not just the Flutter app content.""",
21412146
},
21422147
"path": {
21432148
"type": "string",
2144-
"description": "Output file path (default: auto-generated in temp dir)",
2149+
"description":
2150+
"Output file path (default: auto-generated in temp dir)",
21452151
},
21462152
},
21472153
},

0 commit comments

Comments
 (0)