final stormTroopers = [1,2,3];
stormTroopers.remove('1');
- [1,2,3]
- ['1',2,3]
- [2,3]
- Exception
final stormTroopers = [1,2,3];
stormTroopers.remove('1');
- [1,2,3]
- ['1',2,3]
- [2,3]
- Exception
abstract class Sith {
int hands = 2;
factory Sith.create() => new Grivus();
}
class Grivus implements Sith {
int hands = 8;
}
Sith.create().hands;
abstract class Sith {
int hands = 2;
factory Sith.create() => new Grivus();
}
class Grivus implements Sith {
int hands = 8;
}
Sith.create().hands;
final rebels = [1, 'vookie', false]
- String
- bool
- dynamic
- Object
final rebels = [1, 'vookie', false]
- String
- bool
- dynamic
- Object
final darkSide = Future.value(0)
.then((_) => throw ArgumentError())
.catchError((Object _) => 'Starkiller');
darkSide.then((val) => print(val));
- 'Starkiller'
- Unhandled exception
- Argument error
- 3
final darkSide = Future.value(0)
.then((_) => throw ArgumentError())
.catchError((Object _) => 'Starkiller');
darkSide.then((val) => print(val));
- 'Starkiller'
- Unhandled exception
- Argument error
- 3
Future testFunction() async {
print('Enakin is Here!');
}
testFunction();
print('Vader is Here!');
- Enakin is Here! Vader is Here!
- Nothing
- Don't know
- Vader is Here! Enakin is Here!
Future testFunction() async {
print('Enakin is Here!');
}
testFunction();
print('Vader is Here!');
- Enakin is Here! Vader is Here!
- Nothing
- Don't know
- Vader is Here! Enakin is Here!