mirror of
https://gitlab.com/veilid/veilidchat.git
synced 2025-07-23 22:51:00 -04:00
ui cleanup
This commit is contained in:
parent
d460a0388c
commit
77c68aa45f
57 changed files with 1158 additions and 914 deletions
|
@ -1,6 +1,5 @@
|
|||
import 'package:flutter/material.dart';
|
||||
|
||||
import 'scale_scheme.dart';
|
||||
import 'scale_theme.dart';
|
||||
|
||||
enum ScaleToastKind {
|
||||
|
@ -35,14 +34,6 @@ extension ScaleToastThemeExt on ScaleTheme {
|
|||
ScaleToastTheme toastTheme(ScaleToastKind kind) {
|
||||
final toastScaleColor = scheme.scale(ScaleKind.tertiary);
|
||||
|
||||
Icon icon;
|
||||
switch (kind) {
|
||||
case ScaleToastKind.info:
|
||||
icon = const Icon(Icons.info, size: 32);
|
||||
case ScaleToastKind.error:
|
||||
icon = const Icon(Icons.dangerous, size: 32);
|
||||
}
|
||||
|
||||
final primaryColor = toastScaleColor.calloutText;
|
||||
final borderColor = toastScaleColor.border;
|
||||
final backgroundColor = config.useVisualIndicators
|
||||
|
@ -54,6 +45,13 @@ extension ScaleToastThemeExt on ScaleTheme {
|
|||
final titleColor = config.useVisualIndicators
|
||||
? toastScaleColor.calloutBackground
|
||||
: toastScaleColor.calloutText;
|
||||
Icon icon;
|
||||
switch (kind) {
|
||||
case ScaleToastKind.info:
|
||||
icon = Icon(Icons.info, size: 32, color: primaryColor);
|
||||
case ScaleToastKind.error:
|
||||
icon = Icon(Icons.dangerous, size: 32, color: primaryColor);
|
||||
}
|
||||
|
||||
return ScaleToastTheme(
|
||||
primaryColor: primaryColor,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue