ThemeFactory.dart 466 B

12345678910111213141516171819202122232425262728
  1. import 'package:gobang/factory/UserTheme.dart';
  2. import 'Theme.dart';
  3. abstract class ThemeFactory{
  4. Theme getTheme();
  5. }
  6. class YellowThemeFactory extends ThemeFactory{
  7. @override
  8. Theme getTheme() {
  9. return new YellowTheme();
  10. }
  11. }
  12. class BlueThemeFactory extends ThemeFactory{
  13. @override
  14. Theme getTheme() {
  15. return new BlueTheme();
  16. }
  17. }
  18. class BlackThemeFactory extends ThemeFactory{
  19. @override
  20. Theme getTheme() {
  21. return new BlackTheme();
  22. }
  23. }