The only way to get a resizeable sheet to extend larger than minResizableExtent is by passing in a larger initialExtent. Once the sheet is resized smaller than minResizableExtent, it can no longer be extended back to a larger size, even if they one is included as maxExtent or initialExtent.
Steps to Reproduce
Create a resizable bottom sheet with the following properties:
maxExtent/initialExtent greater than minResizableExtent (e.g., maxExtent and initialExtent of 800 with minResizableExtent of 500).
Define maxExtent to a value greater than initialExtent (e.g., 800).
Resize the sheet down to or below the minResizableExtent.
Try to resize the sheet back up to the maxExtent.
Expected Behavior
The bottom sheet should allow expanding to the maxExtent after being resized down below the minResizableExtent.
Actual Behavior
The bottom sheet gets stuck at the minResizableExtent and does not expand back to the maxExtent.
Code Sample
import 'package:flutter/material.dart';
import 'package:sheet/sheet.dart';
class PingFriendProfileViewSheet extends StatelessWidget {
const PingFriendProfileViewSheet({
required this.userId,
required this.initialExtent,
required this.minExtent,
required this.maxExtent,
super.key,
this.pop,
this.sheetController,
});
final String userId;
final VoidCallback? pop;
final SheetController? sheetController;
final double initialExtent;
final double minExtent;
final double maxExtent;
@override
Widget build(BuildContext context) {
return Sheet(
controller: sheetController,
minExtent: 200,
maxExtent: 800,
initialExtent: 800,
backgroundColor: Colors.transparent,
physics: const SnapSheetPhysics(
stops: [200, 500, 800],
relative: false,
),
resizable: true,
minResizableExtent: 500,
child: const Column(
children: [
Expanded(
child: ColoredBox(
color: Colors.orange,
child: Text(
'Expanded should be able to grow back to maxExtent',
),
),
),
],
),
);
}
}
Description
The only way to get a resizeable sheet to extend larger than minResizableExtent is by passing in a larger initialExtent. Once the sheet is resized smaller than minResizableExtent, it can no longer be extended back to a larger size, even if they one is included as maxExtent or initialExtent.
Steps to Reproduce
maxExtent
/initialExtent
greater thanminResizableExtent
(e.g.,maxExtent
andinitialExtent
of 800 withminResizableExtent
of 500).maxExtent
to a value greater thaninitialExtent
(e.g., 800).minResizableExtent
.maxExtent
.Expected Behavior
The bottom sheet should allow expanding to the
maxExtent
after being resized down below theminResizableExtent
.Actual Behavior
The bottom sheet gets stuck at the
minResizableExtent
and does not expand back to themaxExtent
.Code Sample
Video Demonstration
https://github.com/jamesblasco/modal_bottom_sheet/assets/10517945/a84f7321-ad8e-47b3-ad46-22eda60c2d54
Also not that jank while scrolling in sizes larger than minResizableExtent
Environment Information