Definitionپێناسە
The two Dart keywords for asynchronous code: async marks a function as asynchronous, and await, allowed only inside it, pauses that function until a completes, while the keeps the rest of the app running.
دوو وشە کلیلەییەکەی Dartـن بۆ کۆدی ناهاوکات: async کردارێک وەک ناهاوکات نیشانە دەکات و await، کە تەنها لە ناویدا ڕێگەپێدراوە، ئەو کردارە ڕادەگرێت تا تەواو دەبێت، لە کاتێکدا بەشەکانی تری ئەپەکە بەردەوام کارا دەهێڵێتەوە.
Exampleنموونە
Without await the code prints "Instance of 'Future<String>'" instead of the text.
بەبێ await کۆدەکە "Instance of 'Future<String>'" چاپ دەکات لە جیاتی دەقەکە.
Future<void> main() async {
print('Start');
final text = await readFile(); // waits here only
print(text);
print('End');
}Note on the Kurdish termتێبینی دەربارەی زاراوە کوردییەکە
The owner's bilingual paper «جیاوازیی نێوان کرداری ئاسایی و داهاتوویی لە فڵەتەردا» has a section «هەردوو وشەی ”Async“ و ”Await“» and keeps both words in Latin. In-use.
Related termsزاراوە پەیوەندیدارەکان
Videosڤیدیۆکان
Learn more inزیاتر فێربە لە
- Futures, async and await in DartFuture،
asyncوawaitلە Dartـدا - Synchronous and Asynchronous Workکاری هاوکات و ناهاوکات
- Navigation: Moving Between Screensڕێنیشاندان: جووڵان لە نێوان شاشەکاندا
- Stateless and Stateful Widgetsویجێتە بێدۆخەکان و ویجێتە دۆخدارەکان
- Getting Data from the Internet: HTTP and JSONوەرگرتنی دراوە لە ئینتەرنێت: HTTP و JSON