flutter_background_wraper 1.0.4
flutter_background_wraper: ^1.0.4 copied to clipboard
A customizable background layout widget with loading, error, and refresh handling.
flutter_background_wraper #
A powerful Flutter package that streamlines the creation of consistent, professional-looking app screens. It eliminates boilerplate code by combining app bar, background management, state handling, and navigation elements into a single, easy-to-use widget.
📋 Table of Contents #
✨ Features #
- 🎨 Solid color or image backgrounds
- 🔧 Customizable AppBar — title, back button, height, and actions
- 🧭 Bottom navigation bar and floating action button support
- 📜 Scrollable / non-scrollable content layout
- ⚡ Loading & error states with custom widget support
- 🔄 Pull-to-refresh functionality
- 📱 Status bar customization
- 🛡️ Safe area handling built-in
📖 Usage #
Basic — Color Background #
AppBackground.color(
color: Colors.white,
title: 'Home',
child: ListView(
children: [
ListTile(title: Text('Item 1')),
ListTile(title: Text('Item 2')),
],
),
)
Image Background #
AppBackground.image(
image: AssetImage('assets/bg.jpg'),
title: 'Profile',
child: Center(
child: Text('Your content here'),
),
)
Full Featured Example #
AppBackground.color(
color: Colors.white54,
title: 'FBW Example',
appBarHeight: 50.0,
actions: [
IconButton(
icon: Icon(Icons.search),
onPressed: () {},
),
IconButton(
icon: Icon(Icons.notifications),
onPressed: () {},
),
],
bottomNavigationBar: BottomNavigationBar(
items: const [
BottomNavigationBarItem(
icon: Icon(Icons.home),
label: 'Home',
),
BottomNavigationBarItem(
icon: Icon(Icons.search),
label: 'Search',
),
],
),
floatingActionButton: FloatingActionButton(
onPressed: () {},
child: Icon(Icons.add),
),
isRefresh: true,
onRefresh: () async {
// Handle refresh logic
},
isLoading: false,
isError: false,
child: MyContentWidget(),
)
📋 Requirements #
| Minimum Version | |
|---|---|
| Flutter | >=2.18.0 |
| Dart | >=2.18.0 |
🤝 Contributing #
Contributions are welcome! Here's how to get started:
- Fork the repository
- Create a new branch
git checkout -b feature/amazing-feature - Commit your changes
git commit -m 'Add some amazing feature' - Push to the branch
git push origin feature/amazing-feature - Open a Pull Request
Please make sure your code follows the existing style and includes relevant tests.
📝 License #
This project is licensed under the MIT License — see the LICENSE file for details.
MIT License — Copyright (c) 2024 MrJabiulla
Developed by MrJabiulla