accessibility
Use when working on accessibility, a11y, WCAG, ARIA, screen readers, keyboard nav, focus order, contrast, alt text, captions,…
Use when running in-app message campaigns, triggering/suppressing messages, configuring opt-in data collection, testing on specific devices, rendering campaigns with custom Flutter widgets, or handling message callbacks.
Claude Code
$ npx -y skills add evanca/flutter-ai-rules --skill firebase-in-app-messaging --agent claude-code
Codex
$ npx skills add evanca/flutter-ai-rules --skill firebase-in-app-messaging -a codex -y
Cursor
$ npx skills add evanca/flutter-ai-rules --skill firebase-in-app-messaging -a cursor -y
Gemini CLI
$ npx skills add evanca/flutter-ai-rules --skill firebase-in-app-messaging -a gemini-cli -y
GitHub Copilot
$ npx skills add evanca/flutter-ai-rules --skill firebase-in-app-messaging -a github-copilot -y
OpenCode
$ npx skills add evanca/flutter-ai-rules --skill firebase-in-app-messaging -a opencode -y
Windsurf
$ npx skills add evanca/flutter-ai-rules --skill firebase-in-app-messaging -a windsurf -y
name: firebase-in-app-messaging description: "Use when running in-app message campaigns, triggering/suppressing messages, configuring opt-in data collection, testing on specific devices, rendering campaigns with custom Flutter widgets, or handling message callbacks." license: MIT
This skill defines how to correctly implement Firebase In-App Messaging in Flutter applications, covering setup, programmatic triggers, privacy controls, testing workflows, and campaign management.
Use this skill when:
---
flutter pub add firebase_in_app_messaging
import 'package:firebase_in_app_messaging/firebase_in_app_messaging.dart';
1. Confirm `Firebase.initializeApp()` completes before accessing In-App Messaging. 2. Create a test campaign in the Firebase console to verify the integration. 3. Locate the Installation ID for device-specific testing (see Testing section).
---
Use Google Analytics events to trigger in-app messages without additional code. For programmatic triggering:
// Trigger a message tied to a custom event
await FirebaseInAppMessaging.instance.triggerEvent("purchase_complete");class PaymentScreen extends StatefulWidget {
@override
State<PaymentScreen> createState() => _PaymentScreenState();
}
class _PaymentScreenState extends State<PaymentScreen> {
@override
void initState() {
super.initState();
// Suppress messages during payment
FirebaseInAppMessaging.instance.setMessagesSuppressed(true);
}
@override
void dispose() {
// Re-enable messages when leaving payment flow
FirebaseInAppMessaging.instance.setMessagesSuppressed(false);
super.dispose();
}
}---
By default, In-App Messaging automatically delivers messages to all targeted users.
**Disable automatic collection — iOS** (`Info.plist`):
<key>FirebaseInAppMessagingAutomaticDataCollectionEnabled</key> <false/>
**Disable automatic collection — Android** (`AndroidManifest.xml`):
<meta-data
android:name="firebase_inapp_messaging_auto_data_collection_enabled"
android:value="false" />**Enable for users who opt in at runtime:**
// Call after user consents to data collection
Future<void> enableMessaging() async {
await FirebaseInAppMessaging.instance.setAutomaticDataCollectionEnabled(true);
}
// Call if user revokes consent
Future<void> disableMessaging() async {
await FirebaseInAppMessaging.instance.setAutomaticDataCollectionEnabled(false);
}---
1. In the Firebase console, open the campaign and select **Test on your Device**. 2. Enter the Installation ID from the step above. 3. The test message appears on the next app launch or foreground event.
---
1. **Design** — Select the message type and customize appearance (title, body, image, button). 2. **Target** — Define the audience by app version, language, user segment, or Analytics-based conditions. 3. **Schedule** — Set start/end dates and frequency caps (once, once per session, etc.). 4. **Trigger** — Choose the Analytics event that displays the message (e.g., `app_open`, `purchase_complete`). 5. **Test** — Use device testing before publishing. 6. **Publish** — Launch the campaign and monitor performance.
---
By default, In-App Messaging draws native templates. To render campaigns with your own Flutter widgets, listen to `onMessageDisplay`, report the lifecycle back to the SDK, and opt in with `setCustomDisplayEnabled(true)`:
FirebaseInAppMessaging.instance.onMessageDisplay.listen((message) async {
await message.impress();
// Both are null for36 Flutter and Dart skills your coding agent loads by itself, sourced only from official documentation. A skill is a folder with a SKILL.md file.
Use when working on accessibility, a11y, WCAG, ARIA, screen readers, keyboard nav, focus order, contrast, alt text, captions,…
Use when creating a feature, designing folder structure, adding repositories/services/view models, wiring dependency injection,…
Use when creating a Cubit or Bloc, modeling state with sealed classes or status enums, wiring…
Use when asked to review a PR, MR, branch, or diff, audit changed files, or check code quality.
Use when writing switch statements, refactoring if-else chains, creating data classes, choosing records vs classes, destructuring…
Use when building AI agents in Dart, implementing Genkit flows or tools, integrating LLMs into Dart or Flutter applications, or…
You MUST use this before any creative work - creating features, building components, adding functionality, modifying behavior, or…
Ask which skill or flow fits your situation. A router over the skills in this repo.