Toast constructor

Toast({
  1. required ToastType type,
  2. required String title,
  3. String? subtitle,
  4. File? image,
  5. List<String>? actions,
})

Implementation

Toast({
  required this.type,
  required this.title,
  this.subtitle,
  this.image,
  this.actions,
}) {
  List<String> data = [
    this.type.index.toString(),
    this.title,
    this.subtitle ?? '',
    this.image?.path ?? ''
  ]..addAll(actions ?? []);
  this.id = ToastFFI.create(
    data.toNativeUtf16Array(),
    data.length,
  );
}