Files
sf-app-platform/lib/payments/domain/ports/theme_port.dart
2025-11-10 12:03:32 +01:00

30 lines
551 B
Dart

import 'dart:ui';
enum ThemeCode{
background_primary,
background_secondary,
background_tertiary,
text_primary,
text_secondary,
text_tertiary,
button_primary,
button_secondary
}
abstract class ThemePort {
late Map<ThemeCode, Color> theme;
late List<List<Color>> cardColors;
Color getColorFor(ThemeCode code){
Color? c = theme[code];
if (c == null) {
throw Exception("Theme key not found");
}
return c;
}
List<Color> getCardColorFor(int index){
return cardColors[index % cardColors.length];
}
}