Skip to content

Instantly share code, notes, and snippets.

View Mairramer's full-sized avatar

Mairramer Mairramer

View GitHub Profile
@bizz84
bizz84 / update-android-project.sh
Last active October 23, 2025 02:26
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
@Grohden
Grohden / android-Appfile
Last active July 22, 2024 07:24
Release Flutter fastlane + azure pipelines (based on chimon2000/03b0fb1fa2f96c5933e3c9cb1ba59bc7 gist)
package_name("com.foo.bar")
import 'dart:convert';
import 'dart:ui';
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
class AppLocalizations {
AppLocalizations(this.locale);
final Locale fallbackLocale = Locale('en');
static AppLocalizations of(BuildContext context) {
@vovahost
vovahost / main.dart
Created February 27, 2019 14:20
CancelableOperation and CancelableCompleter usage example
import 'package:async/async.dart';
import 'package:flutter_test/flutter_test.dart';
void main() {
test("CancelableOperation with future", () async {
var cancellableOperation = CancelableOperation.fromFuture(
Future.value('future result'),
onCancel: () => {print('onCancel')},
);