21 lines
635 B
Dart
21 lines
635 B
Dart
import 'package:flutter/material.dart';
|
|
import 'package:konectar_events/utils/constants.dart';
|
|
|
|
class SnackBarWidget {
|
|
static displaySnackBar(String msg, BuildContext context,
|
|
{bool error = false}) {
|
|
final snackBar = SnackBar(
|
|
content: Text(
|
|
msg,
|
|
style: TextStyle(color: Colors.black),
|
|
),
|
|
backgroundColor: error
|
|
? Color.fromARGB(255, 235, 110, 76)
|
|
: EventsConstants.oldbgcolor,
|
|
duration: error ? Durations.long3 : Durations.long1,
|
|
);
|
|
ScaffoldMessenger.of(context).showSnackBar(snackBar);
|
|
//scaffoldKeyLogin.currentState!.showSnackBar(snackBar);
|
|
}
|
|
}
|