Skip to content

Instantly share code, notes, and snippets.

View aaronstgeorge-wf's full-sized avatar

Aaron St. George aaronstgeorge-wf

View GitHub Profile
@aaronstgeorge-wf
aaronstgeorge-wf / module_explorer.dart
Last active October 14, 2019 18:55
Small tool to print a mapping between module file "primary source" and dart files that are part of that module
import 'dart:convert';
import 'dart:core';
import 'dart:io';
main() {
final packageName = Directory.current.path.split('/').last;
final generated = new Directory('.dart_tool/build/generated/$packageName');
// The build system's documentation reads "[e]mit .module assets which contain
// a filtered view of the package level meta-module specific to a single
@aaronstgeorge-wf
aaronstgeorge-wf / bar.dart
Last active March 5, 2019 18:20
Typing causes RTE
import 'package:foo/foo.dart';
import 'package:over_react/over_react.dart';
// ignore: uri_has_not_been_generated
part 'bar.over_react.g.dart';
@Factory()
UiFactory<BarProps> Bar =
// ignore: undefined_identifier
_$Bar;
class A {
Function(dynamic _) thing;
}
void main() {
A()..thing = (int i) => i;
}
@aaronstgeorge-wf
aaronstgeorge-wf / main.dart
Created June 29, 2018 16:02
Skeleton of Dart Nes Emulator
import 'dart:async';
class Clock {
Future<Null> _tick;
final Duration _clockSpeed;
Clock(this._clockSpeed);
Future<Null> get nextTick => _tick;