AppBar
A single, fully-parameterized AppBar replacement that implements PreferredSizeWidget, so it drops straight into Scaffold(appBar: ...). There are no named styles — transparency, gradients, and elevation are just parameter values.
dart
Scaffold(
appBar: FBAppBar(
title: 'My App',
actions: [IconButton(icon: const Icon(Icons.search), onPressed: () {})],
),
);1
2
3
4
5
6
2
3
4
5
6
CLI
Install this component into your project:
appbar
$
flutter_beautify add appbarVariants
One constructor, FBAppBar(...).
Key parameters
| Parameter | Type | Default |
|---|---|---|
title / titleWidget | String / Widget? | '' |
actions | List<Widget>? | — |
backgroundColor / foregroundColor | Color? / Color? | ambient colorScheme.primary / colorScheme.onPrimary |
elevation | double | 0.0 |
showBackButton | bool | true |
bottom | PreferredSizeWidget? | — e.g. a TabBar |
centerTitle | bool | false |
Usage
dart
import 'package:your_app/widgets/appbar.dart';
Scaffold(
appBar: FBAppBar(title: 'Dashboard', elevation: 2),
body: ...,
);1
2
3
4
5
6
2
3
4
5
6
