Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: 🐛 Take in account view insets (such as keyboard) #288

Merged
merged 3 commits into from
Feb 22, 2023

Conversation

Cellaryllis
Copy link
Contributor

Take in account the view insets of the device, such as the keyboard that is up, so that we can correctly determine if the widget should be on top or below. If you're trying to highlight something that is at the bottom of the screen and the keyboard is up, it will try to render it below the widget, which would be under the keyboard.

By taking in account view insets we can assure that widgets that are sticky to the bottom get correctly highlighted when the keyboard is up.

To test this all you need to do is make a widget sticky to the bottom of your screen, summon the keyboard and then showcase the sticky widget. You'll see that everything is blacked out except the sticky widget, but the arrow and text message will be invisible as it's below the keyboard.

Take in account the view insets of the device, such as the keyboard that is up, so that we can correctly determine if the widget should be on top or below. If you're trying to highlight something that is at the bottom of the screen and the keyboard is up, it will try to render it below the widget, which would be under the keyboard.

By taking in account view insets we can assure that widgets that are sticky to the bottom get correctly highlighted when the keyboard is up.

To test this all you need to do is make a widget sticky to the bottom of your screen, summon the keyboard and then showcase the sticky widget. You'll see that everything is blacked out except the sticky widget, but the arrow and text message will be invisible as it's below the keyboard.
@DhvanitVaghani
Copy link
Contributor

Hi @Cellaryllis Could you please resolve conflicts for this PR ?

@faiyaz-shaikh faiyaz-shaikh changed the title Take in account view insets (such as keyboard) fix: 🐛 Take in account view insets (such as keyboard) Jan 31, 2023
@vatsaltanna-simformsolutions vatsaltanna-simformsolutions linked an issue Feb 22, 2023 that may be closed by this pull request
@faiyaz-shaikh faiyaz-shaikh force-pushed the patch-1 branch 2 times, most recently from eb49140 to 3b69de6 Compare February 22, 2023 09:40
@faiyaz-shaikh
Copy link
Contributor

This will Fix : #334, #330

@vatsaltanna-simformsolutions vatsaltanna-simformsolutions linked an issue Feb 22, 2023 that may be closed by this pull request
@vatsaltanna vatsaltanna merged commit ce660b5 into SimformSolutionsPvtLtd:master Feb 22, 2023
satria-wardana added a commit to satria-wardana/flutter_showcaseview that referenced this pull request Sep 7, 2023
* master: (55 commits)
  📝 Update CHANGELOG.md file for version 2.0.3. (SimformSolutionsPvtLtd#368)
  feat: ✨ Add callback when barrier has been clicked (SimformSolutionsPvtLtd#359)
  fixed-child-constructor-invocation (SimformSolutionsPvtLtd#361)
  ✨ (SimformSolutionsPvtLtd#148) Add feasibility to add `textDirection` of `title` and `description`. (SimformSolutionsPvtLtd#356)
  fix: 🐛 SimformSolutionsPvtLtd#346 Don't respond to any clicks in target & (SimformSolutionsPvtLtd#351)
  fix: 🐛 Flutter inspector makes screen grey (SimformSolutionsPvtLtd#353)
  🔖 version bump 2.0.0+1 to 2.0.1 (SimformSolutionsPvtLtd#341)
  fix: 🐛 Take in account view insets (such as keyboard) (SimformSolutionsPvtLtd#288)
  Miscellaneous changes
  Add missing copyright notice in enum.dart
  feat: ✨ Add padding to title and description
  fix: 🐛 PR title validation workflow issue (SimformSolutionsPvtLtd#322)
  feat: ✨ Provide Manual option for vertical position of tooltip (SimformSolutionsPvtLtd#306)
  feat: ✨ Enable/disable showcase globally. (SimformSolutionsPvtLtd#319)
  ✨ add mac support in example. (SimformSolutionsPvtLtd#197)
  Fix: 🔨 Remove title validation workflow (SimformSolutionsPvtLtd#321)
  chore: 👷workflow for PR title validation (SimformSolutionsPvtLtd#286)
  release: 🔖 version bump 2.0.0 to 2.0.0+1 (SimformSolutionsPvtLtd#302)
  release: 🔖 version bump 1.1.8 to 2.0.0 (SimformSolutionsPvtLtd#301)
  fix: 🐛 logic update in `tooltip_widget.dart` (SimformSolutionsPvtLtd#300)
  ...

# Conflicts:
#	example/ios/Flutter/AppFrameworkInfo.plist
#	example/ios/Runner.xcodeproj/project.pbxproj
#	example/lib/main.dart
#	lib/src/showcase.dart
#	lib/src/showcase_widget.dart
#	lib/src/tooltip_widget.dart
LocLt-Mobile pushed a commit to guide-inc-org/guide-flutter_showcaseview that referenced this pull request Oct 28, 2023
…nsPvtLtd#288)

* Take in account view insets (such as keyboard)

Take in account the view insets of the device, such as the keyboard that is up, so that we can correctly determine if the widget should be on top or below. If you're trying to highlight something that is at the bottom of the screen and the keyboard is up, it will try to render it below the widget, which would be under the keyboard.

By taking in account view insets we can assure that widgets that are sticky to the bottom get correctly highlighted when the keyboard is up.

To test this all you need to do is make a widget sticky to the bottom of your screen, summon the keyboard and then showcase the sticky widget. You'll see that everything is blacked out except the sticky widget, but the arrow and text message will be invisible as it's below the keyboard.

* Removed warning and analyzer error

---------

Co-authored-by: faiyaz-shaikh <89002539+faiyaz-shaikh@users.noreply.github.com>
Co-authored-by: faiyaz <faiyaz.s@simformsolutions.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Move code line to resolve no context issue Overlay not showing in flutter 3.7.0
4 participants