1
0
Fork 0
mirror of https://gitlab.com/nkming2/nc-photos.git synced 2025-03-17 04:38:54 +01:00
nc-photos/app/lib/toast.dart

18 lines
489 B
Dart
Raw Normal View History

import 'package:flutter/material.dart';
import 'package:fluttertoast/fluttertoast.dart';
class AppToast {
static Future<bool?> showToast(
BuildContext context, {
required String msg,
required Duration duration,
}) {
return Fluttertoast.showToast(
msg: msg,
timeInSecForIosWeb: duration.inSeconds,
backgroundColor: Theme.of(context).snackBarTheme.backgroundColor,
textColor: Theme.of(context).snackBarTheme.contentTextStyle!.color,
);
}
}