ThemeFactory.dart 347 B

123456789101112131415161718192021
  1. import 'package:gobang/factory/UserTheme.dart';
  2. import 'Theme.dart';
  3. abstract class ThemeFactory{
  4. Theme getTheme();
  5. }
  6. class UserThemeFactory extends ThemeFactory{
  7. @override
  8. Theme getTheme() {
  9. return new YellowTheme();
  10. }
  11. }
  12. class AiThemeFactory extends ThemeFactory{
  13. @override
  14. Theme getTheme() {
  15. return new BlueTheme();
  16. }
  17. }