Skip to main content
ProductsDesktop toolsTASTECADDrawing reviewTASTEFILESFile managementTASTEFTPFile transferTASTESSHRemote workspaceTASTEZIPCompression and extractionTASTEWINMFile managementDeveloper toolsTASTECODERust integrated development environmentTASTESTUDIOIntegrated development and test environmentTASTEETLData integration (ETL)ServersTASTEREMOTERemote desktop serverTASTEGEOGeospatial serverTASTEMAILMail workspaceInvestingTASTESTOCKStock auto-trading desktop appGet startedDownloadsDocumentationBuyAll products
Marketplace
News
TechNewsToday's dev newsDeveloper docsProgramming languagesRustTypeScriptJavaScriptPythonGoC#JavaCC++KotlinDartWeb front-end frameworksNext.jsReactVue.js · NuxtSvelteKitAngularServer frameworksSpring BootDjangoFastAPIASP.NET CoreNestJS · ExpressApp & desktop frameworksTauriFlutterReact NativeElectronAlgorithmsAlgorithm basicsCore algorithmsAdvanced algorithmsPractical algorithms
CommunityProjectsDevelopment logsPromptsAI tool issuesShowcaseCommunity guide
Work with usTech transferWebsite buildDesktop app buildRelease and payment pipelineSales partnerContact
ServicesRemote desktopCustom installer packages
TASTEDEV
Products

Desktop tools

TASTECADComplex drawings, opened with easeTASTEFILESJust the files you need, as fast as possibleTASTEFTPThe tidiest path for your filesTASTESSHA stronger link between you and your serversTASTEZIPPack faster, unpack saferTASTEWINMA keyboard-first file manager with two panes

Developer tools

TASTECODEEdit, build, debug and test Rust apps in one windowTASTESTUDIOFrom editing to remote tests and approved AI fixesTASTEETLMove data while you watch the values

Servers

TASTEREMOTEA remote desktop you run on your own serverTASTEGEORebuilding a GeoServer-compatible geospatial server in RustTASTEMAILTake back control of your email

Investing

TASTESTOCKStock auto-trading that follows the rules you set: when, and what

Get started

DownloadsLatest builds of every productDocsHow to use each productBuySubscriptions and perpetual licencesAll productsEvery product at a glance
All products
MarketplaceNews
Tech

News

Today's dev newsOfficial announcements on languages, frameworks, GitHub and AIDeveloper docsGuides to languages, frameworks and algorithms

Programming languages

RustTypeScriptJavaScriptPythonGoC#JavaCC++KotlinDart

Frameworks

Web front-end frameworksNext.jsReactVue.js · NuxtSvelteKitAngular
Server frameworksSpring BootDjangoFastAPIASP.NET CoreNestJS · Express
App & desktop frameworksTauriFlutterReact NativeElectron

Algorithms

Algorithm basicsComplexity analysis · Sorting · Searching · Basic data structures · Trees and heapsCore algorithmsGraph traversal · Shortest paths & minimum spanning trees · Dynamic programming · Greedy algorithms · Divide and conquer · BacktrackingAdvanced algorithmsString algorithms · Math and number theory · Bit manipulation · Segment trees · Union-findPractical algorithmsCoding interview strategy · LRU cache · Rate limiting · Consistent hashing
All development docs
Community
ProjectsDiscover builders and their workDevelopment logsDecisions and lessons learnedPromptsReusable instructionsAI tool issuesProblems and workarounds for Claude, Codex, GeminiShowcaseFinished resultsCommunity guideHow we build in the open
Work with us
Tech transferNative apps in Rust and eguiWebsite build10 languages, accounts, docs and downloadsDesktop app buildRust and egui, no WebViewRelease and payment pipelineSigning, MSI, deb, rpm, AppImage, hashesSales partnerRecommend us and earn 30%ContactBuilds, partnerships and investment
Services
Remote desktopReach your computer from a browserCustom installer packagesOnly the features you need, settings preloaded
Buy
EN
한국어EnglishDeutschEspañolFrançaisItalianoPortuguês (Brasil)日本語简体中文繁體中文
Log in
Log in
TASTEDEV

From small tools to better development.

support@tastedev.netSupport TASTEDEV
ProductsProduct lineupBuyDocsDownloadsMarketplaceSupport
CommunityProjectsDevelopment logsPromptsAI tool issuesShowcase
PoliciesAbout usPrivacy policyTerms of serviceSubscription termsRefund policyCommunity guidelines
AccountLog inSign up
Visitors
Today
Yesterday
Total views
Company
GXSOFT
Representative
CHOI YOUNG GU
Business registration number
853-44-00368
Address
9F V24, 351 Gyeongin-ro, Michuhol-gu, Incheon, Republic of Korea
Phone
+82-10-4404-1523
Email
whitecalvin@tastedev.net
Privacy officer
CHOI YOUNG GU

© 2026 TASTEDEVProduct information is based on verified development sources.Released · improving

Dart docs
Dart
Getting Started with DartSyntax BasicsTypes and DataLibraries and PackagesErrors and TestingKey Concepts
Discussions

Dart guide · 6/6

Key Concepts

This chapter covers the ideas that make Dart feel like Dart: asynchronous code with Future, async/await and Stream; isolates; mixins and extension methods; and how they show up in Flutter.

The event loop and Future

Dart code runs in a single-threaded event loop inside an isolate. Slow operations such as file or network access do not block; they return a Future, a promise of a later value. Inside an async function, await lets you write code in order while the event loop handles other work.

Future<String> fetchUser(int id) async {
  await Future.delayed(const Duration(milliseconds: 300)); // simulated network
  return 'user$id';
}

Future<void> main() async {
  print('start');
  final user = await fetchUser(1);
  print(user);

  // Start several operations at once and wait for all of them
  final users = await Future.wait([fetchUser(2), fetchUser(3)]);
  print(users); // [user2, user3]

  // Apply a time limit
  try {
    await fetchUser(4).timeout(const Duration(milliseconds: 100));
  } catch (e) {
    print('timed out: $e');
  }
}

An async function always returns a Future (Future<void> if there is no value). A dropped Future can swallow errors; when you deliberately skip await, mark it with unawaited() from dart:async.

Stream: many values over time

A Stream is a sequence of values arriving over time, such as file chunks, WebSocket messages or input events. An async* function emits values with yield; consume them with await for or listen.

Stream<int> countdown(int from) async* {
  for (var i = from; i > 0; i--) {
    await Future.delayed(const Duration(milliseconds: 200));
    yield i;
  }
}

Future<void> main() async {
  await for (final n in countdown(3)) {
    print(n); // 3, 2, 1
  }

  final evensSquared = countdown(6)
      .where((n) => n.isEven)
      .map((n) => n * n);
  final subscription = evensSquared.listen(
    (value) => print('value: $value'),
    onError: (Object e) => print('error: $e'),
    onDone: () => print('done'),
  );
  await subscription.asFuture<void>();
}

There are single-subscription streams, which can be listened to only once, and broadcast streams, which many listeners can share. When you need to push events yourself, use a StreamController.

Isolates: concurrency without shared memory

async/await does not move CPU-heavy work to another core. Run expensive computations, such as parsing a huge JSON document, in an isolate. An isolate has its own memory and event loop and communicates only through messages, so there are no data races and no locks.

import 'dart:isolate';

int fib(int n) => n < 2 ? n : fib(n - 1) + fib(n - 2);

Future<void> main() async {
  // Compute in a new isolate and receive the result
  final result = await Isolate.run(() => fib(38));
  print(result);
}

Isolate.run runs a function in a new isolate and returns its result as a Future. For a long-lived worker, use Isolate.spawn with a ReceivePort and SendPort; Flutter also offers compute. Dart compiled for the web does not support isolates this way; use web workers there.

Mixins and extension methods

Dart uses single inheritance, but mixins let you plug the same behavior into several classes. Declare one with mixin and apply it with with. Adding on restricts a mixin to subclasses of a particular type.

Extension methods add methods or getters to existing types whose source you cannot change, such as String or List. Extensions are resolved statically, so they do not apply when a variable's static type is dynamic.

abstract class Animal {
  String get name;
}

mixin Swimmer on Animal {
  void swim() => print('$name is swimming');
}

mixin Flyer {
  void fly() => print('taking off');
}

class Duck extends Animal with Swimmer, Flyer {
  @override
  final String name = 'Duck';
}

extension StringChecks on String {
  bool get isBlank => trim().isEmpty;
  String truncate(int max) => length <= max ? this : '${substring(0, max)}…';
}

void main() {
  Duck()
    ..swim()
    ..fly();
  print('   '.isBlank);                  // true
  print('Dart language guide'.truncate(4)); // Dart…
}

Since Dart 3.3 you can also use extension types, which wrap an existing type in a distinct static type with no run-time cost. They are mostly used for JavaScript interop and for giving values such as IDs their own type.

Dart and Flutter

Every Flutter screen is Dart code. Widgets are Dart classes; named parameters keep widget trees readable, and const widgets are not rebuilt, which helps performance.

Dart featureWhat Flutter gets
JIT compilation during developmentStateful hot reload while you edit code
AOT native compilation for releaseFast startup and smooth rendering
JavaScript and WebAssembly compilationWeb apps from the same code base
Sound null safetyFewer null errors at run time
async/await and isolatesNetworking and computation without freezing the UI

Even without Flutter, Dart suits command-line tools, servers built with packages such as shelf, and web apps.

Summary

Dart handles asynchronous work with Future, async/await and Stream on top of a single-threaded event loop, and moves heavy computation to isolates that share no memory. Mixins and extension methods reuse behavior without inheritance, and together with JIT and AOT compilation these features make Flutter's hot reload and fast execution possible.

Further reading

  • A tour of the Dart language
  • Asynchronous programming: async and await
  • Concurrency and isolates in Dart
  • Effective Dart
  • Dart tools overview
  • Core library API reference
  • pub.dev package repository
Questions about this chapter?
Previous chapterErrors and Testing

0 comments

Top commentsNewest first

Sign in · Sign in to leave a comment.