Skip to content

Instantly share code, notes, and snippets.

View Anushi1998's full-sized avatar
🌴
On vacation

Anushi Maheshwari Anushi1998

🌴
On vacation
View GitHub Profile
@Anushi1998
Anushi1998 / sample.dart
Created November 5, 2020 04:50
go/edart/usage#consider-using--for-simple-members
int a=1;
void main() {
print(a);
b();
print(a);
}
void b() => a=2;
void main() {
ok();
ok(x:null);
}
void ok({
int x = 1,
}) {
print(x);
}
import 'dart:async';
void main() {
bool a = false;
StreamController controller = new StreamController(
onCancel: () {
a=true;
});