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

[bug]: isBottomSheetOpen #1101

Open
7NT opened this issue Apr 24, 2024 · 6 comments
Open

[bug]: isBottomSheetOpen #1101

7NT opened this issue Apr 24, 2024 · 6 comments

Comments

@7NT
Copy link

7NT commented Apr 24, 2024

Describe the bug

Not sure if this is the right place to ask questions about the BottomSheetService.

I have my custom BottomSheet open: showCustomSheet

When new the data is received, I don't want to open another BottomSheet, so I check isBottomSheetOpen
If yes, I am going to append data, otherwise I will open a new sheet.

But, somewhere that isBottomSheetOpen always returned null.

How to check if the CustomSheet is already open?

What operating system do you use?

macOS

Information about the installed tooling

flutter doctor -v
[✓] Flutter (Channel stable, 3.19.6, on macOS 14.4.1 23E224 darwin-x64, locale en)
• Flutter version 3.19.6 on channel stable at /Users/jun/development/flutter
• Upstream repository https://github.com/flutter/flutter.git
• Framework revision 54e66469a9 (7 days ago), 2024-04-17 13:08:03 -0700
• Engine revision c4cd48e186
• Dart version 3.3.4
• DevTools version 2.31.1

[✓] Android toolchain - develop for Android devices (Android SDK version 34.0.0)
• Android SDK at /Users/jun/Library/Android/sdk
• Platform android-34-ext8, build-tools 34.0.0
• ANDROID_HOME = /Users/jun/Library/Android/sdk
• Java binary at: /Applications/Android Studio.app/Contents/jbr/Contents/Home/bin/java
• Java version OpenJDK Runtime Environment (build 17.0.9+0-17.0.9b1087.7-11185874)
• All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 15.3)
• Xcode at /Applications/Xcode.app/Contents/Developer
• Build 15E204a
• CocoaPods version 1.15.2

[✓] Chrome - develop for the web
• Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome

[✓] Android Studio (version 2023.2)
• Android Studio at /Applications/Android Studio.app/Contents
• Flutter plugin can be installed from:
🔨 https://plugins.jetbrains.com/plugin/9212-flutter
• Dart plugin can be installed from:
🔨 https://plugins.jetbrains.com/plugin/6351-dart
• Java version OpenJDK Runtime Environment (build 17.0.9+0-17.0.9b1087.7-11185874)

[✓] VS Code (version 1.88.1)
• VS Code at /Applications/Visual Studio Code.app/Contents
• Flutter extension version 3.80.0

[✓] Connected device (3 available)
• Jun’s iPad (mobile) • 00008030-0004495422C2202E • ios • iOS 17.4.1 21E236
• macOS (desktop) • macos • darwin-x64 • macOS 14.4.1 23E224 darwin-x64
• Chrome (web) • chrome • web-javascript • Google Chrome 124.0.6367.78

[✓] Network resources
• All expected network resources are available.

• No issues found!

Steps to reproduce the issue

code:

final BottomSheetService _bottomSheetService = locator();

if (_bottomSheetService.isBottomSheetOpen != true) {
await _bottomSheetService.showCustomSheet(
variant: BottomSheetType.pchat,
title: 'Private Chat:',
description: nick,
);
}

Expected behavior

No response

Screenshots

No response

Additional Context

No response

@FilledStacks
Copy link
Contributor

@7NT are you using the Stacked navigator observer?

@7NT
Copy link
Author

7NT commented Apr 25, 2024 via email

@7NT
Copy link
Author

7NT commented Apr 26, 2024 via email

@FilledStacks
Copy link
Contributor

The navigator observer is what keeps an eye on the navigations (view changes, dialogs, bottom sheets shown) if you're not using it in your app then Stacked won't know about anything happening visually in your app.

@sebastianbuechler
Copy link
Contributor

@7NT Did using the Stacked navigator observer solve the issue?

@7NT
Copy link
Author

7NT commented Sep 22, 2024 via email

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

No branches or pull requests

3 participants