Skip to content

Instantly share code, notes, and snippets.

View bizz84's full-sized avatar

Andrea Bizzotto bizz84

View GitHub Profile
@bizz84
bizz84 / flutter-driver-mcp.md
Created November 11, 2026 10:49
Agent skill: let your coding agent drive a running Flutter app with the Dart MCP server and Flutter Driver (tap, scroll, enter text, screenshots)
name flutter-driver-mcp
description Set up a Flutter app so the Dart MCP server can drive it while it runs (tap, scroll, enter text, read widgets, take screenshots). Use when the agent should check its own work in the running app, or when Dart MCP can connect to an app but taps, scrolls, text entry or widget lookups fail.

Flutter Driver for the Dart MCP Server

@bizz84
bizz84 / main.dart
Created September 11, 2025 11:44
Sample project for dio.addSentry() issue on Flutter web
import 'dart:developer';
import 'package:dio/dio.dart';
import 'package:flutter/material.dart';
import 'package:sentry_dio/sentry_dio.dart';
import 'package:sentry_flutter/sentry_flutter.dart';
const String kSentryDsn = String.fromEnvironment('SENTRY_DSN');
const _gistTemplateUrl =
@bizz84
bizz84 / main.dart
Created September 11, 2025 09:47
Sample code for Riverpod issue #4282 (inconsistent provider lifecycle)
import 'package:flutter/material.dart';
import 'package:flutter_riverpod/flutter_riverpod.dart';
import 'package:package_info_plus/package_info_plus.dart';
import 'package:riverpod_annotation/riverpod_annotation.dart';
part 'main.g.dart';
void main() {
runApp(ProviderScope(child: const MainApp()));
}
@bizz84
bizz84 / voice_timer_app_prod.json
Last active June 20, 2025 15:24
Remote config for Voice Timer app (PROD)
{
"config" : {
"required_version": "1.0.0"
}
}
@bizz84
bizz84 / show_alert_dialog.dart
Last active September 8, 2025 18:33
Helper function for showing an adaptive alert dialog (Material, Cupertino)
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
/// Helper function for showing an adaptive alert dialog
/// Returns:
/// - true if the default action was selected
/// - false if the cancel action was selected
/// - null if the dialog was dismissed
Future<bool?> showAlertDialog({
required BuildContext context,
@bizz84
bizz84 / firebase_remote_config_provider.dart
Created April 29, 2025 13:19
Flutter Remote Config boilerplate code (using Riverpod)
import 'dart:async';
import 'dart:developer';
import 'package:firebase_remote_config/firebase_remote_config.dart';
import 'package:flutter/foundation.dart';
import 'package:flutter/services.dart';
import 'package:flutter_riverpod/flutter_riverpod.dart';
import 'package:riverpod_annotation/riverpod_annotation.dart';
part 'firebase_remote_config_provider.g.dart';
@bizz84
bizz84 / url_text_widget.dart
Last active April 11, 2025 13:40
Helper widget to show native-looking URLs on Flutter web
import 'package:flutter/gestures.dart';
import 'package:flutter/material.dart';
import 'package:url_launcher/link.dart';
/// Helper widget to show native-looking URLs on Flutter web
class URLTextWidget extends StatelessWidget {
const URLTextWidget({
super.key,
required this.uri,
this.overflow = TextOverflow.ellipsis,
@bizz84
bizz84 / build-upload-ios.sh
Created November 26, 2024 11:35
Simple script to build and upload the IPA file to App Store Connect
#!/bin/bash
# Script to build and upload the ipa file to App Store Connect
# Exit immediately if any command fails
set -e
# Validate that the API Key ID and Issuer ID are set
if [[ -z ${APP_STORE_CONNECT_KEY_ID} ]]; then
echo "Please set APP_STORE_CONNECT_KEY_ID as an environment variable."
exit 1
@bizz84
bizz84 / update-android-project.sh
Last active January 30, 2026 02:25
Script to update Gradle, Java and other Android project settings in a Flutter project
#!/bin/bash
# Update Gradle, Java and other Android project settings in a Flutter project
# Works with both .gradle and .gradle.kts build files
# See: https://gradle.org/releases/
# See: https://developer.android.com/build/releases/gradle-plugin#compatibility
DESIRED_GRADLE_VERSION="8.11.1"
# Build errors often show the required Java version
DESIRED_JAVA_VERSION="17"
# See: https://developer.android.com/ndk/downloads
@bizz84
bizz84 / app_name_remote_config.json
Created October 7, 2024 13:38
Remote config template JSON for a Flutter app
{
"config" : {
"required_version": "2.0.0"
}
}