Skip to content

Instantly share code, notes, and snippets.

View bizz84's full-sized avatar

Andrea Bizzotto bizz84

View GitHub Profile
@bizz84
bizz84 / app_release_template.json
Last active February 14, 2026 12:40
An app release checklist template for Flutter app development
{
"template": "App Release",
"version": 7,
"epics": [
{
"id": "ai",
"epic": "App Icons",
"tasks": [
{ "id": "7DA5766A", "name": "Design your app icon (IconKitchen, Figma)" },
{ "id": "029C2183", "name": "Different icons for each flavor" },
@bizz84
bizz84 / flutter_bootstrap.js
Created May 21, 2024 08:40
Custom Flutter Web App Initialization Logic with CSS Loader
{{flutter_js}}
{{flutter_build_config}}
// Manipulate the DOM to add a loading spinner will be rendered with this HTML:
// <div class="loading">
// <div class="loader" />
// </div>
const loadingDiv = document.createElement('div');
loadingDiv.className = "loading";
document.body.appendChild(loadingDiv);
@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 / 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 / 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 / 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 / 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 / triple_tap_detector.dart
Last active June 29, 2025 02:56
Custom TripleTapDetector widget using RawGestureDetector
import 'package:flutter/gestures.dart';
import 'package:flutter/material.dart';
class TripleTapDetector extends StatelessWidget {
const TripleTapDetector({
super.key,
required this.child,
required this.onTripleTap,
});
final Widget child;
@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"
}
}