From 1f48b1b379a48338f58e2e3fe82a71034e903c6f Mon Sep 17 00:00:00 2001 From: rlee1990 Date: Fri, 18 Mar 2022 10:52:57 -0400 Subject: [PATCH] Fixed Offscreen Issue --- .../ios/Flutter/flutter_export_environment.sh | 8 +++--- example/pubspec.lock | 25 ++++++++++++------- lib/src/ui/reactions_box.dart | 7 ++++++ pubspec.lock | 25 ++++++++++++------- 4 files changed, 43 insertions(+), 22 deletions(-) mode change 100644 => 100755 example/ios/Flutter/flutter_export_environment.sh diff --git a/example/ios/Flutter/flutter_export_environment.sh b/example/ios/Flutter/flutter_export_environment.sh old mode 100644 new mode 100755 index 0a13457..fbcd7ad --- a/example/ios/Flutter/flutter_export_environment.sh +++ b/example/ios/Flutter/flutter_export_environment.sh @@ -1,10 +1,10 @@ #!/bin/sh # This is a generated file; do not edit or check into version control. -export "FLUTTER_ROOT=C:\flutter" -export "FLUTTER_APPLICATION_PATH=E:\Projects\flutter_reaction_button\example" -export "FLUTTER_TARGET=lib\main.dart" +export "FLUTTER_ROOT=/Users/rickeylee/Desktop/dev/flutter" +export "FLUTTER_APPLICATION_PATH=/Users/rickeylee/Desktop/flutter-reaction-button/example" +export "COCOAPODS_PARALLEL_CODE_SIGN=true" +export "FLUTTER_TARGET=lib/main.dart" export "FLUTTER_BUILD_DIR=build" -export "SYMROOT=${SOURCE_ROOT}/../build\ios" export "FLUTTER_BUILD_NAME=1.0.0" export "FLUTTER_BUILD_NUMBER=1" export "DART_OBFUSCATION=false" diff --git a/example/pubspec.lock b/example/pubspec.lock index b6baee3..8694f87 100644 --- a/example/pubspec.lock +++ b/example/pubspec.lock @@ -7,7 +7,7 @@ packages: name: async url: "https://pub.dartlang.org" source: hosted - version: "2.5.0" + version: "2.8.2" boolean_selector: dependency: transitive description: @@ -21,14 +21,14 @@ packages: name: characters url: "https://pub.dartlang.org" source: hosted - version: "1.1.0" + version: "1.2.0" charcode: dependency: transitive description: name: charcode url: "https://pub.dartlang.org" source: hosted - version: "1.2.0" + version: "1.3.1" clock: dependency: transitive description: @@ -80,14 +80,21 @@ packages: name: matcher url: "https://pub.dartlang.org" source: hosted - version: "0.12.10" + version: "0.12.11" + material_color_utilities: + dependency: transitive + description: + name: material_color_utilities + url: "https://pub.dartlang.org" + source: hosted + version: "0.1.3" meta: dependency: transitive description: name: meta url: "https://pub.dartlang.org" source: hosted - version: "1.3.0" + version: "1.7.0" path: dependency: transitive description: @@ -106,7 +113,7 @@ packages: name: source_span url: "https://pub.dartlang.org" source: hosted - version: "1.8.0" + version: "1.8.1" stack_trace: dependency: transitive description: @@ -141,7 +148,7 @@ packages: name: test_api url: "https://pub.dartlang.org" source: hosted - version: "0.2.19" + version: "0.4.8" typed_data: dependency: transitive description: @@ -155,6 +162,6 @@ packages: name: vector_math url: "https://pub.dartlang.org" source: hosted - version: "2.1.0" + version: "2.1.1" sdks: - dart: ">=2.12.0 <3.0.0" + dart: ">=2.14.0 <3.0.0" diff --git a/lib/src/ui/reactions_box.dart b/lib/src/ui/reactions_box.dart index 4143f1e..10bf6ac 100644 --- a/lib/src/ui/reactions_box.dart +++ b/lib/src/ui/reactions_box.dart @@ -243,6 +243,13 @@ class _ReactionsBoxState extends State if (buttonX + (_boxSizeAnimation.value?.width ?? 0) < screenWidth) return buttonX - buttonRadius; + final value = + buttonX + buttonRadius - (_boxSizeAnimation.value?.width ?? 0); + + //add this below code. + if (value.isNegative) { + return 20; // this is 20 horizontal width is fix you can play with it as you want. + } return buttonX + buttonRadius - (_boxSizeAnimation.value?.width ?? 0); } diff --git a/pubspec.lock b/pubspec.lock index 49a0ce6..3317f5f 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -7,7 +7,7 @@ packages: name: async url: "https://pub.dartlang.org" source: hosted - version: "2.5.0" + version: "2.8.2" boolean_selector: dependency: transitive description: @@ -21,14 +21,14 @@ packages: name: characters url: "https://pub.dartlang.org" source: hosted - version: "1.1.0" + version: "1.2.0" charcode: dependency: transitive description: name: charcode url: "https://pub.dartlang.org" source: hosted - version: "1.2.0" + version: "1.3.1" clock: dependency: transitive description: @@ -66,14 +66,21 @@ packages: name: matcher url: "https://pub.dartlang.org" source: hosted - version: "0.12.10" + version: "0.12.11" + material_color_utilities: + dependency: transitive + description: + name: material_color_utilities + url: "https://pub.dartlang.org" + source: hosted + version: "0.1.3" meta: dependency: transitive description: name: meta url: "https://pub.dartlang.org" source: hosted - version: "1.3.0" + version: "1.7.0" path: dependency: transitive description: @@ -92,7 +99,7 @@ packages: name: source_span url: "https://pub.dartlang.org" source: hosted - version: "1.8.0" + version: "1.8.1" stack_trace: dependency: transitive description: @@ -127,7 +134,7 @@ packages: name: test_api url: "https://pub.dartlang.org" source: hosted - version: "0.2.19" + version: "0.4.8" typed_data: dependency: transitive description: @@ -141,6 +148,6 @@ packages: name: vector_math url: "https://pub.dartlang.org" source: hosted - version: "2.1.0" + version: "2.1.1" sdks: - dart: ">=2.12.0 <3.0.0" + dart: ">=2.14.0 <3.0.0"