Skip to content

[Material 3] BottomAppBar safe area issue #119526

@hjiangsu

Description

@hjiangsu

Steps to Reproduce

  1. Generate code sample for BottomAppBar: flutter create --sample=material.BottomAppBar.3 sample or look at the code sample below.
  2. Execute flutter run running on an iOS simulator (tested on iPhone 14 and iPhone 13 Pro on iOS 16.2)
  3. Tap and interact on an IconButton inside the BottomAppBar

Expected results:
Expected tappable area for IconButton to be within the IconButton

image

Actual results:
Tappable area of IconButton is approximately the upper half of the IconButton, with the shadow being within the upper half respectively.

image

Code sample
import 'package:flutter/material.dart';

void main() {
  runApp(const BottomAppBarDemo());
}

class BottomAppBarDemo extends StatelessWidget {
  const BottomAppBarDemo({super.key});

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      theme: ThemeData(useMaterial3: true),
      home: Scaffold(
        appBar: AppBar(
          title: const Text('Bottom App Bar'),
        ),
        body: Container(),
        floatingActionButton: FloatingActionButton(
          onPressed: () {},
          tooltip: 'Add New Item',
          child: const Icon(Icons.add),
        ),
        floatingActionButtonLocation: FloatingActionButtonLocation.endContained,
        bottomNavigationBar: BottomAppBar(
          child: Row(
            children: <Widget>[
              IconButton(
                tooltip: 'Open Menu',
                icon: const Icon(Icons.more_vert),
                onPressed: () {},
              ),
              IconButton(
                tooltip: 'Search',
                icon: const Icon(Icons.search),
                onPressed: () {},
              ),
              IconButton(
                tooltip: 'Favorite',
                icon: const Icon(Icons.favorite),
                onPressed: () {},
              ),
            ],
          ),
        ),
      ),
    );
  }
}
Logs - Flutter Doctor
[✓] Flutter (Channel master, 3.7.0-30.0.pre.8, on macOS 13.1 22C65 darwin-arm64, locale en-CA)
    • Flutter version 3.7.0-30.0.pre.8 on channel master at /Users/hamlet/Documents/flutter
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision 530c3f2d13 (7 hours ago), 2023-01-30 10:19:14 +0000
    • Engine revision a7bb0e4108
    • Dart version 3.0.0 (build 3.0.0-179.0.dev)
    • DevTools version 2.20.1

[✓] Android toolchain - develop for Android devices (Android SDK version 33.0.1)
    • Android SDK at /Users/hamlet/Library/Android/sdk
    • Platform android-33, build-tools 33.0.1
    • Java binary at: /Applications/Android Studio.app/Contents/jre/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 11.0.13+0-b1751.21-8125866)
    • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 14.2)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Build 14C18
    • CocoaPods version 1.11.3

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

[✓] Android Studio (version 2021.3)
    • 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 11.0.13+0-b1751.21-8125866)

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

[✓] Connected device (4 available)
    • Android SDK built for arm64 (mobile) • emulator-5554                        • android-arm64  • Android 8.0.0 (API 26) (emulator)
    • iPhone 13 Pro (mobile)               • 452E426A-0B2E-45FC-B28E-4F1A68EBA89B • ios            • com.apple.CoreSimulator.SimRuntime.iOS-16-2 (simulator)
    • macOS (desktop)                      • macos                                • darwin-arm64   • macOS 13.1 22C65 darwin-arm64
    • Chrome (web)                         • chrome                               • web-javascript • Google Chrome 109.0.5414.119

[✓] HTTP Host Availability
    • All required HTTP hosts are available

• No issues found!

Metadata

Metadata

Assignees

Labels

f: material designflutter/packages/flutter/material repository.found in release: 3.7Found to occur in 3.7frameworkflutter/packages/flutter repository. See also f: labels.has reproducible stepsThe issue has been confirmed reproducible and is ready to work onplatform-iosiOS applications specificallyr: fixedIssue is closed as already fixed in a newer version

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions