Skip to content

Card.outlined doesn't apply border if custom CardThemeData applied (even without side parameter) #178611

@Nazacheres

Description

@Nazacheres

Steps to reproduce

Apply clean custom Theme with useMaterial3 true, and following cardTheme:

const CardThemeData(
          elevation: 0, shape: RoundedRectangleBorder(borderRadius: BorderRadius.all(Radius.circular(sizeCornerMedium)))),

Notice, how side is not applied.

Use

Card.outlined(clipBehavior: Clip.hardEdge, child: SizedBox(width: 100, height: 100, child: Image.asset('assets/map_styles/map_style_satelite_256.png'))),

to build a card with image inside, clipped and with default outline border.

Expected results

See a card with custom corners and 0 elevation (per our custom theme), image inside and border of 1 according to Material 3 and Card.outlined documentation.

Actual results

Card without outlined border.
Worth mentioning: removing the custom CardThemeData, brings back the border (but our custom rounded corners are gone expectedly as well).

Code sample

Code sample
ThemeData(
      useMaterial3: true,
      colorScheme: scheme,
      typography: typography,
      cardTheme: const CardThemeData(
          elevation: 0, shape: RoundedRectangleBorder(BorderRadius.all(Radius.circular(sizeCornerMedium)))),
    );

.... 
Row(
                  children: [
                    Card.outlined(
                      clipBehavior: Clip.hardEdge,
                      child: SizedBox(width: 100, height: 100, child: Image.asset('assets/map_styles/map_style_satelite_256.png')),
                    ),
...

Screenshots or Video

No response

Logs

No response

Flutter Doctor output

Doctor output
[✓] Flutter (Channel stable, 3.38.1, on macOS 26.1 25B78 darwin-arm64, locale en-CZ) [274ms]
    • Flutter version 3.38.1 on channel stable at /Users/nazariiovcharchyn/fvm/versions/stable
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision b45fa18946 (3 days ago), 2025-11-12 22:09:06 -0600
    • Engine revision b5990e5ccc
    • Dart version 3.10.0
    • DevTools version 2.51.1
    • Feature flags: enable-web, enable-linux-desktop, enable-macos-desktop, enable-windows-desktop, enable-android, enable-ios, cli-animations, enable-native-assets, omit-legacy-version-file, enable-lldb-debugging

[✓] Android toolchain - develop for Android devices (Android SDK version 36.1.0) [1,145ms]
    • Android SDK at /Users/nazariiovcharchyn/Library/Android/sdk
    • Emulator version 36.2.12.0 (build_id 14214601) (CL:N/A)
    • Platform android-36, build-tools 36.1.0
    • ANDROID_HOME = /Users/nazariiovcharchyn/Library/Android/sdk
    • Java binary at: /Applications/Android Studio.app/Contents/jbr/Contents/Home/bin/java
      This is the JDK bundled with the latest Android Studio installation on this machine.
      To manually set the JDK path, use: `flutter config --jdk-dir="path/to/jdk"`.
    • Java version OpenJDK Runtime Environment (build 21.0.8+-14018985-b1038.68)
    • All Android licenses accepted.

[!] Xcode - develop for iOS and macOS (Xcode 26.1.1) [717ms]
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Build 17B100
    ! iOS 26.1 Simulator not installed; this may be necessary for iOS and macOS development.
      To download and install the platform, open Xcode, select Xcode > Settings > Components,
      and click the GET button for the required platform.

      For more information, please visit:
        https://developer.apple.com/documentation/xcode/installing-additional-simulator-runtimes
    ! CocoaPods 1.15.2 out of date (1.16.2 is recommended).
        CocoaPods is a package manager for iOS or macOS platform code.
        Without CocoaPods, plugins will not work on iOS or macOS.
        For more info, see https://flutter.dev/to/platform-plugins
      To update CocoaPods, see https://guides.cocoapods.org/using/getting-started.html#updating-cocoapods

[✓] Chrome - develop for the web [6ms]
    • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome

[✓] Connected device (3 available) [6.1s]
    • Pixel 8 Pro (mobile) • 37290DLJG00128 • android-arm64  • Android 16 (API 36)
    • macOS (desktop)      • macos          • darwin-arm64   • macOS 26.1 25B78 darwin-arm64
    • Chrome (web)         • chrome         • web-javascript • Google Chrome 142.0.7444.162

[✓] Network resources [458ms]
    • All expected network resources are available.

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2Important issues not at the top of the work listd: api docsIssues with https://api.flutter.dev/d: examplesSample code and demosf: material designflutter/packages/flutter/material repository.f: themingStyling widgets with a themeframeworkflutter/packages/flutter repository. See also f: labels.r: fixedIssue is closed as already fixed in a newer versionteam-designOwned by Design Languages teamtriaged-designTriaged by Design Languages team

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions