Future<bool> _getFutureBool() {
return Future.delayed(Duration(milliseconds: 500)) .then((onValue) => true);
}
// example 2
print('1');
Future.delayed(const Duration(milliseconds: 500), () {
print('Hello, world');
});
print('2');
출처: https://dkanxmstmdgml.tistory.com/153 [달려라 승이]