Skip to content

BoxDecoration renders color beyond borders. #25429

Closed

Description

@GoldenJoe

When rendering a BoxDecoration with a color and a border with rounded corners, the color bleeds past the rounded corners.

return Container(
  decoration: BoxDecoration(
  border: Border.all(color: Colors.white, width: 4.0),
  borderRadius: 10.0,
  color: Colors.red
  ),
);

badge1
badge2

Activity

  1. zoechi commented on Dec 16, 2018

    @zoechi
    Contributor

    Please add the output of flutter doctor -v.

  2. added
    waiting for responseThe Flutter team cannot make further progress on this issue until the original reporter responds
    engineflutter/engine related. See also e: labels.
    on Dec 16, 2018
  3. added this to the milestone on Dec 16, 2018
  4. GoldenJoe commented on Dec 16, 2018

    @GoldenJoe
    Author
    [✓] Flutter (Channel beta, v1.0.0, on Mac OS X 10.14.2 18C54, locale en-US)
        • Flutter version 1.0.0 at /Users/GoldenJoe/Development/flutter
        • Framework revision 5391447fae (2 weeks ago), 2018-11-29 19:41:26 -0800
        • Engine revision 7375a0f414
        • Dart version 2.1.0 (build 2.1.0-dev.9.4 f9ebf21297)
    
    [✓] Android toolchain - develop for Android devices (Android SDK 27.0.3)
        • Android SDK at /Users/GoldenJoe/Library/Android/sdk
        • Android NDK location not configured (optional; useful for native profiling
          support)
        • Platform android-27, build-tools 27.0.3
        • Java binary at: /Applications/Android
          Studio.app/Contents/jre/jdk/Contents/Home/bin/java
        • Java version OpenJDK Runtime Environment (build
          1.8.0_152-release-1136-b06)
        • All Android licenses accepted.
    
    [✓] iOS toolchain - develop for iOS devices (Xcode 10.1)
        • Xcode at /Applications/Xcode.app/Contents/Developer
        • Xcode 10.1, Build version 10B61
        • ios-deploy 1.9.4
        • CocoaPods version 1.5.3
    
    [✓] Android Studio (version 3.2)
        • Android Studio at /Applications/Android Studio.app/Contents
        • Flutter plugin version 30.0.1
        • Dart plugin version 181.5656
        • Java version OpenJDK Runtime Environment (build
          1.8.0_152-release-1136-b06)
    
    [✓] VS Code (version 1.30.0)
        • VS Code at /Applications/Visual Studio Code.app/Contents
        • Flutter extension version 2.21.1
    
  5. removed
    waiting for responseThe Flutter team cannot make further progress on this issue until the original reporter responds
    on Dec 16, 2018
  6. zoechi commented on Dec 17, 2018

    @zoechi
    Contributor

    I guess this is a duplicate of #13675

  7. added
    P2Important issues not at the top of the work list
    on May 29, 2020
  8. removed this from the milestone on Aug 17, 2020
  9. Omi231 commented on Sep 17, 2020

    @Omi231

    Any update on this issue?

  10. TahaTesser commented on Dec 1, 2020

    @TahaTesser
    Contributor

    I can reproduce the issue

    code sample
    import 'package:flutter/material.dart';
    
    void main() => runApp(MyApp());
    
    class MyApp extends StatelessWidget {
      @override
      Widget build(BuildContext context) {
        return MaterialApp(
          title: 'Material App',
          // theme: ThemeData.dark(),
          home: Home(),
        );
      }
    }
    
    class Home extends StatelessWidget {
      @override
      Widget build(BuildContext context) {
        return Scaffold(
          appBar: AppBar(
            title: Text('Material App Bar'),
          ),
          body: Center(
            child: Container(
              height: 100,
              width: 100,
              decoration: BoxDecoration(
                  border: Border.all(color: Colors.white, width: 4.0),
                  borderRadius: BorderRadius.all(Radius.circular(10.0)),
                  color: Colors.red),
            ),
          ),
          floatingActionButton: FloatingActionButton(
            child: Icon(Icons.add),
            onPressed: () {},
          ),
        );
      }
    }
    
    flutter doctor -v
    [✓] Flutter (Channel master, 1.24.0-8.0.pre.375, on macOS 11.0.1 20B29
        darwin-x64, locale en-GB)
        • Flutter version 1.24.0-8.0.pre.375 at
          /Users/tahatesser/Code/flutter_master
        • Framework revision a7f5fd5360 (27 hours ago), 2020-11-30 13:14:13 +0100
        • Engine revision 20caf54969
        • Dart version 2.12.0 (build 2.12.0-76.0.dev)
    
    [✓] Android toolchain - develop for Android devices (Android SDK version 30.0.2)
        • Android SDK at /Users/tahatesser/Code/sdk
        • Platform android-30, build-tools 30.0.2
        • ANDROID_HOME = /Users/tahatesser/Code/sdk
        • Java binary at: /Applications/Android
          Studio.app/Contents/jre/jdk/Contents/Home/bin/java
        • Java version OpenJDK Runtime Environment (build
          1.8.0_242-release-1644-b3-6915495)
        • All Android licenses accepted.
    
    [✓] Xcode - develop for iOS and macOS (Xcode 12.2)
        • Xcode at /Volumes/Extreme/Xcode.app/Contents/Developer
        • Xcode 12.2, Build version 12B45b
        • CocoaPods version 1.10.0
    
    [✓] Chrome - develop for the web
        • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome
    
    [✓] Android Studio (version 4.1)
        • Android Studio at /Applications/Android Studio.app/Contents
        • Flutter plugin can be installed from:
          🔨 https://plugins.jetbrains.com/plugin/9212-flutter
        • Dart plugin can be installed from:
          🔨 https://plugins.jetbrains.com/plugin/6351-dart
        • Java version OpenJDK Runtime Environment (build
          1.8.0_242-release-1644-b3-6915495)
    
    [✓] VS Code (version 1.51.1)
        • VS Code at /Applications/Visual Studio Code.app/Contents
        • Flutter extension version 3.16.0
    
    [✓] Connected device (4 available)
        • RMX2001 (mobile) • EUYTFEUSQSRGDA6D • android-arm64  • Android 10 (API 29)
        • macOS (desktop)  • macos            • darwin-x64     • macOS 11.0.1 20B29
          darwin-x64
        • Web Server (web) • web-server       • web-javascript • Flutter Tools
        • Chrome (web)     • chrome           • web-javascript • Google Chrome
          87.0.4280.67
    
    • No issues found!

    I see there's an open issue addressing the case you described. #13675
    Please follow up on that issue, I'm closing the current one as a duplicate.
    If you disagree, please write in the comments and I will reopen it.
    Thank you

  11. github-actions commented on Aug 9, 2021

    @github-actions

    This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of flutter doctor -v and a minimal reproduction of the issue.

  12. locked as resolved and limited conversation to collaborators on Aug 9, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2Important issues not at the top of the work listdependency: skiaSkia team may need to help usengineflutter/engine related. See also e: labels.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions