useToast function

Toaster useToast()

Implementation

Toaster useToast() {
  final toaster = Toaster();
  final context = useContext();

  useEffect(
    () {
      toaster.init(context);
      return;
    },
    [context.hashCode],
  );

  return toaster;
}