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:
Michael Goderbauer
2023-11-03 15:25:37 -07:00
committed by GitHub
parent 6f5ca8542c
commit 8a0f9118ea
19 changed files with 65 additions and 69 deletions

View File

@@ -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)),

View File

@@ -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(

View File

@@ -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)),

View File

@@ -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))