mirror of
https://github.com/ReVanced/revanced-manager.git
synced 2024-11-10 01:01:56 +01:00
f82c439b26
Co-authored-by: validcube <pun.butrach@gmail.com>
27 lines
592 B
Dart
27 lines
592 B
Dart
import 'package:flutter/material.dart';
|
|
import 'package:fluttertoast/fluttertoast.dart' as t;
|
|
|
|
class Toast {
|
|
final t.FToast _fToast = t.FToast();
|
|
late BuildContext buildContext;
|
|
|
|
void initialize(BuildContext context) {
|
|
_fToast.init(context);
|
|
}
|
|
|
|
void show(String text) {
|
|
t.Fluttertoast.showToast(
|
|
msg: text,
|
|
toastLength: t.Toast.LENGTH_LONG,
|
|
gravity: t.ToastGravity.CENTER,
|
|
);
|
|
}
|
|
|
|
void showBottom(String text) {
|
|
t.Fluttertoast.showToast(
|
|
msg: text,
|
|
toastLength: t.Toast.LENGTH_LONG,
|
|
gravity: t.ToastGravity.BOTTOM,
|
|
);
|
|
}
|
|
}
|