-
-
Notifications
You must be signed in to change notification settings - Fork 159
Labels
acceptedA valid and reproducible issueA valid and reproducible issuebugSomething isn't workingSomething isn't working
Description
Steps to reproduce
https://discord.com/channels/1218497173864452136/1437551614922723359
final ShadThemeData lightTheme = ShadThemeData(
colorScheme: ShadColorScheme.fromName(name),
brightness: Brightness.light,
);Given this theme and I use a copyWith to generaste a "dark" theme
final ShadThemeData darkTheme = lightTheme.copyWith(
colorScheme: ShadColorScheme.fromName(name, brightness: Brightness.dark),
brightness: Brightness.dark,
);I do not get the same results as creating a theme with the constructor
final ShadThemeData darkTheme = ShadThemeData(
colorScheme: ShadColorScheme.fromName(name, brightness: Brightness.dark),
brightness: Brightness.dark,
);
Expected results
Actual results
lightTheme.copyWith(
colorScheme: ShadColorScheme.fromName(name, brightness: Brightness.dark),
brightness: Brightness.dark,
)
shadcn_ui version
0.39.3
Platform
MacOS
Code sample
Code sample
class App extends StatelessWidget {
const App({super.key});
@override
Widget build(BuildContext context) {
const name = 'yellow';
final ShadThemeData lightTheme = ShadThemeData(
colorScheme: ShadColorScheme.fromName(name),
brightness: Brightness.light,
);
ShadThemeData darkTheme = ShadThemeData(
colorScheme: ShadColorScheme.fromName(name, brightness: Brightness.dark),
brightness: Brightness.dark,
);
// darkTheme = lightTheme.copyWith(
// colorScheme: ShadColorScheme.fromName(name, brightness: Brightness.dark),
// brightness: Brightness.dark,
// );
return ShadApp(
theme: lightTheme,
darkTheme: darkTheme,
themeMode: ThemeMode.dark,
home: Builder(
builder: (context) {
return Column(
children: [
ShadCard(
title: const Text('Create new pouch'),
description: const Text(
'A new pouch would be useful for a separate game or system you need to keep track.',
),
trailing: ShadIconButton.outline(
icon: const Icon(LucideIcons.plus),
onPressed: () {},
),
),
],
);
},
),
);
}
}Screenshots or Video
Screenshots / Video demonstration
[Upload media here]
Logs
Logs
[Paste your logs here]Flutter Doctor output
Doctor output
[Paste your output here]Copilot
Metadata
Metadata
Labels
acceptedA valid and reproducible issueA valid and reproducible issuebugSomething isn't workingSomething isn't working