Skip to content

Instantly share code, notes, and snippets.

Avatar

Craig McMahon craigomac

  • eBay
  • Amsterdam, The Netherlands
View GitHub Profile
View flutter_main.dart
void main() {
final store = new Store<AppState>(
AppStateReducer(),
initialState: AppState.initial(),
middleware: [
AssetMiddleware("assets"),
AudioMiddleware(),
]);
runApp(new App(
View flutter_asset.dart
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);
View flutter_redux_middleware.dart
class AssetsPrepareLevelsAction { }
class AssetMiddleware implements MiddlewareClass<AppState> {
final String pathToAssets;
AssetMiddleware(this.pathToAssets);
@override
Future call(Store<AppState> store, action, NextDispatcher next) async {
View flutter_widget.dart
Padding(
child: Row(
children: <Widget>[
Text(user.name)
],
))
View cryptopunks-erc20.sol
string public standard = 'CryptoPunks';
string public name;
string public symbol;
uint8 public decimals;
uint256 public totalSupply;
View emojisums.swift
struct Emoji {
var character: String
}
let emojiSums = [
"😐": ["😊", "😒"],
"😀": ["😊", "😊"],
"😭": ["😒", "😒"],
"🍖": ["🐔", "🔥"]
].map({(sum: $0, parts: $1.sorted())})
You can’t perform that action at this time.