mirror of
https://gitlab.com/veilid/veilidchat.git
synced 2025-07-23 22:51:00 -04:00
debugging and cleanup
This commit is contained in:
parent
604ec9cfdd
commit
d460a0388c
69 changed files with 2306 additions and 790 deletions
44
lib/theme/models/scale_theme/scale_theme.dart
Normal file
44
lib/theme/models/scale_theme/scale_theme.dart
Normal file
|
@ -0,0 +1,44 @@
|
|||
import 'package:flutter/material.dart';
|
||||
|
||||
import 'scale_scheme.dart';
|
||||
|
||||
export 'scale_color.dart';
|
||||
export 'scale_input_decorator_theme.dart';
|
||||
export 'scale_scheme.dart';
|
||||
export 'scale_tile_theme.dart';
|
||||
export 'scale_toast_theme.dart';
|
||||
|
||||
class ScaleTheme extends ThemeExtension<ScaleTheme> {
|
||||
ScaleTheme({
|
||||
required this.textTheme,
|
||||
required this.scheme,
|
||||
required this.config,
|
||||
});
|
||||
|
||||
final TextTheme textTheme;
|
||||
final ScaleScheme scheme;
|
||||
final ScaleConfig config;
|
||||
|
||||
@override
|
||||
ScaleTheme copyWith({
|
||||
TextTheme? textTheme,
|
||||
ScaleScheme? scheme,
|
||||
ScaleConfig? config,
|
||||
}) =>
|
||||
ScaleTheme(
|
||||
textTheme: textTheme ?? this.textTheme,
|
||||
scheme: scheme ?? this.scheme,
|
||||
config: config ?? this.config,
|
||||
);
|
||||
|
||||
@override
|
||||
ScaleTheme lerp(ScaleTheme? other, double t) {
|
||||
if (other is! ScaleTheme) {
|
||||
return this;
|
||||
}
|
||||
return ScaleTheme(
|
||||
textTheme: TextTheme.lerp(textTheme, other.textTheme, t),
|
||||
scheme: scheme.lerp(other.scheme, t),
|
||||
config: config.lerp(other.config, t));
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue