Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
F
fluttertoast
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
songyanzhi
fluttertoast
Commits
5e5233c8
Unverified
Commit
5e5233c8
authored
May 23, 2023
by
Karl Mathuthu
Committed by
GitHub
May 23, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Removed some deprecated code. (#429)
parent
9eb0b5e6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
33 additions
and
46 deletions
+33
-46
.idea/libraries/Dart_SDK.xml
+19
-20
.idea/runConfigurations.xml
+0
-11
android/build.gradle
+2
-2
android/src/main/kotlin/io/github/ponnamkarthik/toast/fluttertoast/MethodCallHandlerImpl.kt
+9
-10
example/android/build.gradle
+2
-2
example/android/gradle/wrapper/gradle-wrapper.properties
+1
-1
No files found.
.idea/libraries/Dart_SDK.xml
View file @
5e5233c8
<component
name=
"libraryTable"
>
<library
name=
"Dart SDK"
>
<CLASSES>
<root
url=
"file:///usr/local/Caskroom/flutter/2.2.2/flutter/bin/cache/dart-sdk/lib/async"
/>
<root
url=
"file:///usr/local/Caskroom/flutter/2.2.2/flutter/bin/cache/dart-sdk/lib/cli"
/>
<root
url=
"file:///usr/local/Caskroom/flutter/2.2.2/flutter/bin/cache/dart-sdk/lib/collection"
/>
<root
url=
"file:///usr/local/Caskroom/flutter/2.2.2/flutter/bin/cache/dart-sdk/lib/convert"
/>
<root
url=
"file:///usr/local/Caskroom/flutter/2.2.2/flutter/bin/cache/dart-sdk/lib/core"
/>
<root
url=
"file:///usr/local/Caskroom/flutter/2.2.2/flutter/bin/cache/dart-sdk/lib/developer"
/>
<root
url=
"file:///usr/local/Caskroom/flutter/2.2.2/flutter/bin/cache/dart-sdk/lib/ffi"
/>
<root
url=
"file:///usr/local/Caskroom/flutter/2.2.2/flutter/bin/cache/dart-sdk/lib/html"
/>
<root
url=
"file:///usr/local/Caskroom/flutter/2.2.2/flutter/bin/cache/dart-sdk/lib/indexed_db"
/>
<root
url=
"file:///usr/local/Caskroom/flutter/2.2.2/flutter/bin/cache/dart-sdk/lib/io"
/>
<root
url=
"file:///usr/local/Caskroom/flutter/2.2.2/flutter/bin/cache/dart-sdk/lib/isolate"
/>
<root
url=
"file:///usr/local/Caskroom/flutter/2.2.2/flutter/bin/cache/dart-sdk/lib/js"
/>
<root
url=
"file:///usr/local/Caskroom/flutter/2.2.2/flutter/bin/cache/dart-sdk/lib/js_util"
/>
<root
url=
"file:///usr/local/Caskroom/flutter/2.2.2/flutter/bin/cache/dart-sdk/lib/math"
/>
<root
url=
"file:///usr/local/Caskroom/flutter/2.2.2/flutter/bin/cache/dart-sdk/lib/mirrors"
/>
<root
url=
"file:///usr/local/Caskroom/flutter/2.2.2/flutter/bin/cache/dart-sdk/lib/svg"
/>
<root
url=
"file:///usr/local/Caskroom/flutter/2.2.2/flutter/bin/cache/dart-sdk/lib/typed_data"
/>
<root
url=
"file:///usr/local/Caskroom/flutter/2.2.2/flutter/bin/cache/dart-sdk/lib/web_audio"
/>
<root
url=
"file:///usr/local/Caskroom/flutter/2.2.2/flutter/bin/cache/dart-sdk/lib/web_gl"
/>
<root
url=
"file:///usr/local/Caskroom/flutter/2.2.2/flutter/bin/cache/dart-sdk/lib/web_sql"
/>
<root
url=
"file://$PROJECT_DIR$/../../../../src/flutter/bin/cache/dart-sdk/lib/async"
/>
<root
url=
"file://$PROJECT_DIR$/../../../../src/flutter/bin/cache/dart-sdk/lib/cli"
/>
<root
url=
"file://$PROJECT_DIR$/../../../../src/flutter/bin/cache/dart-sdk/lib/collection"
/>
<root
url=
"file://$PROJECT_DIR$/../../../../src/flutter/bin/cache/dart-sdk/lib/convert"
/>
<root
url=
"file://$PROJECT_DIR$/../../../../src/flutter/bin/cache/dart-sdk/lib/core"
/>
<root
url=
"file://$PROJECT_DIR$/../../../../src/flutter/bin/cache/dart-sdk/lib/developer"
/>
<root
url=
"file://$PROJECT_DIR$/../../../../src/flutter/bin/cache/dart-sdk/lib/ffi"
/>
<root
url=
"file://$PROJECT_DIR$/../../../../src/flutter/bin/cache/dart-sdk/lib/html"
/>
<root
url=
"file://$PROJECT_DIR$/../../../../src/flutter/bin/cache/dart-sdk/lib/indexed_db"
/>
<root
url=
"file://$PROJECT_DIR$/../../../../src/flutter/bin/cache/dart-sdk/lib/io"
/>
<root
url=
"file://$PROJECT_DIR$/../../../../src/flutter/bin/cache/dart-sdk/lib/isolate"
/>
<root
url=
"file://$PROJECT_DIR$/../../../../src/flutter/bin/cache/dart-sdk/lib/js"
/>
<root
url=
"file://$PROJECT_DIR$/../../../../src/flutter/bin/cache/dart-sdk/lib/js_util"
/>
<root
url=
"file://$PROJECT_DIR$/../../../../src/flutter/bin/cache/dart-sdk/lib/math"
/>
<root
url=
"file://$PROJECT_DIR$/../../../../src/flutter/bin/cache/dart-sdk/lib/mirrors"
/>
<root
url=
"file://$PROJECT_DIR$/../../../../src/flutter/bin/cache/dart-sdk/lib/svg"
/>
<root
url=
"file://$PROJECT_DIR$/../../../../src/flutter/bin/cache/dart-sdk/lib/typed_data"
/>
<root
url=
"file://$PROJECT_DIR$/../../../../src/flutter/bin/cache/dart-sdk/lib/web_audio"
/>
<root
url=
"file://$PROJECT_DIR$/../../../../src/flutter/bin/cache/dart-sdk/lib/web_gl"
/>
</CLASSES>
<JAVADOC
/>
<SOURCES
/>
...
...
.idea/runConfigurations.xml
deleted
100644 → 0
View file @
9eb0b5e6
<?xml version="1.0" encoding="UTF-8"?>
<project
version=
"4"
>
<component
name=
"RunConfigurationProducerService"
>
<option
name=
"ignoredProducers"
>
<set>
<option
value=
"com.android.tools.idea.compose.preview.runconfiguration.ComposePreviewRunConfigurationProducer"
/>
</set>
</option>
</component>
</project>
\ No newline at end of file
android/build.gradle
View file @
5e5233c8
...
...
@@ -2,14 +2,14 @@ group 'com.example.FlutterToast'
version
'1.0-SNAPSHOT'
buildscript
{
ext
.
kotlin_version
=
'1.
6.1
0'
ext
.
kotlin_version
=
'1.
7.
0'
repositories
{
google
()
mavenCentral
()
}
dependencies
{
classpath
'com.android.tools.build:gradle:7.
1.2
'
classpath
'com.android.tools.build:gradle:7.
4.0
'
classpath
"org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
}
}
...
...
android/src/main/kotlin/io/github/ponnamkarthik/toast/fluttertoast/MethodCallHandlerImpl.kt
View file @
5e5233c8
...
...
@@ -5,21 +5,17 @@ import android.content.Context
import
android.graphics.PorterDuff
import
android.graphics.drawable.Drawable
import
android.os.Build
import
android.os.Handler
import
android.view.Gravity
import
android.view.LayoutInflater
import
android.view.View
import
android.view.WindowInsets
import
android.view.inputmethod.InputMethodManager
import
android.widget.TextView
import
android.widget.Toast
import
androidx.
annotation.RequiresApi
import
androidx.
core.content.ContextCompat
import
io.flutter.plugin.common.MethodCall
import
io.flutter.plugin.common.MethodChannel
import
io.flutter.plugin.common.MethodChannel.MethodCallHandler
import
kotlin.Exception
internal
class
MethodCallHandlerImpl
(
var
context
:
Context
)
:
MethodCallHandler
{
internal
class
MethodCallHandlerImpl
(
private
var
context
:
Context
)
:
MethodCallHandler
{
private
var
mToast
:
Toast
?
=
null
...
...
@@ -50,12 +46,14 @@ internal class MethodCallHandlerImpl(var context: Context) : MethodCallHandler {
val
text
=
layout
.
findViewById
<
TextView
>(
R
.
id
.
text
)
text
.
text
=
mMessage
val
gradientDrawable
:
Drawable
=
if
(
Build
.
VERSION
.
SDK_INT
>=
21
)
{
val
gradientDrawable
:
Drawable
?
=
if
(
Build
.
VERSION
.
SDK_INT
>=
21
)
{
context
.
getDrawable
(
R
.
drawable
.
corner
)
!!
}
else
{
context
.
resources
.
getDrawable
(
R
.
drawable
.
corner
)
// context.resources.getDrawable(R.drawable.corner)
ContextCompat
.
getDrawable
(
context
,
R
.
drawable
.
corner
)
}
gradientDrawable
.
setColorFilter
(
bgcolor
.
toInt
(),
PorterDuff
.
Mode
.
SRC_IN
)
gradientDrawable
!!
.
setColorFilter
(
bgcolor
.
toInt
(),
PorterDuff
.
Mode
.
SRC_IN
)
text
.
background
=
gradientDrawable
if
(
textSize
!=
null
)
{
text
.
textSize
=
textSize
.
toFloat
()
...
...
@@ -71,13 +69,14 @@ internal class MethodCallHandlerImpl(var context: Context) : MethodCallHandler {
if
(
Build
.
VERSION
.
SDK_INT
<=
31
)
{
try
{
val
textView
:
TextView
=
mToast
?.
view
!!
.
findViewById
(
android
.
R
.
id
.
message
)
if
(
textSize
!=
null
)
{
textView
.
textSize
=
textSize
.
toFloat
()
}
if
(
textcolor
!=
null
)
{
textView
.
setTextColor
(
textcolor
.
toInt
())
}
}
catch
(
e
:
Exception
)
{
}
catch
(
_
:
Exception
)
{
}
}
...
...
example/android/build.gradle
View file @
5e5233c8
buildscript
{
ext
.
kotlin_version
=
'1.
6.1
0'
ext
.
kotlin_version
=
'1.
7.
0'
repositories
{
google
()
mavenCentral
()
}
dependencies
{
classpath
'com.android.tools.build:gradle:7.
1.2
'
classpath
'com.android.tools.build:gradle:7.
4.0
'
classpath
"org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
}
}
...
...
example/android/gradle/wrapper/gradle-wrapper.properties
View file @
5e5233c8
...
...
@@ -2,4 +2,4 @@ distributionBase=GRADLE_USER_HOME
distributionPath
=
wrapper/dists
zipStoreBase
=
GRADLE_USER_HOME
zipStorePath
=
wrapper/dists
distributionUrl
=
https
\:
//services.gradle.org/distributions/gradle-7.
4-all
.zip
distributionUrl
=
https
\:
//services.gradle.org/distributions/gradle-7.
6-bin
.zip
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment