bubble_bottom_bar 1.2.0
bubble_bottom_bar / BubbleBottomBar #
BubbleBottomBar is a Flutter widget designed by cubertodesign and developed by westdabestdb.
Getting Started #
Add this to your package's pubspec.yaml
file:
...
dependencies:
bubble_bottom_bar: ^1.2.0
Now in your Dart code, you can use:
import 'package:bubble_bottom_bar/bubble_bottom_bar.dart';
Usage #
floatingActionButton: FloatingActionButton(
onPressed: (){},
child: Icon(Icons.add),
backgroundColor: Colors.red,
),
floatingActionButtonLocation: FloatingActionButtonLocation.endDocked,
bottomNavigationBar: BubbleBottomBar(
opacity: .2,
currentIndex: currentIndex,
onTap: changePage,
borderRadius: BorderRadius.vertical(top: Radius.circular(16)),
elevation: 8,
fabLocation: BubbleBottomBarFabLocation.end, //new
hasNotch: true, //new
hasInk: true //new, gives a cute ink effect
inkColor: Colors.black12 //optional, uses theme color if not specified
items: <BubbleBottomBarItem>[
BubbleBottomBarItem(backgroundColor: Colors.red, icon: Icon(Icons.dashboard, color: Colors.black,), activeIcon: Icon(Icons.dashboard, color: Colors.red,), title: Text("Home")),
BubbleBottomBarItem(backgroundColor: Colors.deepPurple, icon: Icon(Icons.access_time, color: Colors.black,), activeIcon: Icon(Icons.access_time, color: Colors.deepPurple,), title: Text("Logs")),
BubbleBottomBarItem(backgroundColor: Colors.indigo, icon: Icon(Icons.folder_open, color: Colors.black,), activeIcon: Icon(Icons.folder_open, color: Colors.indigo,), title: Text("Folders")),
BubbleBottomBarItem(backgroundColor: Colors.green, icon: Icon(Icons.menu, color: Colors.black,), activeIcon: Icon(Icons.menu, color: Colors.green,), title: Text("Menu"))
],
),
[1.2.0]
- Added ink effect. Thanks to u/VittorioMasia for the idea.
- Fix for issue: https://github.com/westdabestdb/bubble_bottom_bar/issues/10.
- Might need a full restart after changing
hasNotch
variable for proper animation & tile sizes.
[1.1.1]
- Floating action button added to the example app.
[1.1.0]
- Floating Action Button Support 🎊 🎉 !
fabLocation: BubbleBottomBarFabLocation.end
is to support end docked fab.fabLocation: BubbleBottomBarFabLocation.center
is to support center docked fab.hasNotch: true
gives nice notch cutout to BubbleBottomBar.- hasNotch and borderRadius cannot be used together, yet 😏
- Maximum number of the items must be 4 when docked fab support is actived.
[1.0.2]
- Release adresses a solution to FlexRender issue with 4+ BubbleBottomBarItems. Issue: https://github.com/westdabestdb/bubble_bottom_bar/issues/6.
[1.0.1]
- Added dev channel support and lowered the required Dart SDK version.
[1.0.0]
- Major release.
- Ability to specify elevation of the bubble bottom bar.
- Ability to specify BorderRadius of the bubble bottom bar.
[0.0.5]
- Changed '@immutable' field from not final to final.
[0.0.4]
- Added MIT license.
[0.0.3]
- Fixed version in README.md
[0.0.2]
- Release with corrected classes.
[0.0.1]
- Initial release, created by westdabestdb.
example #
A new Flutter project.
Getting Started #
This project is a starting point for a Flutter application.
A few resources to get you started if this is your first Flutter project:
For help getting started with Flutter, view our online documentation, which offers tutorials, samples, guidance on mobile development, and a full API reference.
Use this package as a library
1. Depend on it
Add this to your package's pubspec.yaml file:
dependencies:
bubble_bottom_bar: ^1.2.0
2. Install it
You can install packages from the command line:
with Flutter:
$ flutter pub get
Alternatively, your editor might support flutter pub get
.
Check the docs for your editor to learn more.
3. Import it
Now in your Dart code, you can use:
import 'package:bubble_bottom_bar/bubble_bottom_bar.dart';
Popularity:
Describes how popular the package is relative to other packages.
[more]
|
93
|
Health:
Code health derived from static analysis.
[more]
|
100
|
Maintenance:
Reflects how tidy and up-to-date the package is.
[more]
|
100
|
Overall:
Weighted score of the above.
[more]
|
96
|
We analyzed this package on Dec 7, 2019, and provided a score, details, and suggestions below. Analysis was completed with status completed using:
- Dart: 2.6.1
- pana: 0.12.21
- Flutter: 1.9.1+hotfix.6
Platforms
Detected platforms: Flutter
References Flutter, and has no conflicting libraries.
Health suggestions
Fix lib/bubble_bottom_bar.dart
. (-0.50 points)
Analysis of lib/bubble_bottom_bar.dart
reported 1 hint:
line 13 col 7: This class (or a class which this class inherits from) is marked as '@immutable', but one or more of its instance fields are not final: BubbleBottomBar.currentIndex
Dependencies
Package | Constraint | Resolved | Available |
---|---|---|---|
Direct dependencies | |||
Dart SDK | >=2.0.0-dev.68.0 <3.0.0 | ||
flutter | 0.0.0 | ||
Transitive dependencies | |||
collection | 1.14.11 | 1.14.12 | |
meta | 1.1.7 | 1.1.8 | |
sky_engine | 0.0.99 | ||
typed_data | 1.1.6 | ||
vector_math | 2.0.8 | ||
Dev dependencies | |||
flutter_test |