myanmarlinks
6/13/2019 - 3:21 PM

Dart Await and Async

Dart Await and Async

import 'dart:async';

const data = "I'm expansive data";

Future<void> makeDataCall() async {
  var data = await getData();
  print(data);
}

String getData() {
  return data;
}

void main(List<String> args) {
  makeDataCall();
}