gt_appbar 1.2.0
gt_appbar: ^1.2.0 copied to clipboard
A customizable AppBar widget for Flutter, offering enhanced features like bottom curveness and an optional divider for versatile app bar design. #flutter_appbar #sticky_app_bar #custom_appbar
GT AppBar #
A highly customizable, production-ready AppBar widget for Flutter. gt_appbar extends the native Flutter AppBar with enhanced capabilities such as curved bottom corners (with independent left/right control), custom dividers, in-depth layout tuning, and seamless integration with app themes.
✨ Features #
- 📐 Custom Bottom Curveness – Create unique visual curves on the bottom edges of your AppBar.
- 🎛️ Independent Corner Control – Configure left and right bottom corner radii independently.
- ➖ Optional Divider – Easily toggle and style a divider directly beneath the AppBar.
- 🎨 Fully Customizable – Style colors, text styles, actions, elevation, leading widgets, and more.
- 🚀 Material 3 Ready – Compatible with modern Material 3 styling and color schemes.
📱 Platform Support #
| Android | iOS | macOS | Linux | Windows | Web |
|---|---|---|---|---|---|
| ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |
🚀 Getting Started #
Installation #
Add gt_appbar to your pubspec.yaml dependencies:
dependencies:
gt_appbar: ^1.2.0
Then, run:
flutter pub get
📖 Usage #
Minimal Example #
import 'package:flutter/material.dart';
import 'package:gt_appbar/gt_appbar.dart';
class MyPage extends StatelessWidget {
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: const GTAppBar(
title: 'Simple AppBar',
),
body: Center(child: Text('Hello World!')),
);
}
}
Advanced Customization Example #
GTAppBar(
title: 'Custom Curved AppBar',
backgroundColor: Colors.indigo.shade700,
titleTextStyle: const TextStyle(
fontSize: 22,
fontWeight: FontWeight.w600,
color: Colors.white,
),
centerTitle: true,
elevation: 8.0,
bottomLeftRadius: 24.0,
bottomRightRadius: 24.0,
showDivider: true,
dividerColor: Colors.white30,
leading: IconButton(
icon: const Icon(Icons.menu, color: Colors.white),
onPressed: () => print('Menu Clicked!'),
),
actions: [
IconButton(
icon: const Icon(Icons.search, color: Colors.white),
onPressed: () => print('Search Clicked!'),
),
IconButton(
icon: const Icon(Icons.notifications_none, color: Colors.white),
onPressed: () => print('Notifications Clicked!'),
),
],
)
📋 Parameters & Configuration #
Here is a list of customizable parameters available in GTAppBar:
| Parameter | Type | Default | Description |
|---|---|---|---|
title |
String |
Required | The title text displayed in the AppBar. |
titleTextStyle |
TextStyle? |
null |
Custom typography style for the title text. |
backgroundColor |
Color? |
Theme.of(context).primaryColor |
The background color of the AppBar. |
elevation |
double? |
4.0 |
Controls the size of the shadow below the AppBar. |
bottomLeftRadius |
double? |
bottomCurveness |
Controls the bottom-left corner radius of the AppBar. |
bottomRightRadius |
double? |
bottomCurveness |
Controls the bottom-right corner radius of the AppBar. |
bottomCurveness |
double |
0.0 |
Default corner radius fallback for both bottom corners. |
showDivider |
bool |
false |
When true, renders a thin horizontal divider below the AppBar. |
dividerColor |
Color? |
Theme.of(context).dividerColor |
Custom color for the bottom divider. |
leading |
Widget? |
null |
Custom widget to display at the start of the AppBar. |
automaticallyImplyLeading |
bool? |
true |
Controls whether to automatically imply the leading widget. |
actions |
List<Widget>? |
null |
List of widgets to display at the end of the AppBar. |
centerTitle |
bool |
false |
Whether the title should be centered. |
titleSpacing |
double? |
null |
Spacing around the title widget. |
leadingWidth |
double? |
null |
Custom width boundary for the leading widget. |
🤝 Contributing #
Contributions of any kind are welcome! Feel free to open issues, submit pull requests, or suggest new features on the GitHub Repository.
📄 License #
This project is licensed under the MIT License - see the LICENSE file for details.