prosapp_web_app has chat, dashboard, calendar, support, 13 providers and Fluro URL routing. Keep Dockerfile + nginx.conf from previous prosappweb. Upgrade google_fonts 6.2.1 → 8.1.0 (Dart 3.12 compat fix). Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
54 lines
1.2 KiB
Dart
54 lines
1.2 KiB
Dart
import 'package:flutter/material.dart';
|
|
|
|
class NotificationsService {
|
|
static GlobalKey<ScaffoldMessengerState> messengerKey = GlobalKey<ScaffoldMessengerState>();
|
|
|
|
static showSnackBarError(String message) {
|
|
final snackBar = SnackBar(
|
|
backgroundColor: Colors.red.withOpacity(0.9),
|
|
content: Text(
|
|
message,
|
|
style: const TextStyle(
|
|
color: Colors.white,
|
|
fontSize: 20,
|
|
),
|
|
),
|
|
);
|
|
|
|
messengerKey.currentState!
|
|
..removeCurrentSnackBar()
|
|
..showSnackBar(snackBar);
|
|
}
|
|
|
|
static showSnackbar(String message) {
|
|
final snackBar = SnackBar(
|
|
backgroundColor: Colors.blue.withOpacity(0.9),
|
|
content: Text(
|
|
message,
|
|
style: const TextStyle(
|
|
color: Colors.white,
|
|
fontSize: 20,
|
|
),
|
|
),
|
|
);
|
|
|
|
messengerKey.currentState!
|
|
..removeCurrentSnackBar()
|
|
..showSnackBar(snackBar);
|
|
}
|
|
|
|
static showBusyIndicator(BuildContext context) {
|
|
const AlertDialog dialog = AlertDialog(
|
|
content: SizedBox(
|
|
width: 100,
|
|
height: 100,
|
|
child: Center(
|
|
child: CircularProgressIndicator(),
|
|
),
|
|
),
|
|
);
|
|
|
|
showDialog(context: context, builder: (_) => dialog);
|
|
}
|
|
}
|