t×tecexpressby TeKOcloud
DEv0.7.1
API & types / FLUTTER

TxNotifyHandle.

Handle for closing or updating an existing notification.

TxNotifyHandle

ParameterTypeDefaultMeaning
closeVoidCallbackrequiredCloses the associated notification.
updatevoid Function({String? message, TxToastType? type, Duration? displayTime})requiredUpdates a notification or record.
dart
import 'package:flutter/material.dart';
import 'package:tecexpress/tecexpress.dart';

Future<void> example() async {
  // Obtain the handle inside a widget callback, below MaterialApp.
  void showMessage(BuildContext context) {
    final handle = txNotify(context, message: 'Working', displayTime: Duration.zero);
    handle.update(message: 'Done', type: TxToastType.success);
    handle.close();
  }
  print(showMessage);
}