mirror of
https://github.com/Myzel394/quid_faciam_hodie.git
synced 2025-06-21 00:20:29 +02:00
21 lines
545 B
Dart
21 lines
545 B
Dart
import 'package:flutter/material.dart';
|
|
import 'package:supabase_flutter/supabase_flutter.dart';
|
|
|
|
final supabase = Supabase.instance.client;
|
|
|
|
extension ShowSnackBar on BuildContext {
|
|
void showSnackBar({
|
|
required String message,
|
|
Color backgroundColor = Colors.white,
|
|
}) {
|
|
ScaffoldMessenger.of(this).showSnackBar(SnackBar(
|
|
content: Text(message),
|
|
backgroundColor: backgroundColor,
|
|
));
|
|
}
|
|
|
|
void showErrorSnackBar({required String message}) {
|
|
showSnackBar(message: message, backgroundColor: Colors.red);
|
|
}
|
|
}
|