-
Notifications
You must be signed in to change notification settings - Fork 272
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
Idea: Set BackGround Colors :) - Support for dark theme #263
Comments
voting +1, would be cool to support dark theme |
I use the following code for my own project to implement support for the dark theme by using Theme colors. Maybe this can be used for inspiration in the actual implementation. Note that with material2 ( Example implementation (click me)Edited from: class MonthViewWidget extends StatelessWidget {
final GlobalKey<MonthViewState>? state;
final double? width;
const MonthViewWidget({
Key? key,
this.state,
this.width,
}) : super(key: key);
@override
Widget build(BuildContext context) {
final cls = Theme.of(context).colorScheme;
return MonthView<Event>(
key: state,
width: width,
borderColor: cls.outlineVariant,
headerBuilder: (date) => MonthPageHeader(
date: date,
backgroundColor: cls.primaryContainer,
iconColor: cls.onPrimaryContainer,
),
weekDayBuilder: (dayIndex) => WeekDayTile(
dayIndex: dayIndex,
backgroundColor: cls.surface,
// WeekDayTile doesn't have a borderColor parameter
),
cellBuilder: (date, events, isToday, isInMonth) => FilledCell(
date: date,
events: events,
shouldHighlight: isToday,
titleColor: isInMonth ? cls.onSurface : cls.onSurfaceVariant,
backgroundColor: isInMonth ? cls.surface : cls.surfaceVariant,
),
);
}
} |
Ex: a Dark Calendar and a White Calendar and Setting all the text values
Basically a Dark and White Mode
The text was updated successfully, but these errors were encountered: