Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions lib/toggle_switch.dart
Original file line number Diff line number Diff line change
Expand Up @@ -301,9 +301,10 @@ class _ToggleSwitchState extends State<ToggleSwitch>
final activeFgColor = widget.activeFgColor ??
Theme.of(context).primaryTextTheme.bodyLarge!.color;

/// Assigns active background color to default primary theme color if it's null/not provided.
/// Assigns active background color to the theme's `colorScheme.primary`
/// if it's null/not provided.
final activeBgColor =
widget.activeBgColor ?? [Theme.of(context).primaryColor];
widget.activeBgColor ?? [Theme.of(context).colorScheme.primary];

/// Assigns foreground color based on active status.
///
Expand Down