-
Taha Tesser authored
fixes https://github.com/flutter/flutter/issues/128367 <details> <summary>code sample</summary> ```dart 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, theme: ThemeData(useMaterial3: true), home: Scaffold( floatingActionButton: Builder( builder: (BuildContext context) => FloatingActionButton( child: const Icon(Icons.add), onPressed: () { Scaffold.of(context).showBottomSheet<void>( (_) { return DraggableScrollableSheet( expand: false, builder: (_, ScrollController scrollController) => ListView.builder( controller: scrollController, itemCount: 25, itemBuilder: (BuildContext context, int index) { return ListTile( title: Text('Item $index - tap to close'), onTap: () { Navigator.of(context).pop(); }, ); }, ), ); }, ); }, ), ), ), ); } } ``` </details> ### Before https://github.com/flutter/flutter/assets/48603081/fa87feb9-54f2-4e50-bf71-c81d9e54ff61 ### After https://github.com/flutter/flutter/assets/48603081/7d192059-7600-4d65-ae84-6321f3598133