This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
void main() { | |
final store = new Store<AppState>( | |
AppStateReducer(), | |
initialState: AppState.initial(), | |
middleware: [ | |
AssetMiddleware("assets"), | |
AudioMiddleware(), | |
]); | |
runApp(new App( |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class AssetsPrepareLevelsAction { } | |
class AssetMiddleware implements MiddlewareClass<AppState> { | |
final String pathToAssets; | |
AssetMiddleware(this.pathToAssets); | |
@override | |
Future call(Store<AppState> store, action, NextDispatcher next) async { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Padding( | |
child: Row( | |
children: <Widget>[ | |
Text(user.name) | |
], | |
)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
string public standard = 'CryptoPunks'; | |
string public name; | |
string public symbol; | |
uint8 public decimals; | |
uint256 public totalSupply; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
struct Emoji { | |
var character: String | |
} | |
let emojiSums = [ | |
"😐": ["😊", "😒"], | |
"😀": ["😊", "😊"], | |
"😭": ["😒", "😒"], | |
"🍖": ["🐔", "🔥"] | |
].map({(sum: $0, parts: $1.sorted())}) |