Comments (6)
onItemSelected: (int) {
setState(
() {}); // This is required to update the nav bar if Android back button is pressed
},
This is not required in your case BTW as you are not using a custom style.
from persistentbottomnavbar.
Awesome! I'm running the latest version anyway, I will try that tmr and if it works I will close the issue! Thx for the reply
from persistentbottomnavbar.
It is possible but only in version 2.0.0 and above. I would do it like this using the property decoration
:
decoration: NavBarDecoration(
border: Border(
top: BorderSide(width: 5.0, color: Colors.black),
),
),
from persistentbottomnavbar.
I'm facing an issue caused by borderRadius, here is what it says:
The following assertion was thrown during paint(): A borderRadius can only be given for uniform borders. 'package:flutter/src/painting/box_border.dart': Failed assertion: line 523 pos 12: 'borderRadius == null'
And below it's the code I'm using:
@override
Widget build(BuildContext context) {
return PersistentTabView(
controller: _controller,
screens: _buildScreens(),
items: _navBarsItems(),
// Redundant here but defined to demonstrate for other than custom style
confineInSafeArea: true,
backgroundColor: Colors.white,
popAllScreensOnTapOfSelectedTab: true,
handleAndroidBackButtonPress: true,
decoration: NavBarDecoration(
border: Border(
top: BorderSide(width: 5.0, color: Colors.black),
),
),
onItemSelected: (int) {
setState(
() {}); // This is required to update the nav bar if Android back button is pressed
},
itemCount: 5,
navBarStyle:
NavBarStyle.style5 // Choose the nav bar style with this property
);
}
I've noticed that if I add a bottom/left/right to the border with the exact same properties (same width and same color), the error doesn't show anymore.
The problem is that it makes my navbar looks super weird.
from persistentbottomnavbar.
Upgrade to version 2.0.5 :) Thanks for reporting!
from persistentbottomnavbar.
It works! Good job :)
from persistentbottomnavbar.
Related Issues (20)
- Material style pageTransitionAnimation is missing.
- Canpop always returns false
- color issues
- Get.back() not working HOT 1
- If you declare the onWillPop function, you will have to handle the back function functionality yourself as your onWillPop function will override the defualt function. 'package:persistent_bottom_nav_bar/persistent_tab_view.widget.dart': Failed assertion: line 107 pos 16: 'handleAndroidBackButtonPress && onWillPop != null' HOT 6
- how to capture navbar too using overlay entry
- Rebuild screen from scratch HOT 2
- Is there any swipe back detect functions?
- Please add onLongPress support for PersistentBottomNavBarItem
- Is there a way to have different background color in different screens?
- Navigate with push replacement HOT 2
- pushDynamicScreen returns error
- style15 returns "Null check operator used on a null value" HOT 1
- Navbar does not disappear when the keyboard appears ..... HOT 1
- when you open the keyboard it keeps the size of the bottom navigation bar HOT 7
- How to rebuild the only screen that has tapped. HOT 1
- flutter_bloc
- Make middle item floating in style15
- onWillPop assert error for custom navbar
- haptics?
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from persistentbottomnavbar.