Commit da7609f5 by Karthik Ponnam

*iOS Color Fix

* Background color fix in PIE
parent 969c563d
## [2.1.2]
*iOS Color Fix
* Background color fix in PIE
## [2.1.1] ## [2.1.1]
* Background color does not fill the whole Toast fixed * Background color does not fill the whole Toast fixed
......
...@@ -11,7 +11,7 @@ Android Toast Library for Flutter ...@@ -11,7 +11,7 @@ Android Toast Library for Flutter
```yaml ```yaml
# add this line to your dependencies # add this line to your dependencies
fluttertoast: ^2.1.1 fluttertoast: ^2.1.2
``` ```
```dart ```dart
......
...@@ -11,6 +11,7 @@ import android.graphics.Paint; ...@@ -11,6 +11,7 @@ import android.graphics.Paint;
import android.graphics.drawable.ColorDrawable; import android.graphics.drawable.ColorDrawable;
import android.graphics.drawable.ShapeDrawable; import android.graphics.drawable.ShapeDrawable;
import android.graphics.drawable.shapes.RoundRectShape; import android.graphics.drawable.shapes.RoundRectShape;
import android.os.Build;
import android.view.Gravity; import android.view.Gravity;
import android.widget.TextView; import android.widget.TextView;
import android.widget.Toast; import android.widget.Toast;
...@@ -76,8 +77,11 @@ public class FluttertoastPlugin implements MethodCallHandler { ...@@ -76,8 +77,11 @@ public class FluttertoastPlugin implements MethodCallHandler {
shapeDrawable.getPaint().setAntiAlias(true); shapeDrawable.getPaint().setAntiAlias(true);
shapeDrawable.getPaint().setFlags(Paint.ANTI_ALIAS_FLAG); shapeDrawable.getPaint().setFlags(Paint.ANTI_ALIAS_FLAG);
if (android.os.Build.VERSION.SDK_INT <= 27) {
toast.getView().setBackground(shapeDrawable); toast.getView().setBackground(shapeDrawable);
// text.setBackground(shapeDrawable); } else {
text.setBackground(shapeDrawable);
}
} catch (Exception e) { } catch (Exception e) {
e.printStackTrace(); e.printStackTrace();
} }
......
name: fluttertoast name: fluttertoast
description: Toast Library for FLutter description: Toast Library for FLutter
version: 2.1.1 version: 2.1.2
author: Karthik Ponnam <ponnamkarthik3@gmail.com> author: Karthik Ponnam <ponnamkarthik3@gmail.com>
homepage: https://github.com/PonnamKarthik/FlutterToast homepage: https://github.com/PonnamKarthik/FlutterToast
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment