Merge pull request 'Fixed title text and icon and added toast' (#103) from pwa_title_text_icon into main
Reviewed-on: https://repo.ravanertebat.com/TM/tm_app/pulls/103
This commit is contained in:
@@ -0,0 +1,24 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:toastification/toastification.dart';
|
||||
|
||||
class AppToast {
|
||||
static void success(BuildContext context, String message) {
|
||||
toastification.show(
|
||||
context: context,
|
||||
type: ToastificationType.success,
|
||||
style: ToastificationStyle.fillColored,
|
||||
title: Text(message),
|
||||
autoCloseDuration: const Duration(seconds: 3),
|
||||
);
|
||||
}
|
||||
|
||||
static void error(BuildContext context, String message) {
|
||||
toastification.show(
|
||||
context: context,
|
||||
type: ToastificationType.error,
|
||||
style: ToastificationStyle.fillColored,
|
||||
title: Text(message),
|
||||
autoCloseDuration: const Duration(seconds: 3),
|
||||
);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user