Commit 36788f1b by Karthik Ponnam Committed by GitHub

Merge pull request #68 from yoavrofe/master

Remove legacy dependencies
parents ceea6a26 74e10dec
...@@ -32,8 +32,3 @@ android { ...@@ -32,8 +32,3 @@ android {
disable 'InvalidPackage' disable 'InvalidPackage'
} }
} }
dependencies {
implementation 'androidx.appcompat:appcompat:1.1.0-alpha02'
implementation 'androidx.core:core:1.1.0-alpha04'
}
...@@ -11,7 +11,6 @@ import android.view.View; ...@@ -11,7 +11,6 @@ import android.view.View;
import android.widget.TextView; import android.widget.TextView;
import android.widget.Toast; import android.widget.Toast;
import androidx.core.content.ContextCompat;
import io.flutter.plugin.common.MethodCall; import io.flutter.plugin.common.MethodCall;
import io.flutter.plugin.common.MethodChannel; import io.flutter.plugin.common.MethodChannel;
import io.flutter.plugin.common.MethodChannel.MethodCallHandler; import io.flutter.plugin.common.MethodChannel.MethodCallHandler;
...@@ -88,7 +87,12 @@ public class FluttertoastPlugin implements MethodCallHandler { ...@@ -88,7 +87,12 @@ public class FluttertoastPlugin implements MethodCallHandler {
if(bgcolor != null) { if(bgcolor != null) {
Drawable shapeDrawable = ContextCompat.getDrawable(ctx, R.drawable.toast_bg); Drawable shapeDrawable;
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
shapeDrawable = ctx.getResources().getDrawable(R.drawable.toast_bg,ctx.getTheme());
} else {
shapeDrawable = ctx.getResources().getDrawable(R.drawable.toast_bg);
}
if (shapeDrawable != null) { if (shapeDrawable != null) {
shapeDrawable.setColorFilter(bgcolor.intValue(), PorterDuff.Mode.SRC_IN); shapeDrawable.setColorFilter(bgcolor.intValue(), PorterDuff.Mode.SRC_IN);
......
...@@ -58,6 +58,4 @@ dependencies { ...@@ -58,6 +58,4 @@ dependencies {
testImplementation 'junit:junit:4.12' testImplementation 'junit:junit:4.12'
androidTestImplementation 'androidx.test:runner:1.1.2-alpha01' androidTestImplementation 'androidx.test:runner:1.1.2-alpha01'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.1.2-alpha01' androidTestImplementation 'androidx.test.espresso:espresso-core:3.1.2-alpha01'
implementation 'androidx.appcompat:appcompat:1.1.0-alpha02'
implementation 'androidx.legacy:legacy-support-v4:1.0.0'
} }
#Thu Dec 20 12:42:32 IST 2018 #Mon Feb 25 01:11:37 IST 2019
distributionBase=GRADLE_USER_HOME distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-4.6-all.zip distributionUrl=https\://services.gradle.org/distributions/gradle-4.10.1-all.zip
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