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

After picking the image, the Scaffold bottomSheet is half covered by the keyboard #147223

Closed
qiaomo opened this issue Apr 23, 2024 · 2 comments
Closed
Labels
r: duplicate Issue is closed as a duplicate of an existing issue

Comments

@qiaomo
Copy link

qiaomo commented Apr 23, 2024

Steps to reproduce

I am using image_picker to pick images, but after picking the image, the Scaffold bottomSheet is covered by the keyboard.

Expected results

Scaffold bottomSheet display normally

Actual results

Scaffold bottomSheet covered by keyboard

Code sample

Code sample
dependencies:
  image_picker: ^1.0.7
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:image_picker/image_picker.dart';

void main() {
  runApp(MyApp());
}

class MyApp extends StatelessWidget {
  MyApp({super.key});

  final focusNode = FocusNode();

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Flutter Demo',
      home: Scaffold(
        appBar: AppBar(
          title: const Text("Hello World"),
        ),
        body: TextField(
          focusNode: focusNode,
        ),
        bottomSheet: KeyboardBar(),
      ),
    );
  }
}

class KeyboardBar extends StatelessWidget {
  KeyboardBar({super.key});

  final _imagePicker = ImagePicker();

  @override
  Widget build(BuildContext context) {
    return SizedBox(
      height: 45.0,
      child: Row(
        children: [
          IconButton(
            onPressed: () async {
              await _imagePicker.pickImage(source: ImageSource.gallery);
            },
            icon: const Icon(CupertinoIcons.photo_fill),
          ),
        ],
      ),
    );
  }
}

Screenshots or Video

Screenshots / Video demonstration

abc2

Logs

Logs
[Paste your logs here]

Flutter Doctor output

Doctor output
[✓] Flutter (Channel stable, 3.19.6, on macOS 14.4.1 23E224 darwin-arm64, locale zh-Hans-CN)
    • Flutter version 3.19.6 on channel stable at /opt/homebrew/Caskroom/flutter/3.19.6/flutter
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision 54e66469a9 (6 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 at /opt/homebrew/Caskroom/android-platform-tools/35.0.1
    ✗ cmdline-tools component is missing
      Run `path/to/sdkmanager --install "cmdline-tools;latest"`
      See https://developer.android.com/studio/command-line for more details.

[✓] 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 (not installed)
    • Android Studio not found; download from https://developer.android.com/studio/index.html
      (or visit https://flutter.dev/docs/get-started/install/macos#android-setup for detailed instructions).

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

[✓] Connected device (4 available)
    • libphone (mobile)          • 00008110-001A3D080279801E            • ios            • iOS 17.4.1 21E236
    • iPhone 15 Pro Max (mobile) • 952405CB-9170-4511-91B5-7C073EEC871A • ios            •
      com.apple.CoreSimulator.SimRuntime.iOS-17-2 (simulator)
    • macOS (desktop)            • macos                                • darwin-arm64   • macOS 14.4.1 23E224 darwin-arm64
    • Chrome (web)               • chrome                               • web-javascript • Google Chrome 123.0.6312.124

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

! Doctor found issues in 2 categories.
@huycozy huycozy added the in triage Presently being triaged by the triage team label Apr 23, 2024
@huycozy
Copy link
Member

huycozy commented Apr 23, 2024

Thanks for the report! This is a known issue being tracked at #138346. Closing this issue as a duplicate, so please follow up on it for further updates.

@huycozy huycozy closed this as not planned Won't fix, can't repro, duplicate, stale Apr 23, 2024
@huycozy huycozy added r: duplicate Issue is closed as a duplicate of an existing issue and removed in triage Presently being triaged by the triage team labels Apr 23, 2024
Copy link

github-actions bot commented May 7, 2024

This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of flutter doctor -v and a minimal reproduction of the issue.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 7, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
r: duplicate Issue is closed as a duplicate of an existing issue
Projects
None yet
Development

No branches or pull requests

2 participants