run function
dynamic
run(
- dynamic dealing()
'run' is useful when your lambda contains both the object initialization and the computation of the return value.
dealing
is a function with an argument it
should return a 'value'.
the 'value' return by dealing
is the return value of let function.
for example,
final a = run(() {
final b = "123"
;
final c = 567
;
return []..addAll(b)..addAll(c);
});
print(a); > 123, 567
Implementation
dynamic run(dynamic Function() dealing) {
return dealing();
}