theme_generator_x 0.0.5 theme_generator_x: ^0.0.5 copied to clipboard
Theme extension generator
// GENERATED CODE - DO NOT MODIFY BY HAND
import 'package:flutter/material.dart';
AppThemeDataColorsX lightAppThemeDataColorsXData() {
return const AppThemeDataColorsX(
primary: Color(0xfff6f4da),
secondary: Color(0xff9e9e9e),
someColor: Color(0xff000011),
testColorSimple: Color(0xff000011),
testColor: Color(0xff000011),
simpleMapOfArray: <Color>[
Color(0xff656213),
Color(0xff000011),
],
simpleMapOfArrayDark: <Color>[
Color(0xff995577),
Color(0xff000011),
],
);
}
@immutable
class AppThemeDataColorsX extends ThemeExtension<AppThemeDataColorsX> {
const AppThemeDataColorsX({
required this.primary,
required this.secondary,
required this.someColor,
required this.testColorSimple,
required this.testColor,
required this.simpleMapOfArray,
required this.simpleMapOfArrayDark,
});
final Color? primary;
final Color? secondary;
final Color? someColor;
final Color? testColorSimple;
final Color? testColor;
final List<Color>? simpleMapOfArray;
final List<Color>? simpleMapOfArrayDark;
@override
AppThemeDataColorsX copyWith({
Color? primary,
Color? secondary,
Color? someColor,
Color? testColorSimple,
Color? testColor,
List<Color>? simpleMapOfArray,
List<Color>? simpleMapOfArrayDark,
}) {
return AppThemeDataColorsX(
primary: primary ?? this.primary,
secondary: secondary ?? this.secondary,
someColor: someColor ?? this.someColor,
testColorSimple: testColorSimple ?? this.testColorSimple,
testColor: testColor ?? this.testColor,
simpleMapOfArray: simpleMapOfArray ?? this.simpleMapOfArray,
simpleMapOfArrayDark: simpleMapOfArrayDark ?? this.simpleMapOfArrayDark,
);
}
@override
AppThemeDataColorsX lerp(AppThemeDataColorsX? other, double t) {
if (other is! AppThemeDataColorsX) {
return this;
}
return AppThemeDataColorsX(
primary: Color.lerp(primary, other.primary, t),
secondary: Color.lerp(secondary, other.secondary, t),
someColor: Color.lerp(someColor, other.someColor, t),
testColorSimple: Color.lerp(testColorSimple, other.testColorSimple, t),
testColor: Color.lerp(testColor, other.testColor, t),
simpleMapOfArray: simpleMapOfArray,
simpleMapOfArrayDark: simpleMapOfArrayDark,
);
}
}