Fixed visual bugs, added notifications on document upload success, enabled editing in inbox, added hints

This commit is contained in:
Anton Stubenbord
2023-01-11 18:28:42 +01:00
parent a4c4726c16
commit 4d7af3fffb
34 changed files with 1046 additions and 627 deletions

View File

@@ -33,30 +33,32 @@ void showSnackBar(
String message, {
String? details,
SnackBarActionConfig? action,
Duration duration = const Duration(seconds: 5),
}) {
ScaffoldMessenger.of(context)
..hideCurrentSnackBar()
..showSnackBar(
SnackBar(
content: RichText(
maxLines: 5,
text: TextSpan(
text: message,
style: Theme.of(context).textTheme.bodyMedium?.copyWith(
color: Theme.of(context).colorScheme.onInverseSurface,
content: (details != null)
? RichText(
maxLines: 5,
text: TextSpan(
text: message,
style: Theme.of(context).textTheme.bodyMedium?.copyWith(
color: Theme.of(context).colorScheme.onInverseSurface,
),
children: <TextSpan>[
TextSpan(
text: "\n$details",
style: const TextStyle(
fontStyle: FontStyle.italic,
fontSize: 10,
),
),
],
),
children: <TextSpan>[
if (details != null)
TextSpan(
text: "\n$details",
style: const TextStyle(
fontStyle: FontStyle.italic,
fontSize: 10,
),
),
],
),
),
)
: Text(message),
action: action != null
? SnackBarAction(
label: action.label,
@@ -64,7 +66,7 @@ void showSnackBar(
textColor: Theme.of(context).colorScheme.onInverseSurface,
)
: null,
duration: const Duration(seconds: 5),
duration: duration,
),
);
}