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
import 'package:bloc/bloc.dart'; | |
class SomeState { | |
final bool isLoading; | |
final int data; | |
SomeState({this.isLoading = false, this.data = 0}); | |
SomeState copyWith({bool isLoading, int data}) { | |
return SomeState( |
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 SomeState { | |
int counter = 0; | |
Stream<int> stream() async* { | |
yield counter += 1; | |
yield counter += 1; | |
print('at the end of stream counter is $counter'); | |
} | |
} |
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
// Originally from: https://github.com/lbv/litjson/pull/7#issuecomment-28179440 | |
#region Header | |
/** | |
* JsonMapper.cs | |
* JSON to .Net object and object to JSON conversions. | |
* | |
* The authors disclaim copyright to this source code. For more details, see | |
* the COPYING file included with this distribution. | |
**/ |
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
body { | |
color: #222; | |
font-family: Droid Sans, Verdana, sans-serif; | |
font-size: 100%; | |
line-height: 140%; | |
margin: auto; | |
max-width: 48em; | |
padding-right: 1em; | |
padding-left: 1em; | |
} |
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
/** | |
* Palette of basic colors, based on the Tango Icon Theme | |
* Guidelines. | |
*/ | |
// In hexadecimal | |
var $colors = { | |
yellow : [ 0xfce94f, 0xedd400, 0xc4a000 ], | |
orange : [ 0xfcaf3e, 0xf57900, 0xce5c00 ], | |
brown : [ 0xe9b96e, 0xc17d11, 0x8f5902 ], |