Agent skill

Flutter Handling Concurrency

by btwld in btwld/superdeck

Executes long-running tasks in background isolates to keep the UI responsive.

BSD-3-ClauseAuto-check passedMobile

Install Flutter Handling Concurrency

skills CLI
$ npx skills add btwld/superdeck --skill flutter-handling-concurrency -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install btwld/superdeck flutter-handling-concurrency --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/btwld/superdeck.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.agents/skills/flutter-handling-concurrency .claude/skills/flutter-handling-concurrency && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
flutter-handling-concurrency
GitHub stars
130
Token cost
~1.8k tokens
SKILL.md length
493 words
Files
1
Skills in repo
23
Repo updated
First seen
Licence
BSD-3-Clause

At a glance

Executes long-running tasks in background isolates to keep the UI responsive.

  • Performing heavy computations
  • SKILL.md covers Contents, Core Concepts, Decision Matrix: Async vs.… and Workflows, plus 1 more section
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md
  • Parsing large datasets

What it does

Flutter Handling Concurrency is an agent skill from btwld/superdeck. Executes long-running tasks in background isolates to keep the UI responsive. Use when performing heavy computations or parsing large datasets.

Its SKILL.md is about 1.8k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in Mobile, covering Async programming and Cross-platform mobile apps. It works with Flutter and Dart. The repository describes itself as: Presentation slides for Flutter with Flutter. The licence is BSD-3-Clause.

When your agent uses it

  • Performing heavy computations
  • Parsing large datasets

Example prompts

  • “Use the flutter-handling-concurrency skill to execute long-running tasks in background isolates to keep the UI responsive”
  • “/flutter-handling-concurrency”

What it can do on your machine

Read from SKILL.md and the folder at commit 815a746. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md (its code samples are dart).

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Flutter Handling Concurrency loads about 1.8k tokens when it runs. Until then it costs about 43 tokens; SKILL.md has 493 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~43
When it runs · the whole SKILL.md, loaded when a task matches
~1.8k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from btwld/superdeck at commit 815a746, republished under its BSD-3-Clause licence (© btwld). 493 words, ~1,769 tokens.

Download SKILL.mdSave it as .claude/skills/flutter-handling-concurrency/SKILL.md (or your agent's skills folder).
name
flutter-handling-concurrency
description
Executes long-running tasks in background isolates to keep the UI responsive. Use when performing heavy computations or parsing large datasets.
metadata.model
models/gemini-3.1-pro-preview
metadata.last_modified
Thu, 12 Mar 2026 22:23:14 GMT

Managing Dart Concurrency and Isolates

Contents

Core Concepts

Dart utilizes a single-threaded execution model driven by an Event Loop (comparable to the iOS main loop). By default, all Flutter application code runs on the Main Isolate.

  • Asynchronous Operations (async/await): Use for non-blocking I/O tasks (network requests, file access). The Event Loop continues processing other events while waiting for the Future to complete.
  • Isolates: Dart's implementation of lightweight threads. Isolates possess their own isolated memory and do not share state. They communicate exclusively via message passing.
  • Main Isolate: The default thread where UI rendering and event handling occur. Blocking this isolate causes UI freezing (jank).
  • Worker Isolate: A spawned isolate used to offload CPU-bound tasks (e.g., decoding large JSON blobs) to prevent Main Isolate blockage.

Decision Matrix: Async vs. Isolates

Apply the following conditional logic to determine the correct concurrency approach:

  • If the task is I/O bound (e.g., HTTP request, database read) -> Use async/await on the Main Isolate.
  • If the task is CPU-bound but executes quickly (< 16ms) -> Use async/await on the Main Isolate.
  • If the task is CPU-bound, takes significant time, and runs once (e.g., parsing a massive JSON payload) -> Use Isolate.run().
  • If the task requires continuous or repeated background processing with multiple messages passed over time -> Use Isolate.spawn() with ReceivePort and SendPort.

Workflows

Implementing Standard Asynchronous UI

Use this workflow to fetch and display non-blocking asynchronous data.

Task Progress:

  • Mark the data-fetching function with the async keyword.
  • Return a Future<T> from the function.
  • Use the await keyword to yield execution until the operation completes.
  • Wrap the UI component in a FutureBuilder<T> (or StreamBuilder for streams).
  • Handle ConnectionState.waiting, hasError, and hasData states within the builder.
  • Run validator -> review UI for loading indicators -> fix missing states.
Show full SKILL.md (188 more words)Show less
Offloading Short-Lived Heavy Computation

Use this workflow for one-off, CPU-intensive tasks using Dart 2.19+.

Task Progress:

  • Identify the CPU-bound operation blocking the Main Isolate.
  • Extract the computation into a standalone callback function.
  • Ensure the callback function signature accepts exactly one required, unnamed argument (as per specific architectural constraints).
  • Invoke Isolate.run() passing the callback.
  • await the result of Isolate.run() in the Main Isolate.
  • Assign the returned value to the application state.
Establishing Long-Lived Worker Isolates

Use this workflow for persistent background processes requiring continuous bidirectional communication.

Task Progress:

  • Instantiate a ReceivePort on the Main Isolate to listen for messages.
  • Spawn the worker isolate using Isolate.spawn(), passing the ReceivePort.sendPort as the initial message.
  • In the worker isolate, instantiate its own ReceivePort.
  • Send the worker's SendPort back to the Main Isolate via the initial port.
  • Store the worker's SendPort in the Main Isolate for future message dispatching.
  • Implement listeners on both ReceivePort instances to handle incoming messages.
  • Run validator -> review memory leaks -> ensure ports are closed when the isolate is no longer needed.

Examples

Example 1: Asynchronous UI with FutureBuilder
dart
// 1. Define the async operation
Future<String> fetchUserData() async {
  await Future.delayed(const Duration(seconds: 2)); // Simulate network I/O
  return "User Data Loaded";
}

// 2. Consume in the UI
Widget build(BuildContext context) {
  return FutureBuilder<String>(
    future: fetchUserData(),
    builder: (context, snapshot) {
      if (snapshot.connectionState == ConnectionState.waiting) {
        return const CircularProgressIndicator();
      } else if (snapshot.hasError) {
        return Text('Error: ${snapshot.error}');
      } else {
        return Text('Result: ${snapshot.data}');
      }
    },
  );
}
Example 2: Short-Lived Isolate (Isolate.run)
dart
import 'dart:isolate';
import 'dart:convert';

// 1. Define the heavy computation callback
// Note: Adhering to the strict single-argument signature requirement.
List<dynamic> decodeHeavyJson(String jsonString) {
  return jsonDecode(jsonString) as List<dynamic>;
}

// 2. Offload to a worker isolate
Future<List<dynamic>> processDataInBackground(String rawJson) async {
  // Isolate.run spawns the isolate, runs the computation, returns the value, and exits.
  final result = await Isolate.run(() => decodeHeavyJson(rawJson));
  return result;
}
Example 3: Long-Lived Isolate (ReceivePort / SendPort)
dart
import 'dart:isolate';

class WorkerManager {
  late SendPort _workerSendPort;
  final ReceivePort _mainReceivePort = ReceivePort();
  Isolate? _isolate;

  Future<void> initialize() async {
    // 1. Spawn isolate and pass the Main Isolate's SendPort
    _isolate = await Isolate.spawn(_workerEntry, _mainReceivePort.sendPort);

    // 2. Listen for messages from the Worker Isolate
    _mainReceivePort.listen((message) {
      if (message is SendPort) {
        // First message is the Worker's SendPort
        _workerSendPort = message;
        _startCommunication();
      } else {
        // Subsequent messages are data payloads
        print('Main Isolate received: $message');
      }
    });
  }

  void _startCommunication() {
    // Send data to the worker
    _workerSendPort.send("Process this data");
  }

  // 3. Worker Isolate Entry Point
  static void _workerEntry(SendPort mainSendPort) {
    final workerReceivePort = ReceivePort();
    
    // Send the Worker's SendPort back to the Main Isolate
    mainSendPort.send(workerReceivePort.sendPort);

    // Listen for incoming tasks
    workerReceivePort.listen((message) {
      print('Worker Isolate received: $message');
      
      // Perform work and send result back
      final result = "Processed: $message";
      mainSendPort.send(result);
    });
  }

  void dispose() {
    _mainReceivePort.close();
    _isolate?.kill();
  }
}

© btwld, BSD-3-Clause. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in .agents/skills/flutter-handling-concurrency of btwld/superdeck.

Open the folder on GitHubat commit 815a746

Compare with similar skills

Flutter Handling Concurrency next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Flutter Handling Concurrency compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Flutter Handling Concurrency this skillbtwld/superdeck130—~1.8kAutomated safety check: PassBSD-3-Clause
Squadron Workerd-markey/squadron138—~1.6kAutomated safety check: PassMIT
Flutter ConcurrencyHoangNguyen0403/agent-skills-standard571—~680Automated safety check: PassMIT
Signals Core Advanced Primitivesrodydavis/signals.dart819—~1.7kAutomated safety check: PassApache-2.0
Engine Whats Newflutter/flutter179k—~978Automated safety check: PassBSD-3-Clause
Flutter Cherry Pickflutter/flutter179k—~1.8kAutomated safety check: PassBSD-3-Clause

Similar skills

  • Squadron Worker

    d-markey/squadron

    A skill your agent uses when building, writing, or refactoring Squadron workers, worker pools, worker services, or using squadronbuilder annotations (@SquadronService, @SquadronMethod) for…

    138 GitHub stars~1.6k tokensUpdated 16 days ago
    MobileAuto-check passed
  • Flutter Concurrency

    HoangNguyen0403/agent-skills-standard

    Execute long-running tasks in background isolates to keep the UI responsive.

    571 GitHub stars~680 tokensUpdated today
    MobileAuto-check passed
  • Signals Core Advanced Primitives

    rodydavis/signals.dart

    Reference for the advanced parts of Dart's signals_core: reactive primitives, async signals, reactive collections and utility types, with a linked page for each.

    819 GitHub stars~1.7k tokensUpdated 25 days ago
    DevelopmentAuto-check passed
  • Engine Whats New

    flutter/flutter

    Generates the "what's new" release summary and diff file for changes in the Flutter engine (//engine/src/flutter) between two releases (e.g., 3.47 vs 3.44).

    179k GitHub stars~978 tokensUpdated today
    MobileAuto-check passed
  • Flutter Cherry Pick

    flutter/flutter

    How to land a formal cherry-pick of a merged PR for the flutter/flutter repo stable or beta channel.

    179k GitHub stars~1.8k tokensUpdated today
    MobileAuto-check passed
  • Upgrade Browser

    flutter/flutter

    Upgrade browser versions (Chrome or Firefox) in the Flutter Web Engine and/or Framework tests.

    179k GitHub stars~1.1k tokensUpdated today
    MobileAuto-check passed

More from btwld/superdeck

All 23 skills in this repo
  • Create, review, or edit SuperDeck Markdown presentations and Flutter presentation apps.

    130 GitHub stars~649 tokensUpdated 11 days ago
    Auto-check passed
  • Adds home screen widgets to a Flutter app for Android and iOS.

    130 GitHub stars~2.2k tokensUpdated 11 days ago
    Auto-check passed
  • Flutter Animating Apps

    btwld/superdeck

    Implements animated effects, transitions, and motion in a Flutter app.

    130 GitHub stars~1.9k tokensUpdated 11 days ago
    Auto-check passed
  • Architects a Flutter application using the recommended layered approach (UI, Logic, Data).

    130 GitHub stars~1.8k tokensUpdated 11 days ago
    Auto-check passed
  • Flutter Building Forms

    btwld/superdeck

    Builds Flutter forms with validation and user input handling.

    130 GitHub stars~1.4k tokensUpdated 11 days ago
    Auto-check passed
  • Builds Flutter layouts using the constraint system and layout widgets.

    130 GitHub stars~1.5k tokensUpdated 11 days ago
    Auto-check passed

Works with

Categories

Questions about Flutter Handling Concurrency

What does Flutter Handling Concurrency do?

Executes long-running tasks in background isolates to keep the UI responsive. Flutter Handling Concurrency is an agent skill from btwld/superdeck. Executes long-running tasks in background isolates to keep the UI responsive.

When should I use Flutter Handling Concurrency?

Flutter Handling Concurrency fits situations like: performing heavy computations; parsing large datasets.

How do I install Flutter Handling Concurrency in Claude Code?

Run `npx skills add btwld/superdeck --skill flutter-handling-concurrency -a claude-code`. Or copy the skill folder (.agents/skills/flutter-handling-concurrency in btwld/superdeck) into .claude/skills/flutter-handling-concurrency in your project. Claude Code loads it when a task matches its description.

How do I install Flutter Handling Concurrency in Codex?

Run `npx skills add btwld/superdeck --skill flutter-handling-concurrency -a codex`. Or copy the skill folder (.agents/skills/flutter-handling-concurrency in btwld/superdeck) into .agents/skills/flutter-handling-concurrency in your project. Codex loads it when a task matches its description.

Can I use Flutter Handling Concurrency in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add btwld/superdeck --skill flutter-handling-concurrency -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/flutter-handling-concurrency, .gemini/skills/flutter-handling-concurrency, .github/skills/flutter-handling-concurrency and .opencode/skills/flutter-handling-concurrency in your project.

What does Flutter Handling Concurrency need to run?

SKILL.md names no scripts, command-line tools or credentials: Flutter Handling Concurrency is instructions for the agent only.

Does Flutter Handling Concurrency access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Flutter Handling Concurrency safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Flutter Handling Concurrency use?

Flutter Handling Concurrency is published under the BSD-3-Clause licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Flutter Handling Concurrency use?

About 1.8k tokens (SKILL.md is roughly 7.1k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Flutter Handling Concurrency?

Skills that share tags, products or a category with Flutter Handling Concurrency: Squadron Worker (d-markey/squadron, 138 stars), Flutter Concurrency (HoangNguyen0403/agent-skills-standard, 571 stars), Signals Core Advanced Primitives (rodydavis/signals.dart, 819 stars) and Engine Whats New (flutter/flutter, 179k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Flutter Handling Concurrency?

btwld (a GitHub organization) maintains it in btwld/superdeck, which has 130 GitHub stars. The repository holds 23 skills in this directory. The repository was last updated on September 28, 2026.

Source: btwld/superdeck on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.