Skip to content

Instantly share code, notes, and snippets.

MyInheritedWidget.of(context).myProperty
RxCommandListener<ImageStorageRequest, ImageLocation> selectImageListener;
RxCommandListener<ChatEntry, void> deleteChatEntryListener;
@override
void initState() {
super.initState();
selectImageListener = RxCommandListener(
command: sl.get<ImageManager>().selectAndUploadImageCommand,
onValue: (imageLocation) async {
@escamoteur
escamoteur / nextField.dart
Created September 13, 2019 12:22
So easy is it now to implement a next field behavior for forms, meaning that the focus is moved as soon the user tabs the next button on the keyboard
class _MyHomePageState extends State<MyHomePage>
with SingleTickerProviderStateMixin {
TabController _tabController;
FocusScopeNode _node = FocusScopeNode(); /// <-----------------
@override
void initState() {
_tabController = TabController(length: 3, vsync: this);
@escamoteur
escamoteur / error_capture.dart
Created September 20, 2019 09:24
Helper class to send event to sentry
import 'dart:async';
import 'dart:io';
import 'dart:ui' as ui show window;
import 'package:connectivity/connectivity.dart';
import 'package:device_info/device_info.dart';
import 'package:flutter/foundation.dart';
import 'package:flutter/widgets.dart';
import 'package:package_info/package_info.dart';
GetIt supports since recently a mechanic to make initialization of registered
Instances easier.
The idea is that you can mark Singletons/LazySingletons that they will signal
when they are ready.
You then can wait for either that all are ready or that one of them is ready or
trigger the readyFuture manually
In case of a timeout you get detailed debug information.

Hi, I have the problem that a Test that is used in the demo of rx_widgets longer works:

test('should filter after the user stops typing for 500ms', () async {
    // Use FakeAsync from the Quiver package to simulate time
    new FakeAsync().run((time) {
    final service = new MockService();
    final model = new HomePageModel(service);

    when(service.getWeatherEntriesForCity(any))

PS C:\Entwicklung\Projects\Aaronia\trunk\Sources\RTSAMobileDev\aartos> flutter run -d windows -v [ +26 ms] executing: [C:\Entwicklung\Flutter/] git -c log.showSignature=false log -n 1 --pretty=format:%H [ +61 ms] Exit code 0 from: git -c log.showSignature=false log -n 1 --pretty=format:%H [ ] ec1044a8773e31b4630bf162d9c374236ad1eaaf [ ] executing: [C:\Entwicklung\Flutter/] git describe --match v*.. --first-parent --long --tags [ +84 ms] Exit code 0 from: git describe --match v*.. --first-parent --long --tags [ ] v1.14.1-51-gec1044a877 [ +7 ms] executing: [C:\Entwicklung\Flutter/] git rev-parse --abbrev-ref --symbolic @{u} [ +39 ms] Exit code 0 from: git rev-parse --abbrev-ref --symbolic @{u} [ ] origin/master

// return Column(
// mainAxisSize: MainAxisSize.min,
// children: <Widget>[
// Container(
// height: 50.0,
// color: Colors.red,
// ),
// Row(
// crossAxisAlignment: CrossAxisAlignment.start,
// children: <Widget>[
let withdrawWithAudit = withdraw |> auditAs "withdraw" Auditing.fileSystem
let depositWithAudit = deposit |> auditAs "deposit" Auditing.fileSystem
while true do
let action =
Console.WriteLine()
printfn "Current balance is £%M" account.Balance
Console.Write "(d)eposit, (w)ithdraw or e(x)it: "
Console.ReadLine()
open System
open MailKit.Net.Imap
open MailKit
open MimeKit
type FolderInfo = {
name : string
size : uint64
}