<script>
import 'package:flutter/material.dart';
import 'package:fluttertoast/fluttertoast.dart';
import '../../theme/color.dart';
void toast(context,text) {
final fToast = FToast();
fToast.init(context);
Widget toast = Container(
padding: const EdgeInsets.symmetric(horizontal: 24.0, vertical: 12.0),
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(8.0),
color: Colors.black,
),
child: Text(text,style: TextStyle(color:Colors.white)),
);
fToast.showToast(
child: toast,
toastDuration: const Duration(seconds: 1),
positionedToastBuilder: (context, child) {
return Stack(
alignment: Alignment.center,
children: [
Positioned(
child: child,
bottom: 100,
),
],
);
}
);
}
</script>