Fix local dev config and ALOTTTT OFF FLUTTER, im tired boss..

This commit is contained in:
Wowieee4
2026-05-26 21:09:13 +07:00
parent b8ad8df993
commit a629357e8c
72 changed files with 2566 additions and 530 deletions
@@ -0,0 +1,13 @@
import 'package:flutter/foundation.dart';
Future<T?> ignoreInitFailure<T>(
Future<T> Function() action, {
required String label,
}) async {
try {
return await action();
} catch (error) {
debugPrint('$label skipped: $error');
return null;
}
}
@@ -0,0 +1,18 @@
import 'dart:async';
Future<T?> guarded<T>(
Future<T> Function() action, {
void Function(Object error)? onError,
void Function()? onTimeout,
}) async {
try {
return await action();
} on TimeoutException catch (error) {
onTimeout?.call();
onError?.call(error);
return null;
} catch (error) {
onError?.call(error);
return null;
}
}