Skip to content
pubscout

contextualactionbar

3.1.0, released 3 years ago by an unverified publisher

A Contextual Action Bar workaround for Flutter for item selection and actions.

WASM-ready
$ flutter pub add contextualactionbar
Source repository

What it does

Provides a ContextualScaffold and ContextualAppBar that replace the standard application bar when items are selected, allowing users to perform contextual batch actions. It includes widgets like ContextualActionWidget to easily manage selection states.

AI-written summary of version 3.1.0, based on the package's README and metadata. Report an inaccuracy

Use it when

  • You need a Material Contextual Action Bar (CAB) in Flutter before native support arrives.
  • You are implementing multi-selection item actions similar to native apps like WhatsApp.

Skip it when

  • You need zero items in the ActionMode.
  • Your child widgets need to handle their own onLongPress events for selection.

Strengths

  • Fills a gap in Flutter for Material CAB implementations.
  • Provides clean abstractions like ContextualScaffold and ContextualActionWidget.

Weaknesses

  • It is a workaround for missing native Flutter features.
  • Does not support zero items in ActionMode.

Setup

Kind
Flutter widgets
Effort
Low
Code generation
No
Direct dependencies
1
ContextualScaffold<?awsze>(
      contextualAppBar: ContextualAppBar(
        counterBuilder: (int itemsCount) => Text("$itemsCount Selected"),
        contextualActions: [],
      ),
      appBar: AppBar(),
      body: Body(),
    )

Alternatives

Packages that do the same job and could replace contextualactionbar.

Works with

Packages commonly used together with contextualactionbar: ones it builds on, ones built on it, and its own family.