Skip to content

Instantly share code, notes, and snippets.

View craigomac's full-sized avatar

Craig McMahon craigomac

View GitHub Profile
void main() {
final store = new Store<AppState>(
AppStateReducer(),
initialState: AppState.initial(),
middleware: [
AssetMiddleware("assets"),
AudioMiddleware(),
]);
runApp(new App(
class Asset {
final String assetPath;
final String filename;
Asset(this.assetPath, this.filename);
Future<String> prepare() async {
Directory directory = await getApplicationDocumentsDirectory();
String path = join(directory.path, filename);
class AssetsPrepareLevelsAction { }
class AssetMiddleware implements MiddlewareClass<AppState> {
final String pathToAssets;
AssetMiddleware(this.pathToAssets);
@override
Future call(Store<AppState> store, action, NextDispatcher next) async {
@craigomac
craigomac / flutter_widget.dart
Last active June 3, 2019 19:25
Flutter Widget
Padding(
child: Row(
children: <Widget>[
Text(user.name)
],
))
string public standard = 'CryptoPunks';
string public name;
string public symbol;
uint8 public decimals;
uint256 public totalSupply;
@craigomac
craigomac / emojisums.swift
Created April 28, 2016 13:02
Emoji Sums
struct Emoji {
var character: String
}
let emojiSums = [
"😐": ["😊", "😒"],
"😀": ["😊", "😊"],
"😭": ["😒", "😒"],
"🍖": ["🐔", "🔥"]
].map({(sum: $0, parts: $1.sorted())})