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

Shape the GradientAppBar #14

Open
bagus-setyawan opened this issue Oct 17, 2019 · 3 comments
Open

Shape the GradientAppBar #14

bagus-setyawan opened this issue Oct 17, 2019 · 3 comments

Comments

@bagus-setyawan
Copy link

Hi, i found trouble to implement border radius to bottom left and bottom right of this Gradient App Bar, how can i achieve that ?

GradientAppBar(
      flexibleSpace: Row(
        mainAxisAlignment: MainAxisAlignment.spaceBetween,
        children: <Widget>[
          CustomPaint(
            painter: CircleOne(),
          ),
          CustomPaint(
            painter: CircleTwo(),
          ),
        ],
      ),
      title: Container(
        margin: EdgeInsets.only(top: 18.0),
        child: Center(
          child: Column(
            mainAxisAlignment: MainAxisAlignment.center,
            crossAxisAlignment: CrossAxisAlignment.center,
            children: <Widget>[
              Text(
                'Bagus Setyawan',
                style: TextStyle(
                  fontSize: 16,
                  fontWeight: FontWeight.bold,
                ),
                textScaleFactor: 1.1,
              ),
              Text(
                'Software Development Specialist',
                style: TextStyle(
                  fontSize: 12,
                  fontWeight: FontWeight.w300,
                ),
              ),
            ],
          ),
        ),
      ),
      elevation: 0,
      gradient: LinearGradient(
          begin: Alignment.topLeft,
          end: Alignment.bottomRight,
          colors: [Colors.green[800], Colors.green[200]]),
      shape: RoundedRectangleBorder(
        borderRadius: BorderRadius.only(bottomRight: Radius.circular(70.0))
      ),
    ),
@ghost
Copy link

ghost commented May 4, 2020

Same for me

@aguilaair
Copy link

I have the same problem...
If you remove the gradient is works fine

Jandries added a commit to Jandries/GradientAppBar that referenced this issue Jun 30, 2020
@Jandries
Copy link

I fixed this as a workaround by copying all the code and replacing this line:

decoration: BoxDecoration(gradient: widget.gradient),
with this
decoration: ShapeDecoration(shape: widget.shape, gradient: widget.gradient, ),

I created a pull request that will fix this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants