Shows a stacked notification in the context overlay. Defaults: info, 3500 ms, bottom right; Duration.zero stays open.
Parameter context must be below an Overlay, usually within a MaterialApp route. message is required. Synchronously returns TxNotifyHandle; close() returns void, update({message, type, displayTime}) changes the message and resets its timer. Custom actionText/onAction are optional. Close the handle before disposing its owning overlay.
TxNotifyHandle txNotify(BuildContext context, {required String message, TxToastType type = TxToastType.info, Duration displayTime = const Duration(milliseconds: 3500), Alignment position = Alignment.bottomRight, String? actionText, VoidCallback? onAction})import 'package:flutter/material.dart';
import 'package:tecexpress/tecexpress.dart';
Future<void> example() async {
void showMessage(BuildContext context) {
final handle = txNotify(context, message: 'Saved');
handle.update(message: 'Updated');
handle.close();
}
print(showMessage);
}