Skip to content

Instantly share code, notes, and snippets.

View blaqshyd's full-sized avatar
:bowtie:
Activ like Chivita 💆🏾‍♂️

Daniel A blaqshyd

:bowtie:
Activ like Chivita 💆🏾‍♂️
View GitHub Profile
@blaqshyd
blaqshyd / upgrade-android.sh
Last active February 4, 2026 19:37
Automated Android Toolchain Upgrader for Flutter Projects
#!/usr/bin/env bash
# Strict mode: Exit on error, undefined vars, or pipe failures
set -euo pipefail
# ==================================================
# CONFIG — Define your target environment here
# ==================================================
DESIRED_GRADLE_VERSION="8.13"
DESIRED_JAVA_VERSION="17"
DESIRED_NDK_VERSION="29.0.14206865"
@blaqshyd
blaqshyd / update-android-project.sh
Last active January 23, 2026 16:01 — forked from bizz84/update-android-project.sh
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
void main() async {
WidgetsFlutterBinding.ensureInitialized();
await Firebase.initializeApp(
options: DefaultFirebaseOptions.currentPlatform,
);
await NotificationService.instance.initialize();
//YOUR OTHER CODE CAN COME IN HERE
runApp(const MyApp());
@blaqshyd
blaqshyd / try_catch.dart
Created February 24, 2025 23:13 — forked from sunderee/try_catch.dart
Native Dart helpers that use records to return the result or thrown error/exception object.
(T?, Object?) tryCatch<T extends Object>(T Function() function) {
try {
final result = function.call();
return (result, null);
} catch (error) {
return (null, error);
}
}
Future<(T?, Object?)> tryCatchAsync<T extends Object>(
@blaqshyd
blaqshyd / !Pods.md
Created January 12, 2025 00:04 — forked from jogboms/!Pods.md
Re-implementing Riverpod
@blaqshyd
blaqshyd / multi_progress_indicator.dart
Last active January 30, 2025 16:49 — forked from logickoder/multi_progress_indicator.dart
Multi-progress Password Validator and Indicator
import 'package:flutter/material.dart';
/// A progress indicator that is divided into sections, each section represents a part of the total progress
/// The current position of the progress indicator is represented by the [current] property
/// The [sections] property represents the sections of the progress indicator
/// The length of the [sections] list represents the total number of sections
class MultiProgressIndicator extends StatelessWidget {
/// The current position of the progress indicator in relation to the sections
final int current;
@blaqshyd
blaqshyd / build.gradle
Created December 18, 2024 19:16 — forked from Software78/build.gradle
LadyBug fix
allprojects {
repositories {
google()
mavenCentral()
}
}
rootProject.buildDir = '../build'
subprojects {
afterEvaluate { project ->
import 'dart:async';
import 'package:flutter/foundation.dart';
import 'package:flutter/material.dart';
import 'package:uri/uri.dart';
class PathRouteMatch {
PathRouteMatch({
required this.parameters,
required this.route,

App review - spawn a review only when user meets a threashold

Still Testing

import 'dart:math';

import 'package:flutter_dotenv/flutter_dotenv.dart';
import 'package:in_app_review/in_app_review.dart';
import 'package:zylag/core/data/local_data_source.dart';
import 'package:zylag/core/data/typedefs.dart';