Skip to content

Instantly share code, notes, and snippets.

View ky1vstar's full-sized avatar

Aleksandr Zhuhan ky1vstar

View GitHub Profile
@ky1vstar
ky1vstar / prevent_web_context_menu.dart
Last active September 18, 2025 09:09
PreventWebContextMenu
import 'package:flutter/material.dart';
import 'package:flutter/rendering.dart';
import 'setup_io.dart'
if (dart.library.html) 'setup_web.dart';
class PreventWebContextMenu extends StatefulWidget {
const PreventWebContextMenu({
super.key,
this.shouldPrevent = true,
required this.child,
@ky1vstar
ky1vstar / StoreKit+Rx.swift
Created August 18, 2023 11:54
StoreKit+Rx
import Foundation
import StoreKit
import RxSwift
import RxCocoa
extension SKRequest: HasDelegate {}
class RxSKRequestDelegateProxy:
DelegateProxy<SKRequest, SKRequestDelegate>,
DelegateProxyType,
void main() {
final now = DateTime.now();
final nowUtc = now.toUtc();
final nowLocal = now.toLocal();
print(nowUtc == nowLocal);
print(nowUtc.millisecondsSinceEpoch == nowLocal.millisecondsSinceEpoch);
}
// Usage:
let labelText = BehaviorRelay(value: "Text 1")
let label = UILabel()
label.bind.text = labelText
let textViewText = Driver<String>.just("Text 2")
let textView = UITextView()
textView.bind.text = textViewText