mirror of
https://github.com/timokz/flutter-vienna-hackathon-25.git
synced 2025-11-08 21:24:20 +01:00
16 lines
452 B
Dart
16 lines
452 B
Dart
import 'package:flutter/material.dart';
|
|
|
|
class ErrorSnackbar {
|
|
void show(BuildContext context, String message) {
|
|
ScaffoldMessenger.of(context).showSnackBar(SnackBar(
|
|
content: Text(
|
|
message,
|
|
style: TextStyle(color: Theme.of(context).colorScheme.onError),
|
|
maxLines: 3,
|
|
),
|
|
showCloseIcon: true,
|
|
duration: Duration(seconds: 30),
|
|
backgroundColor: Theme.of(context).colorScheme.error,
|
|
));
|
|
}
|
|
}
|