mirror of
https://github.com/immich-app/immich.git
synced 2025-12-18 01:11:07 +03:00
chore: bump dart sdk to 3.8 (#20355)
* chore: bump dart sdk to 3.8 * chore: make build * make pigeon * chore: format files --------- Co-authored-by: shenlong-tanwen <139912620+shalong-tanwen@users.noreply.github.com>
This commit is contained in:
@@ -16,25 +16,16 @@ class ImmichToast {
|
||||
fToast.init(context);
|
||||
|
||||
Color getColor(ToastType type, BuildContext context) => switch (type) {
|
||||
ToastType.info => context.primaryColor,
|
||||
ToastType.success => const Color.fromARGB(255, 78, 140, 124),
|
||||
ToastType.error => const Color.fromARGB(255, 220, 48, 85),
|
||||
};
|
||||
ToastType.info => context.primaryColor,
|
||||
ToastType.success => const Color.fromARGB(255, 78, 140, 124),
|
||||
ToastType.error => const Color.fromARGB(255, 220, 48, 85),
|
||||
};
|
||||
|
||||
Icon getIcon(ToastType type) => switch (type) {
|
||||
ToastType.info => Icon(
|
||||
Icons.info_outline_rounded,
|
||||
color: context.primaryColor,
|
||||
),
|
||||
ToastType.success => const Icon(
|
||||
Icons.check_circle_rounded,
|
||||
color: Color.fromARGB(255, 78, 140, 124),
|
||||
),
|
||||
ToastType.error => const Icon(
|
||||
Icons.error_outline_rounded,
|
||||
color: Color.fromARGB(255, 240, 162, 156),
|
||||
),
|
||||
};
|
||||
ToastType.info => Icon(Icons.info_outline_rounded, color: context.primaryColor),
|
||||
ToastType.success => const Icon(Icons.check_circle_rounded, color: Color.fromARGB(255, 78, 140, 124)),
|
||||
ToastType.error => const Icon(Icons.error_outline_rounded, color: Color.fromARGB(255, 240, 162, 156)),
|
||||
};
|
||||
|
||||
fToast.showToast(
|
||||
child: Container(
|
||||
@@ -42,26 +33,17 @@ class ImmichToast {
|
||||
decoration: BoxDecoration(
|
||||
borderRadius: const BorderRadius.all(Radius.circular(16.0)),
|
||||
color: context.colorScheme.surfaceContainer,
|
||||
border: Border.all(
|
||||
color: context.colorScheme.outline.withValues(alpha: .5),
|
||||
width: 1,
|
||||
),
|
||||
border: Border.all(color: context.colorScheme.outline.withValues(alpha: .5), width: 1),
|
||||
),
|
||||
child: Row(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
children: [
|
||||
getIcon(toastType),
|
||||
const SizedBox(
|
||||
width: 12.0,
|
||||
),
|
||||
const SizedBox(width: 12.0),
|
||||
Flexible(
|
||||
child: Text(
|
||||
msg,
|
||||
style: TextStyle(
|
||||
color: getColor(toastType, context),
|
||||
fontWeight: FontWeight.w600,
|
||||
fontSize: 14,
|
||||
),
|
||||
style: TextStyle(color: getColor(toastType, context), fontWeight: FontWeight.w600, fontSize: 14),
|
||||
),
|
||||
),
|
||||
],
|
||||
|
||||
Reference in New Issue
Block a user