-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Implement red theme for stepper and improve coloring
- Loading branch information
1 parent
15fbb7e
commit b395f1c
Showing
3 changed files
with
174 additions
and
74 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,75 @@ | ||
import 'package:flutter/widgets.dart'; | ||
|
||
import '../theme/sbb_colors.dart'; | ||
|
||
enum SBBStepperColors { | ||
light( | ||
activeCircleBackground: SBBColors.red, | ||
activeCircleContent: SBBColors.white, | ||
inactiveCircleBackground: SBBColors.white, | ||
inactiveCircleBorder: SBBColors.smoke, | ||
inactiveCircleContent: SBBColors.black, | ||
label: SBBColors.black, | ||
line: SBBColors.smoke, | ||
), | ||
dark( | ||
activeCircleBackground: SBBColors.white, | ||
activeCircleContent: SBBColors.black, | ||
inactiveCircleBackground: SBBColors.charcoal, | ||
inactiveCircleBorder: SBBColors.white, | ||
inactiveCircleContent: SBBColors.white, | ||
label: SBBColors.white, | ||
line: Color(0xB3FFFFFF), | ||
), | ||
red( | ||
activeCircleBackground: SBBColors.white, | ||
activeCircleContent: SBBColors.red, | ||
inactiveCircleBackground: SBBColors.transparent, | ||
inactiveCircleBorder: SBBColors.white, | ||
inactiveCircleContent: SBBColors.white, | ||
label: SBBColors.white, | ||
line: Color(0xB3FFFFFF), | ||
); | ||
|
||
const SBBStepperColors({ | ||
required this.activeCircleBackground, | ||
required this.activeCircleContent, | ||
required this.inactiveCircleBackground, | ||
required this.inactiveCircleBorder, | ||
required this.inactiveCircleContent, | ||
required this.label, | ||
required this.line, | ||
}); | ||
|
||
final Color activeCircleBackground; | ||
final Color activeCircleContent; | ||
final Color inactiveCircleBackground; | ||
final Color inactiveCircleBorder; | ||
final Color inactiveCircleContent; | ||
final Color label; | ||
final Color line; | ||
|
||
Color circleBackground(bool active) { | ||
if (active) { | ||
return activeCircleBackground; | ||
} else { | ||
return inactiveCircleBackground; | ||
} | ||
} | ||
|
||
Color circleBorder(bool active) { | ||
if (active) { | ||
return SBBColors.transparent; | ||
} else { | ||
return inactiveCircleBorder; | ||
} | ||
} | ||
|
||
Color circleContent(bool active) { | ||
if (active) { | ||
return activeCircleContent; | ||
} else { | ||
return inactiveCircleContent; | ||
} | ||
} | ||
} |