Skip to content

Instantly share code, notes, and snippets.

View SergeShkurko's full-sized avatar
🟢
Online

Serge Shkurko SergeShkurko

🟢
Online
View GitHub Profile
@SergeShkurko
SergeShkurko / main.dart
Created October 10, 2025 14:21
Test exercise for Flutter (Race condition)
class Result {
final dynamic value;
final bool isSuccess;
Result.success(this.value) : isSuccess = true;
Result.error() : value = null, isSuccess = false;
}
Future<List<Result>> allSettled(List<Future> futures) async {
return [];
@SergeShkurko
SergeShkurko / error_handler.dart
Last active November 22, 2022 16:45 — forked from Andrious/error_handler.dart
An Flutter Error Handler Routine [null safety, flutter v3]
// ignore_for_file: use_string_buffers
import 'dart:async' show runZoned, runZonedGuarded;
import 'dart:isolate' show Isolate, RawReceivePort;
import 'dart:ui' as ui
show
Paragraph,
ParagraphBuilder,
ParagraphConstraints,
ParagraphStyle,
@SergeShkurko
SergeShkurko / AppDelegate.swift
Created October 14, 2019 13:22
Flutter migrate from Objective C to Swift
import UIKit
import Flutter
@UIApplicationMain
@objc class AppDelegate: FlutterAppDelegate {
override func application(
_ application: UIApplication,
didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?
) -> Bool {
GeneratedPluginRegistrant.register(with: self)