mirror of
https://gitlab.com/nkming2/nc-photos.git
synced 2025-01-22 16:56:19 +01:00
17 lines
489 B
Dart
17 lines
489 B
Dart
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,
|
|
);
|
|
}
|
|
}
|