FlutterToast icon indicating copy to clipboard operation
FlutterToast copied to clipboard

Toast is not centered in Android 13

Open ehuiz opened this issue 2 years ago • 8 comments

ehuiz avatar Nov 23 '22 08:11 ehuiz

Need more info

ponnamkarthik avatar Dec 11 '22 02:12 ponnamkarthik

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);

Mohammed-coldt avatar Jan 03 '23 06:01 Mohammed-coldt

how to fix it

kuma0605 avatar Jan 19 '23 11:01 kuma0605

Having the same issue here

LibraZhu avatar Feb 10 '23 09:02 LibraZhu

Screenshot 2023-02-21 at 16 03 40

This is a screenshot of Fluttertoast on iOS Simulator (iPhone 14 Pro, iOS 16).

Please ignore the terrible English, I threw it together.

ScottishRoss avatar Feb 21 '23 16:02 ScottishRoss

Checkout the note on the package overview page:

https://pub.dev/packages/fluttertoast#:~:text=Fluttertoast.cancel()-,Note%20Android%20%23,-Custom%20Toast%20will

usherwaltz avatar Feb 27 '23 12:02 usherwaltz

Having the same issue here

zhouxin1233 avatar Jun 18 '23 04:06 zhouxin1233

This is what it looks like on Android13.

image

  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 image

There is no adaptation for Android12 and above.

tall-nuts avatar Dec 05 '23 01:12 tall-nuts