Skip to content

Instantly share code, notes, and snippets.

import 'dart:async';
import 'package:flutter/material.dart';
class GraphView extends StatefulWidget {
const GraphView({super.key});
@override
State<GraphView> createState() => _GraphViewState();
}
import 'package:bloc_presentation/bloc_presentation.dart';
import 'package:flutter/material.dart';
import 'package:flutter_bloc/flutter_bloc.dart';
sealed class CounterPresentationEvent {}
class ShowEncouragementSnackBar extends CounterPresentationEvent {
final int remaining;
ShowEncouragementSnackBar(this.remaining);
}
@bambuh
bambuh / RxCoreStoreListObserver.swift
Last active October 3, 2018 20:14
CoreStore RxSwift List Observer
import Foundation
import RxSwift
import RxCocoa
import CoreStore
private class RxCoreStoreListObserver<B: FetchChainableBuilderType>: Disposable where B.ObjectType: NSManagedObject {
private var monitor: ListMonitor<B.ObjectType>!
@bambuh
bambuh / RxCoreStorePropertyObserver.swift
Last active October 3, 2018 20:15
CoreStore RxSwift Property Observer
import Foundation
import RxSwift
import RxCocoa
import CoreStore
private class RxCoreStorePropertyObserver<ObjectEntity: NSManagedObject, Property>: Disposable {
private var monitor: ObjectMonitor<ObjectEntity>!
private var propertyKeyPath: KeyPath<ObjectEntity, Property>!