Commit 443c6e66 by Ponnam Karthik

v2.0.8

* Build failed with an exception fixed
* The plugin calls the build of the previous widget fixed
* Screenshots added
parent 807c325e
## [2.0.8]
* Build failed with an exception fixed
* The plugin calls the build of the previous widget fixed
* Screenshots added
## [2.0.7] ## [2.0.7]
* Text background fix for android * Text background fix for android
......
...@@ -2,14 +2,14 @@ group 'io.github.ponnamkarthik.toast.fluttertoast' ...@@ -2,14 +2,14 @@ group 'io.github.ponnamkarthik.toast.fluttertoast'
version '1.0-SNAPSHOT' version '1.0-SNAPSHOT'
buildscript { buildscript {
ext.kotlin_version = '1.1.51' ext.kotlin_version = '1.2.51'
repositories { repositories {
google() google()
jcenter() jcenter()
} }
dependencies { dependencies {
classpath 'com.android.tools.build:gradle:3.0.1' classpath 'com.android.tools.build:gradle:3.2.0'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
} }
} }
...@@ -25,7 +25,7 @@ apply plugin: 'com.android.library' ...@@ -25,7 +25,7 @@ apply plugin: 'com.android.library'
apply plugin: 'kotlin-android' apply plugin: 'kotlin-android'
android { android {
compileSdkVersion 27 compileSdkVersion 28
sourceSets { sourceSets {
main.java.srcDirs += 'src/main/kotlin' main.java.srcDirs += 'src/main/kotlin'
......
#Sun Apr 08 09:32:08 IST 2018 #Thu Sep 27 12:11:21 IST 2018
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.4-all.zip distributionUrl=https\://services.gradle.org/distributions/gradle-4.6-all.zip
...@@ -14,6 +14,7 @@ import io.flutter.plugin.common.MethodChannel ...@@ -14,6 +14,7 @@ import io.flutter.plugin.common.MethodChannel
import io.flutter.plugin.common.MethodChannel.MethodCallHandler import io.flutter.plugin.common.MethodChannel.MethodCallHandler
import io.flutter.plugin.common.MethodChannel.Result import io.flutter.plugin.common.MethodChannel.Result
import io.flutter.plugin.common.PluginRegistry.Registrar import io.flutter.plugin.common.PluginRegistry.Registrar
import android.util.Log
class FluttertoastPlugin(context: Context) : MethodCallHandler { class FluttertoastPlugin(context: Context) : MethodCallHandler {
...@@ -22,7 +23,6 @@ class FluttertoastPlugin(context: Context) : MethodCallHandler { ...@@ -22,7 +23,6 @@ class FluttertoastPlugin(context: Context) : MethodCallHandler {
companion object { companion object {
var toast: Toast? = null
@JvmStatic @JvmStatic
fun registerWith(registrar: Registrar): Unit { fun registerWith(registrar: Registrar): Unit {
val channel = MethodChannel(registrar.messenger(), "PonnamKarthik/fluttertoast") val channel = MethodChannel(registrar.messenger(), "PonnamKarthik/fluttertoast")
...@@ -42,8 +42,7 @@ class FluttertoastPlugin(context: Context) : MethodCallHandler { ...@@ -42,8 +42,7 @@ class FluttertoastPlugin(context: Context) : MethodCallHandler {
val bgcolor: String = call.argument("bgcolor") val bgcolor: String = call.argument("bgcolor")
val textcolor: String = call.argument("textcolor") val textcolor: String = call.argument("textcolor")
val toast: Toast = FluttertoastPlugin.toast ?: Toast.makeText(ctx, msg, Toast.LENGTH_SHORT); val toast: Toast = Toast.makeText(ctx, msg, Toast.LENGTH_SHORT);
FluttertoastPlugin.toast = toast
toast.setText(msg) toast.setText(msg)
if (length.equals("long")) { if (length.equals("long")) {
toast.duration = Toast.LENGTH_LONG toast.duration = Toast.LENGTH_LONG
......
name: fluttertoast name: fluttertoast
description: Toast Library for FLutter description: Toast Library for FLutter
version: 2.0.7 version: 2.0.8
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