Skip to content

Animation glitch in bottom sheet closing #183299

@lauweijie

Description

@lauweijie

Steps to reproduce

  1. Open a bottom sheet using showModalBottomSheet()
  2. Drag the bottom sheet down and release to close

Expected results

Bottom sheet is closed smoothly

Actual results

Closing animation causes the bottom sheet to open further before animating to a closed state

Code sample

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

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

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

  @override
  Widget build(BuildContext context) {
    return MaterialApp(debugShowCheckedModeBanner: false, home: Home());
  }
}

class Home extends StatelessWidget {
  const Home();

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      body: Center(
        child: ElevatedButton(
          onPressed: () => showModalBottomSheet(
            context: context,
            builder: (_) => Container(
              height: 800,
              child: Center(child: Text('Bottom sheet')),
            ),
          ),
          child: const Text('Show Bottom Sheet'),
        ),
      ),
    );
  }
}

Screenshots or Video

Screenshots / Video demonstration

Stable channel (Dart SDK 3.11.0 and Flutter SDK 3.41.2):

stable-channel.mov

Main channel (Dart SDK 3.12.0-196.0.dev and Flutter SDK 3.42.0-1.0.pre-336):

main-channel.mov

Logs

Logs

N/A

Flutter Doctor output

Doctor output

N/A - tested on Dartpad

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2Important issues not at the top of the work listf: material designflutter/packages/flutter/material repository.has reproducible stepsThe issue has been confirmed reproducible and is ready to work onteam-designOwned by Design Languages teamtriaged-designTriaged by Design Languages team

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions