Remove unused generic type from BottomSheet (#137791)
Fixes https://github.com/flutter/flutter/issues/137424. The generic type argument was unused.
This commit is contained in:
committed by
GitHub
parent
6f5ca8542c
commit
8a0f9118ea
@@ -1579,7 +1579,7 @@ class BottomSheetSection extends StatefulWidget {
|
||||
|
||||
class _BottomSheetSectionState extends State<BottomSheetSection> {
|
||||
bool isNonModalBottomSheetOpen = false;
|
||||
PersistentBottomSheetController<void>? _nonModalBottomSheetController;
|
||||
PersistentBottomSheetController? _nonModalBottomSheetController;
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
@@ -1663,7 +1663,7 @@ class _BottomSheetSectionState extends State<BottomSheetSection> {
|
||||
});
|
||||
}
|
||||
|
||||
_nonModalBottomSheetController = showBottomSheet<void>(
|
||||
_nonModalBottomSheetController = showBottomSheet(
|
||||
elevation: 8.0,
|
||||
context: context,
|
||||
constraints: const BoxConstraints(maxWidth: 640),
|
||||
|
||||
@@ -265,7 +265,7 @@ class StockHomeState extends State<StockHome> {
|
||||
Navigator.pushNamed(context, '/stock', arguments: stock.symbol);
|
||||
},
|
||||
onShow: (Stock stock) {
|
||||
_scaffoldKey.currentState!.showBottomSheet<void>((BuildContext context) => StockSymbolBottomSheet(stock: stock));
|
||||
_scaffoldKey.currentState!.showBottomSheet((BuildContext context) => StockSymbolBottomSheet(stock: stock));
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
@@ -32,7 +32,7 @@ class ListDemo extends StatefulWidget {
|
||||
class _ListDemoState extends State<ListDemo> {
|
||||
static final GlobalKey<ScaffoldState> scaffoldKey = GlobalKey<ScaffoldState>();
|
||||
|
||||
PersistentBottomSheetController<void>? _bottomSheet;
|
||||
PersistentBottomSheetController? _bottomSheet;
|
||||
_MaterialListType? _itemType = _MaterialListType.threeLine;
|
||||
bool? _dense = false;
|
||||
bool? _showAvatars = true;
|
||||
@@ -51,7 +51,7 @@ class _ListDemoState extends State<ListDemo> {
|
||||
}
|
||||
|
||||
void _showConfigurationSheet() {
|
||||
final PersistentBottomSheetController<void> bottomSheet = scaffoldKey.currentState!.showBottomSheet<void>((BuildContext bottomSheetContext) {
|
||||
final PersistentBottomSheetController bottomSheet = scaffoldKey.currentState!.showBottomSheet((BuildContext bottomSheetContext) {
|
||||
return Container(
|
||||
decoration: const BoxDecoration(
|
||||
border: Border(top: BorderSide(color: Colors.black26)),
|
||||
|
||||
@@ -30,7 +30,7 @@ class _PersistentBottomSheetDemoState extends State<PersistentBottomSheetDemo> {
|
||||
setState(() { // disable the button
|
||||
_showBottomSheetCallback = null;
|
||||
});
|
||||
_scaffoldKey.currentState!.showBottomSheet<void>((BuildContext context) {
|
||||
_scaffoldKey.currentState!.showBottomSheet((BuildContext context) {
|
||||
final ThemeData themeData = Theme.of(context);
|
||||
return Container(
|
||||
decoration: BoxDecoration(
|
||||
|
||||
@@ -37,7 +37,7 @@ class _ListItem {
|
||||
class _ListDemoState extends State<ReorderableListDemo> {
|
||||
static final GlobalKey<ScaffoldState> scaffoldKey = GlobalKey<ScaffoldState>();
|
||||
|
||||
PersistentBottomSheetController<void>? _bottomSheet;
|
||||
PersistentBottomSheetController? _bottomSheet;
|
||||
_ReorderableListType? _itemType = _ReorderableListType.threeLine;
|
||||
bool? _reverse = false;
|
||||
bool _reverseSort = false;
|
||||
@@ -71,7 +71,7 @@ class _ListDemoState extends State<ReorderableListDemo> {
|
||||
|
||||
void _showConfigurationSheet() {
|
||||
setState(() {
|
||||
_bottomSheet = scaffoldKey.currentState!.showBottomSheet<void>((BuildContext bottomSheetContext) {
|
||||
_bottomSheet = scaffoldKey.currentState!.showBottomSheet((BuildContext bottomSheetContext) {
|
||||
return DecoratedBox(
|
||||
decoration: const BoxDecoration(
|
||||
border: Border(top: BorderSide(color: Colors.black26)),
|
||||
|
||||
@@ -71,7 +71,7 @@ class _TabsFabDemoState extends State<TabsFabDemo> with SingleTickerProviderStat
|
||||
}
|
||||
|
||||
void _showExplanatoryText() {
|
||||
_scaffoldKey.currentState!.showBottomSheet<void>((BuildContext context) {
|
||||
_scaffoldKey.currentState!.showBottomSheet((BuildContext context) {
|
||||
return Container(
|
||||
decoration: BoxDecoration(
|
||||
border: Border(top: BorderSide(color: Theme.of(context).dividerColor))
|
||||
|
||||
Reference in New Issue
Block a user