I hereby claim:
- I am jodinathan on github.
- I am jonathanrezende (https://keybase.io/jonathanrezende) on keybase.
- I have a public key ASDyOuys-vhGZARfny2WNtzFeimEKPh-im5_n4_nH_qwHAo
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
| extension AdvObj on Object { | |
| bool get isNotNull => this != null; | |
| } | |
| void main() async { | |
| String a; | |
| print(a.isNotNull ? 'not null' : 'null'); | |
| a = 'ooooo'; | |
| extension AdvObj on Object { | |
| bool get isNotNull => this != null; | |
| } | |
| void main() async { | |
| String a; | |
| print(a.isNotNull ? 'not null' : 'null'); | |
| a = 'ooooo'; | |
| Stream<T> transformInto<T, Y>(Stream<Y> stream, T Function(Y item) fn, | |
| {bool? cancelOnError}) { | |
| StreamSubscription<T> _change(Stream<Y> input, bool cancelOnError) { | |
| late StreamSubscription<Y> subscription; | |
| // Create controller that forwards pause, resume and cancel events. | |
| final controller = StreamController<T>( | |
| onPause: () { | |
| subscription.pause(); |
| import 'dart:async'; | |
| class A { | |
| var ctrl = StreamController(); | |
| var cc = 0; | |
| run() { | |
| ctrl.stream.forEach((ev) { | |
| print(ev ?? 0); | |
| }); |
| { | |
| "info": { | |
| "_postman_id": "79c9c0a7-a552-4cef-85f9-9a7d4f3bf343", | |
| "name": "Nutror", | |
| "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json" | |
| }, | |
| "item": [ | |
| { | |
| "name": "courses", | |
| "item": [ |
| class A<T extends dynamic> { | |
| Function(A<T>) go; | |
| } | |
| class B<T extends dynamic> extends A<T> { | |
| } | |
| void main() async { |
| class Complex { | |
| num _real; | |
| num _imaginary; | |
| num get real => _real; | |
| num get imaginary => _imaginary; | |
| set real(num r) { | |
| if(r < 0) return; | |
| _real = r; | |
| } |
| class Complex { | |
| num _real; | |
| num _imaginary; | |
| num get real => _real; | |
| num get imaginary => _imaginary; | |
| set real(num r) { | |
| if(r < 0) return; | |
| _real = r; | |
| } |
| void foo({String bar = 'hi'}) { | |
| print(bar); | |
| } | |
| void main() async { | |
| bool s = true; | |
| foo(bar: s ? 'hello' : null); | |
| s = false; |