Skip to content
pubscout

app_bar_with_search_switch

1.8.6, released 2 years ago by an unverified publisher

AppBar that toggles into a search field with optional animations

WASM-ready
$ flutter pub add app_bar_with_search_switch
Source repository

What it does

Provides a replacement AppBar that can switch to a search mode, exposing callbacks for text changes, submission, and clearing. It supports custom animations and works with ValueNotifier or providers.

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

Use it when

  • You need a search bar that stays in place without navigation changes
  • You want a lightweight, customizable AppBar with optional speech support
  • You prefer a widget that works with Stateless widgets and ValueNotifier

Skip it when

  • You need complex navigation or deep link handling
  • You require a full search bar with results list integration

Strengths

  • Easy to integrate with a single required parameter
  • Supports custom animations and theming
  • Works with Stateless widgets and ValueNotifier
  • No external dependencies beyond Flutter

Weaknesses

  • No built-in search results handling
  • Limited to AppBar replacement only
  • Requires manual handling of search logic

Setup

Kind
Flutter widgets
Effort
Low
Code generation
No
Direct dependencies
0

Add dependency to pubspec and import package

import 'package:app_bar_with_search_switch/app_bar_with_search_switch.dart';

AppBarWithSearchSwitch(
  appBarBuilder: (context, startSearch) => AppBar(
    title: Text('Demo'),
    actions: [IconButton(icon: Icon(Icons.search), onPressed: startSearch)],
  ),
  onChanged: (value) => print('search: $value'),
)

Alternatives

Packages that do the same job and could replace app_bar_with_search_switch.