Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rounded border #79

Closed
LucMoreau33560 opened this issue Aug 2, 2020 · 7 comments · Fixed by #82
Closed

Rounded border #79

LucMoreau33560 opened this issue Aug 2, 2020 · 7 comments · Fixed by #82
Labels
detail required Extra attention is needed enhancement New feature or request

Comments

@LucMoreau33560
Copy link

Hello,

I try to round the corner of my ConvexAppBar. To do that, I add a ClipRRect as parent. The corners are well rounded but the top of the central circle (style:TabStyle.fixedCircle) is cut.

Is it possible to round the corner of the nav bar properly ?

To reproduce :

Widget getBottomNavBar2() {
    return Container(
        decoration: BoxDecoration(
          borderRadius: BorderRadius.only(
              topRight: Radius.circular(30), topLeft: Radius.circular(30)),
          boxShadow: [
            BoxShadow(color: Colors.black38, spreadRadius: 0, blurRadius: 10),
          ],
        ),
        child: ClipRRect(
            borderRadius: BorderRadius.only(
              topLeft: Radius.circular(30.0),
              topRight: Radius.circular(30.0),
            ),
            child: ConvexAppBar(
              style: TabStyle.fixedCircle,
              backgroundColor: const Color(0xFFAC2529),

              items: [
                TabItem(
                  icon: Icons.search,
                ),
                TabItem(
                    icon: new ImageIcon(
                        new AssetImage("logo.png"))),
                TabItem(icon: Icons.settings),
              ],
              onTap: (int i) => print('click index=$i'),
            )));
  }

Regards,
Luc

@avenwu
Copy link
Contributor

avenwu commented Aug 3, 2020

Add some screenshots please :)

@avenwu avenwu added the detail required Extra attention is needed label Aug 3, 2020
@LucMoreau33560
Copy link
Author

LucMoreau33560 commented Aug 3, 2020

image
With ClipRRect, Fixed circle is cut, rounded border OK

@LucMoreau33560
Copy link
Author

image (1)
Without ClipRREct : Fixed circle is ok, but no rounded border

@LucMoreau33560
Copy link
Author

What I want : Fixed circle not cut and rounded border ;-)

@avenwu
Copy link
Contributor

avenwu commented Aug 3, 2020

What you need is quit reasonable. Use clipRect directly will cut the AppBar, we'll try to support it.

@avenwu avenwu added the enhancement New feature or request label Aug 3, 2020
@avenwu avenwu linked a pull request Aug 6, 2020 that will close this issue
@avenwu
Copy link
Contributor

avenwu commented Aug 6, 2020

@LucMoreau33560 We are going to ship a new version, which support the corner config. Try with this branch.

dependencies:
  convex_bottom_bar:
    git:
      url: https://github.com/hacktons/convex_bottom_bar.git
      ref: f-support-corner

cornerRadius: draw the background with topLeft and topRight corner; Only work work with fixed style |

@avenwu
Copy link
Contributor

avenwu commented Aug 6, 2020

By the way you also need to upgrade flutter to v1.20

@avenwu avenwu closed this as completed in #82 Aug 6, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
detail required Extra attention is needed enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants