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]
* Background color does not fill the whole Toast fixed
......
......@@ -11,7 +11,7 @@ Android Toast Library for Flutter
```yaml
# add this line to your dependencies
fluttertoast: ^2.1.1
fluttertoast: ^2.1.2
```
```dart
......
......@@ -11,6 +11,7 @@ import android.graphics.Paint;
import android.graphics.drawable.ColorDrawable;
import android.graphics.drawable.ShapeDrawable;
import android.graphics.drawable.shapes.RoundRectShape;
import android.os.Build;
import android.view.Gravity;
import android.widget.TextView;
import android.widget.Toast;
......@@ -76,8 +77,11 @@ public class FluttertoastPlugin implements MethodCallHandler {
shapeDrawable.getPaint().setAntiAlias(true);
shapeDrawable.getPaint().setFlags(Paint.ANTI_ALIAS_FLAG);
if (android.os.Build.VERSION.SDK_INT <= 27) {
toast.getView().setBackground(shapeDrawable);
// text.setBackground(shapeDrawable);
} else {
text.setBackground(shapeDrawable);
}
} catch (Exception e) {
e.printStackTrace();
}
......
name: fluttertoast
description: Toast Library for FLutter
version: 2.1.1
version: 2.1.2
author: Karthik Ponnam <ponnamkarthik3@gmail.com>
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