Skip to content

Instantly share code, notes, and snippets.

View bizz84's full-sized avatar

Andrea Bizzotto bizz84

View GitHub Profile
@bizz84
bizz84 / flutter_ship_remote_config.json
Last active October 7, 2024 11:40
Remote config for the Flutter Ship app (stg flavor)
{
"config" : {
"required_version": "0.3.0"
}
}
@bizz84
bizz84 / flutter_ship_remote_config.json
Last active October 7, 2024 11:44
Remote config for the Flutter Ship app (dev flavor)
{
"config" : {
"required_version": "0.4.0"
}
}
@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 / future_ignore_wtf.dart
Created August 2, 2024 09:06
Example showing that Future.ignore() doesn't work as expected
import 'dart:async';
import 'dart:developer';
import 'package:flutter/foundation.dart';
import 'package:flutter/material.dart';
void main() {
FlutterError.onError = (details) {
log('FlutterError error: ${details.exception}');
FlutterError.presentError(details);
@bizz84
bizz84 / go_router_basic.dart
Created June 23, 2024 20:07
Simple GoRouter navigation to a details page
import 'package:flutter/material.dart';
import 'package:go_router/go_router.dart';
final _router = GoRouter(
routes: [
GoRoute(
path: '/',
builder: (context, state) => const HomeScreen(),
routes: [
GoRoute(
@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 / logger_interceptor.dart
Created May 13, 2024 07:38
Simple logger interceptor for Dio without extra dependencies
import 'dart:developer';
import 'package:dio/dio.dart';
/// A simple interceptor used to log all network requests
/// For more details, see: https://github.com/bizz84/flutter-tips-and-tricks/blob/main/tips/0152-log-status-code-emoji/index.md
class LoggerInterceptor implements Interceptor {
final stopwatches = <String, Stopwatch>{};
@override
@bizz84
bizz84 / app_release_template.json
Last active February 6, 2025 10:43
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 / responsive_center_scrollable.dart
Last active April 30, 2024 08:05
A responsive centered scrollable layout that enables mouse scrolling outside the centered scrollable area
import 'package:flutter/gestures.dart';
import 'package:flutter/material.dart';
void main() {
runApp(const MainApp());
}
class MainApp extends StatelessWidget {
const MainApp({super.key});
@bizz84
bizz84 / privacy-manifest-list.txt
Created March 27, 2024 12:18
Bash script to check if the Podfile.lock contains any SDKs that should be declared in the privacy manifest file
Abseil
AFNetworking
Alamofire
AppAuth
BoringSSL / openssl_grpc
Capacitor
Charts
connectivity_plus
Cordova
device_info_plus