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
1158b0ee
Commit
1158b0ee
authored
Dec 18, 2020
by
Karthik Ponnam
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Minor Fixes
parent
887a4928
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
34 additions
and
31 deletions
+34
-31
android/src/main/kotlin/io/github/ponnamkarthik/toast/fluttertoast/MethodCallHandlerImpl.kt
+5
-0
example/android/app/build.gradle
+2
-2
example/ios/Flutter/flutter_export_environment.sh
+0
-2
example/pubspec.lock
+20
-20
pubspec.lock
+7
-7
No files found.
android/src/main/kotlin/io/github/ponnamkarthik/toast/fluttertoast/MethodCallHandlerImpl.kt
View file @
1158b0ee
...
...
@@ -12,6 +12,7 @@ import android.widget.Toast
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
{
...
...
@@ -63,6 +64,7 @@ internal class MethodCallHandlerImpl(var context: Context) : MethodCallHandler {
mToast
.
view
=
layout
}
else
{
mToast
=
Toast
.
makeText
(
context
,
mMessage
,
mDuration
)
try
{
val
textView
:
TextView
=
mToast
.
view
!!
.
findViewById
(
android
.
R
.
id
.
message
)
if
(
textSize
!=
null
)
{
textView
.
textSize
=
textSize
.
toFloat
()
...
...
@@ -70,6 +72,9 @@ internal class MethodCallHandlerImpl(var context: Context) : MethodCallHandler {
if
(
textcolor
!=
null
)
{
textView
.
setTextColor
(
textcolor
.
toInt
())
}
}
catch
(
e
:
Exception
)
{
}
}
when
(
mGravity
)
{
Gravity
.
CENTER
->
{
...
...
example/android/app/build.gradle
View file @
1158b0ee
...
...
@@ -26,7 +26,7 @@ apply plugin: 'kotlin-android'
apply
from:
"$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
android
{
compileSdkVersion
28
compileSdkVersion
30
sourceSets
{
main
.
java
.
srcDirs
+=
'src/main/kotlin'
...
...
@@ -40,7 +40,7 @@ android {
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
applicationId
"com.example.FlutterToast_example"
minSdkVersion
16
targetSdkVersion
28
targetSdkVersion
30
versionCode
flutterVersionCode
.
toInteger
()
versionName
flutterVersionName
}
...
...
example/ios/Flutter/flutter_export_environment.sh
View file @
1158b0ee
...
...
@@ -5,8 +5,6 @@ export "FLUTTER_APPLICATION_PATH=/Users/karthikponnam/Desktop/my/plugins/Flutter
export
"FLUTTER_TARGET=lib/main.dart"
export
"FLUTTER_BUILD_DIR=build"
export
"SYMROOT=
${
SOURCE_ROOT
}
/../build/ios"
export
"OTHER_LDFLAGS=
$(
inherited
)
-framework Flutter"
export
"FLUTTER_FRAMEWORK_DIR=/usr/local/Caskroom/flutter/1.22.3/flutter/bin/cache/artifacts/engine/ios"
export
"FLUTTER_BUILD_NAME=1.0.0"
export
"FLUTTER_BUILD_NUMBER=1"
export
"DART_OBFUSCATION=false"
...
...
example/pubspec.lock
View file @
1158b0ee
...
...
@@ -7,42 +7,42 @@ packages:
name: async
url: "https://pub.dartlang.org"
source: hosted
version: "2.5.0-nullsafety.
1
"
version: "2.5.0-nullsafety.
3
"
boolean_selector:
dependency: transitive
description:
name: boolean_selector
url: "https://pub.dartlang.org"
source: hosted
version: "2.1.0-nullsafety.
1
"
version: "2.1.0-nullsafety.
3
"
characters:
dependency: transitive
description:
name: characters
url: "https://pub.dartlang.org"
source: hosted
version: "1.1.0-nullsafety.
3
"
version: "1.1.0-nullsafety.
5
"
charcode:
dependency: transitive
description:
name: charcode
url: "https://pub.dartlang.org"
source: hosted
version: "1.2.0-nullsafety.
1
"
version: "1.2.0-nullsafety.
3
"
clock:
dependency: transitive
description:
name: clock
url: "https://pub.dartlang.org"
source: hosted
version: "1.1.0-nullsafety.
1
"
version: "1.1.0-nullsafety.
3
"
collection:
dependency: transitive
description:
name: collection
url: "https://pub.dartlang.org"
source: hosted
version: "1.15.0-nullsafety.
3
"
version: "1.15.0-nullsafety.
5
"
cupertino_icons:
dependency: "direct main"
description:
...
...
@@ -56,7 +56,7 @@ packages:
name: fake_async
url: "https://pub.dartlang.org"
source: hosted
version: "1.2.0-nullsafety.
1
"
version: "1.2.0-nullsafety.
3
"
flutter:
dependency: "direct main"
description: flutter
...
...
@@ -85,28 +85,28 @@ packages:
name: js
url: "https://pub.dartlang.org"
source: hosted
version: "0.6.3-nullsafety.
1
"
version: "0.6.3-nullsafety.
3
"
matcher:
dependency: transitive
description:
name: matcher
url: "https://pub.dartlang.org"
source: hosted
version: "0.12.10-nullsafety.
1
"
version: "0.12.10-nullsafety.
3
"
meta:
dependency: transitive
description:
name: meta
url: "https://pub.dartlang.org"
source: hosted
version: "1.3.0-nullsafety.
4
"
version: "1.3.0-nullsafety.
6
"
path:
dependency: transitive
description:
name: path
url: "https://pub.dartlang.org"
source: hosted
version: "1.8.0-nullsafety.
1
"
version: "1.8.0-nullsafety.
3
"
sky_engine:
dependency: transitive
description: flutter
...
...
@@ -118,56 +118,56 @@ packages:
name: source_span
url: "https://pub.dartlang.org"
source: hosted
version: "1.8.0-nullsafety.
2
"
version: "1.8.0-nullsafety.
4
"
stack_trace:
dependency: transitive
description:
name: stack_trace
url: "https://pub.dartlang.org"
source: hosted
version: "1.10.0-nullsafety.
2
"
version: "1.10.0-nullsafety.
6
"
stream_channel:
dependency: transitive
description:
name: stream_channel
url: "https://pub.dartlang.org"
source: hosted
version: "2.1.0-nullsafety.
1
"
version: "2.1.0-nullsafety.
3
"
string_scanner:
dependency: transitive
description:
name: string_scanner
url: "https://pub.dartlang.org"
source: hosted
version: "1.1.0-nullsafety.
1
"
version: "1.1.0-nullsafety.
3
"
term_glyph:
dependency: transitive
description:
name: term_glyph
url: "https://pub.dartlang.org"
source: hosted
version: "1.2.0-nullsafety.
1
"
version: "1.2.0-nullsafety.
3
"
test_api:
dependency: transitive
description:
name: test_api
url: "https://pub.dartlang.org"
source: hosted
version: "0.2.19-nullsafety.
2
"
version: "0.2.19-nullsafety.
6
"
typed_data:
dependency: transitive
description:
name: typed_data
url: "https://pub.dartlang.org"
source: hosted
version: "1.3.0-nullsafety.
3
"
version: "1.3.0-nullsafety.
5
"
vector_math:
dependency: transitive
description:
name: vector_math
url: "https://pub.dartlang.org"
source: hosted
version: "2.1.0-nullsafety.
3
"
version: "2.1.0-nullsafety.
5
"
sdks:
dart: ">=2.1
0.0-110 <=2.11.0-213.1.beta
"
dart: ">=2.1
2.0-0.0 <3.0.0
"
flutter: ">=1.10.0"
pubspec.lock
View file @
1158b0ee
...
...
@@ -7,14 +7,14 @@ packages:
name: characters
url: "https://pub.dartlang.org"
source: hosted
version: "1.1.0-nullsafety.
3
"
version: "1.1.0-nullsafety.
5
"
collection:
dependency: transitive
description:
name: collection
url: "https://pub.dartlang.org"
source: hosted
version: "1.15.0-nullsafety.
3
"
version: "1.15.0-nullsafety.
5
"
flutter:
dependency: "direct main"
description: flutter
...
...
@@ -31,14 +31,14 @@ packages:
name: js
url: "https://pub.dartlang.org"
source: hosted
version: "0.6.3-nullsafety.
1
"
version: "0.6.3-nullsafety.
3
"
meta:
dependency: transitive
description:
name: meta
url: "https://pub.dartlang.org"
source: hosted
version: "1.3.0-nullsafety.
4
"
version: "1.3.0-nullsafety.
6
"
sky_engine:
dependency: transitive
description: flutter
...
...
@@ -50,14 +50,14 @@ packages:
name: typed_data
url: "https://pub.dartlang.org"
source: hosted
version: "1.3.0-nullsafety.
3
"
version: "1.3.0-nullsafety.
5
"
vector_math:
dependency: transitive
description:
name: vector_math
url: "https://pub.dartlang.org"
source: hosted
version: "2.1.0-nullsafety.
3
"
version: "2.1.0-nullsafety.
5
"
sdks:
dart: ">=2.1
0.0-110 <=2.11.0-213.1.beta
"
dart: ">=2.1
2.0-0 <3.0.0
"
flutter: ">=1.10.0"
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