MilkTruck.fromTheme constructor
Implementation
factory MilkTruck.fromTheme({required ThemeData theme, required double width, double rotationAngle = 0.0}) {
return MilkTruck(
width: width,
boxColor: theme.colorScheme.secondary,
patchColor: theme.colorScheme.primary.makeLighter(),
truckColor: theme.colorScheme.primary,
strokeColor: theme.colorScheme.tertiary,
bumperColor: theme.colorScheme.onSurface.makeDarker(),
headLightColor: theme.colorScheme.onSurface.makeLighter(),
rearViewMirrorColor: theme.colorScheme.onSurface,
frontGrilleColor: theme.colorScheme.onSurface,
ornamentColor: theme.colorScheme.secondary,
windshieldColor: theme.colorScheme.onSurface,
rotationAngle: rotationAngle,
);
}