Open dickermoshe opened 22 hours ago
I was sure that I already addressed this issue. With ShadBorder.all do you have the same issue?
This is the default border of the input theme
border: ShadBorder.all(
width: 2,
color: colorScheme.border,
radius: radius,
),
And if in the Input field I use border: ShadBorder.all(radius: BorderRadius.circular(50))
the radius is merged correctly.
This is a broader issue. merge()
should only override explicitly set properties. So there can't be defaults on themes anywhere.
I'm gonna work on a PR which will resolve all of this. The package is littered with many instances of themes with defaults.
For this specifically, the merge is much more complex: See the flutter code for BorderSide.merge.
Steps to reproduce
Expected results
Actual results
It's completely replaced!
ShadBorder sides has a default of BorderSide.none instead of
null
, so acopyWith
will result in these values getting replaced!shadcn_ui version
0.14.1
Platform
MacOS, Windows, Linux, Android, iOS, Web
Code sample
Code sample
```dart ShadInput( placeholder: const Text('Search'), decoration: ShadDecoration( focusedBorder: ShadBorder( radius: BorderRadius.circular(16)), border: ShadBorder( radius: BorderRadius.circular(16))), ) ```Screenshots or Video
Screenshots / Video demonstration
Why is the border gone https://github.com/user-attachments/assets/df2bb663-294f-43e0-99c4-698716941baeLogs
Logs
```console N/A```Flutter Doctor output
Doctor output
```console Doctor summary (to see all details, run flutter doctor -v): [√] Flutter (Channel stable, 3.24.3, on Microsoft Windows [Version 10.0.22631.4317], locale en-US) [√] Windows Version (Installed version of Windows is version 10 or higher) [√] Android toolchain - develop for Android devices (Android SDK version 34.0.0) [√] Chrome - develop for the web [√] Visual Studio - develop Windows apps (Visual Studio Community 2022 17.11.5) [√] Android Studio (version 2023.1) [√] VS Code, 64-bit edition (version 1.93.1) [!] Proxy Configuration ! NO_PROXY does not contain ::1 [√] Connected device (3 available) [√] Network resources ! Doctor found issues in 1 category. ```