- native: 3,500 image queries
- database with 59,695 images
- find top 50 images
QUERY TIME: 423.687 seconds
real 7m3.922s
void main() { | |
final b = Bird(); | |
print('$b is ${b.fly()}'); | |
print('$b is ${b.peck()}'); | |
} | |
class Bird with Peck { | |
String fly() => 'flying'; | |
} |
import 'dart:async'; | |
class DateTimeGenerator { | |
DateTimeGenerator() { | |
final tenSecsAfterNow = DateTime.now().add(Duration(seconds: 10)); | |
// timer with 10 secs lifetime | |
Timer.periodic(Duration(seconds: 1), (t) { | |
_date = _date.add(Duration(seconds: 1)); | |
_controller.sink.add(_date); |
void main() async { | |
/// Both functions init at the same time, Future.any() will return the first one available | |
final dynamic firstResult = await Future.any([asyncF(), asyncG()]); | |
/// firstResult can be an integer or a string, thus the 'dynamic' type. | |
print('$firstResult. Returned value is a ${firstResult.runtimeType}'); | |
} | |
Future<int> asyncF() async { | |
print('asyncF init'); |