Skip to content

Commit 73d2fc6

Browse files
author
GitLab CI
committed
fix: Improve pub.dev score - add example, fix warnings, widen vm_service range
- Add example/example.dart for pub.dev scoring (+10 points) - Remove unused _persistentCharacter* fields (fixes 6 warnings) - Widen vm_service to >=14.0.0 <16.0.0 for v15 compatibility (+10 points) - Add demo_app/, vscode-extension/, .github/, scripts/ to .pubignore to fix "multiple pubspec.yaml" repository verification (+10 points)
1 parent 9cb634a commit 73d2fc6

4 files changed

Lines changed: 64 additions & 9 deletions

File tree

.pubignore

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
test_dummy/
66

77
# Demo projects
8+
demo_app/
89
demo_counter/
910

1011
# Build artifacts
@@ -27,6 +28,15 @@ npm/
2728
Dockerfile
2829
.dockerignore
2930

31+
# VSCode extension (separate package)
32+
vscode-extension/
33+
34+
# CI/CD
35+
.github/
36+
37+
# Scripts
38+
scripts/
39+
3040
# Development docs
3141
docs/
3242
PUBLISHING.md

example/example.dart

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
/// Flutter Skill - Give your AI Agent eyes and hands inside your Flutter app.
2+
///
3+
/// This example shows how to integrate flutter_skill into your Flutter app.
4+
/// Once integrated, AI agents can inspect, tap, scroll, enter text,
5+
/// and take screenshots of your running app via the MCP protocol.
6+
library;
7+
8+
import 'package:flutter/material.dart';
9+
import 'package:flutter/foundation.dart';
10+
import 'package:flutter_skill/flutter_skill.dart';
11+
12+
void main() {
13+
// Initialize FlutterSkill only in debug mode.
14+
// This ensures it's stripped from release builds.
15+
if (kDebugMode) {
16+
FlutterSkillBinding.ensureInitialized();
17+
}
18+
runApp(const MyApp());
19+
}
20+
21+
class MyApp extends StatelessWidget {
22+
const MyApp({super.key});
23+
24+
@override
25+
Widget build(BuildContext context) {
26+
return MaterialApp(
27+
home: Scaffold(
28+
appBar: AppBar(title: const Text('Flutter Skill Example')),
29+
body: Center(
30+
child: Column(
31+
mainAxisAlignment: MainAxisAlignment.center,
32+
children: [
33+
// Use Key widgets so AI agents can find and interact with them
34+
ElevatedButton(
35+
key: const Key('my_button'),
36+
onPressed: () {},
37+
child: const Text('Tap Me'),
38+
),
39+
const SizedBox(height: 20),
40+
const TextField(
41+
key: Key('my_input'),
42+
decoration: InputDecoration(
43+
labelText: 'Enter text here',
44+
border: OutlineInputBorder(),
45+
),
46+
),
47+
],
48+
),
49+
),
50+
),
51+
);
52+
}
53+
}

lib/flutter_skill.dart

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2346,14 +2346,6 @@ class _TestIndicatorWidgetState extends State<_TestIndicatorWidget>
23462346
final Map<IndicatorData, AnimationController> _controllers = {};
23472347
IndicatorStyle _style = IndicatorStyle.standard;
23482348

2349-
// Persistent character state
2350-
bool _persistentCharacterVisible = false;
2351-
Offset _persistentCharacterPos = const Offset(50, 100);
2352-
Offset? _persistentCharacterTarget;
2353-
CharacterAction _persistentCharacterAction = CharacterAction.pointing;
2354-
CharacterState _persistentCharacterState = CharacterState.idle;
2355-
AnimationController? _persistentCharacterController;
2356-
23572349
@override
23582350
void initState() {
23592351
super.initState();

pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ environment:
1515
dependencies:
1616
flutter:
1717
sdk: flutter
18-
vm_service: ^14.0.0
18+
vm_service: ">=14.0.0 <16.0.0"
1919
http: ^1.1.0
2020
path: ^1.8.0
2121
logging: ^1.2.0

0 commit comments

Comments
 (0)