KonectarApp/lib/widgets/snackbar.dart

18 lines
511 B
Dart
Raw Normal View History

2024-09-06 06:30:31 +00:00
import 'package:flutter/material.dart';
import 'package:konectar_events/utils/constants.dart';
class SnackBarWidget {
static displaySnackBar(String msg, BuildContext context) {
final snackBar = SnackBar(
content: Text(
msg,
style: TextStyle(color: Colors.black),
),
backgroundColor: Constants.oldbgcolor,
duration: Durations.long1,
);
ScaffoldMessenger.of(context).showSnackBar(snackBar);
//scaffoldKeyLogin.currentState!.showSnackBar(snackBar);
}
}