One of the options for creating an app at this year's DevCamp is Flutter, Google's open source SDK for building native iOS and Android apps from a single codebase. The Flutter team will be hanging around at the event, and for those of you interested in giving Flutter a try, we've prepared this gist as an installation cheat sheet.
This file contains hidden or 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
| final Serializers serializers = | |
| (_$serializers.toBuilder()..addPlugin(StandardJsonPlugin())).build(); |
This file contains hidden or 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
| [ | |
| "SimpleObject", | |
| "aString", | |
| "Blah, blah, blah", | |
| "anInt", | |
| 1, | |
| "aDouble", | |
| 2.0 | |
| ] |
This file contains hidden or 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
| { | |
| "$": "SimpleObject", | |
| "aString": "Blah, blah, blah", | |
| "anInt": 1, | |
| "aDouble": 2.0 | |
| } |
This file contains hidden or 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 MyApp extends StatelessWidget { | |
| Stream<int> _countUp() async* { | |
| for (int i = 1; i <= 10; i++) { | |
| yield await Future.delayed(Duration(seconds: 1), () => i); | |
| } | |
| } | |
| @override | |
| Widget build(BuildContext context) { | |
| return MaterialApp( |
This file contains hidden or 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
| # Miscellaneous | |
| *.class | |
| *.lock | |
| *.log | |
| *.pyc | |
| *.swp | |
| .DS_Store | |
| .atom/ | |
| .buildlog/ | |
| .history |
This file contains hidden or 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
| <!-- Copyright 2011 the Dart project authors. All rights reserved. | |
| Use of this source code is governed by a BSD-style license | |
| that can be found in the LICENSE file. --> | |
| <h2>This is some HTML, just in case.</h2 | |
| > |
This file contains hidden or 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 stringify(int x, int y) { | |
| // Return a formatted string here | |
| } |
This file contains hidden or 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 thisIsADartMethod() { | |
| int blah = 2++; | |
| } |
This file contains hidden or 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() { | |
| print('This is a test main().'); | |
| } |