What is a future data type in Flutter

0 votes

Hi Guys,

I am new in Flutter. I want to create one asynchronous function using future data types in Flutter. How can I do that?

Aug 11, 2020 in Others by akhtar
• 38,240 points
330 views

1 answer to this question.

0 votes

Hi@akhtar,

Future is a type that ‘comes from the future’ and returns a value from your asynchronous function. It can complete with success or with an error. You can also see the below-given example.

void main() async {
  await waitForMe();
  print('I was waiting here :)');
}Future waitForMe() async {
  print('Started.');
  return Future.delayed(Duration(seconds: 5), () {
    print("Now I'm done!");
  });
}
answered Aug 11, 2020 by MD
• 95,340 points

Related Questions In Others

0 votes
1 answer

What is a name function in JavaScript & how to define it?

A named function declares a name as ...READ MORE

answered Mar 7, 2019 in Others by Frankie
• 9,830 points
700 views
0 votes
1 answer

What is Material Design in Flutter?

Hi@akhtar, Material is a design system created by ...READ MORE

answered Jul 23, 2020 in Others by MD
• 95,340 points
212 views
0 votes
1 answer
0 votes
0 answers

What is DynamoDB number and string data type storage space

What is the storage space for a ...READ MORE

Apr 5 in Others by Kichu
• 16,050 points
16 views
0 votes
1 answer

What is the future of flutter?

Hi@MD, Flutter is a rather new cross-platform framework ...READ MORE

answered Jul 17, 2020 in Others by akhtar
• 38,240 points
333 views
0 votes
1 answer

What is Flutter?

Hi@akhtar, Flutter is an app SDK for building ...READ MORE

answered Jul 17, 2020 in Others by MD
• 95,340 points
467 views
0 votes
1 answer

How to install Flutter in Windows system?

Hi@akhtar, You can follow the below-given steps to ...READ MORE

answered Jul 17, 2020 in Others by MD
• 95,340 points
799 views
0 votes
1 answer

What is pubspec.yaml file in Flutter?

Hi@akhtar, It is the project's configuration file that ...READ MORE

answered Jul 20, 2020 in Others by MD
• 95,340 points
1,699 views
0 votes
1 answer

What is Hot Reload in Flutter?

Hi@akhtar, The hot reload feature allows you to ...READ MORE

answered Jul 20, 2020 in Others by MD
• 95,340 points
500 views
webinar REGISTER FOR FREE WEBINAR X
Send OTP
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP