Skip to content

Instantly share code, notes, and snippets.

View bizz84's full-sized avatar

Andrea Bizzotto bizz84

View GitHub Profile
@bizz84
bizz84 / update-android-project.sh
Created November 18, 2024 09:17
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
# See: https://gradle.org/releases/
DESIRED_GRADLE_VERSION="8.9"
# Build errors often show the required Java version
DESIRED_JAVA_VERSION="17"
# See: https://developer.android.com/ndk/downloads
DESIRED_NDK_VERSION="27.0.12077973"
# The minimum Android SDK version
@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 / 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 / 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
import 'package:flutter/material.dart';
import 'package:go_router/go_router.dart';
void main() {
WidgetsFlutterBinding.ensureInitialized();
GoRouter.setUrlPathStrategy(UrlPathStrategy.path);
runApp(const MyApp());
}
class MyApp extends StatelessWidget {
@bizz84
bizz84 / fa-01.01-color-number-game.dart
Last active November 17, 2024 00:13
Color/Number Game with Flutter Implicit Animations
import 'dart:async';
import 'dart:math';
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
void main() {
runApp(const MyApp());
}
@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"
}
}
@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 / flutter_ship_remote_config.json
Last active October 7, 2024 11:40
Remote config for the Flutter Ship app (prod flavor)
{
"config" : {
"required_version": "0.3.0"
}
}
@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"
}
}