FlutterToast
FlutterToast copied to clipboard
Toast is not centered in Android 13
Need more info
Same here, also background color is always the default black color.
Fluttertoast.showToast(
msg: 'test',
toastLength: Toast.LENGTH_SHORT,
gravity: ToastGravity.CENTER,
timeInSecForIosWeb: 4,
backgroundColor: Colors.red,
textColor: Colors.white,
fontSize: 16.0);
how to fix it
Having the same issue here

This is a screenshot of Fluttertoast on iOS Simulator (iPhone 14 Pro, iOS 16).
Please ignore the terrible English, I threw it together.
Checkout the note on the package overview page:
https://pub.dev/packages/fluttertoast#:~:text=Fluttertoast.cancel()-,Note%20Android%20%23,-Custom%20Toast%20will
Having the same issue here
This is what it looks like on Android13.
static void showToast(String msg,
{Toast length = Toast.LENGTH_SHORT,
ToastGravity gravity = ToastGravity.CENTER}) {
Fluttertoast.showToast(
msg: msg,
backgroundColor: const Color(0xFF323232),
textColor: Colors.white,
fontSize: 16.0.sp,
toastLength: length,
gravity: gravity);
}
fluttertoast-8.2.4 MethodCallHandlerImple.kt
There is no adaptation for Android12 and above.