Enable strict-inference (#135043)
Avoids that dynamic accidentally sneaks in, see https://dart.dev/tools/analysis#enabling-additional-type-checks
This commit is contained in:
committed by
GitHub
parent
96a4ae9dc5
commit
b0a90aee17
@@ -91,7 +91,7 @@ class _BottomNavigationBarExampleState extends State<BottomNavigationBarExample>
|
||||
}
|
||||
|
||||
void showModal(BuildContext context) {
|
||||
showDialog(
|
||||
showDialog<void>(
|
||||
context: context,
|
||||
builder: (BuildContext context) => AlertDialog(
|
||||
content: const Text('Example Dialog'),
|
||||
|
||||
@@ -174,7 +174,7 @@ class RootPage extends StatelessWidget {
|
||||
ElevatedButton(
|
||||
style: buttonStyle,
|
||||
onPressed: () {
|
||||
showDialog(
|
||||
showDialog<void>(
|
||||
context: context,
|
||||
useRootNavigator: false,
|
||||
builder: _buildDialog,
|
||||
@@ -186,9 +186,9 @@ class RootPage extends StatelessWidget {
|
||||
ElevatedButton(
|
||||
style: buttonStyle,
|
||||
onPressed: () {
|
||||
showDialog(
|
||||
showDialog<void>(
|
||||
context: context,
|
||||
useRootNavigator: true,
|
||||
useRootNavigator: true, // ignore: avoid_redundant_argument_values
|
||||
builder: _buildDialog,
|
||||
);
|
||||
},
|
||||
@@ -200,7 +200,7 @@ class RootPage extends StatelessWidget {
|
||||
return ElevatedButton(
|
||||
style: buttonStyle,
|
||||
onPressed: () {
|
||||
showBottomSheet(
|
||||
showBottomSheet<void>(
|
||||
context: context,
|
||||
builder: (BuildContext context) {
|
||||
return Container(
|
||||
|
||||
@@ -136,7 +136,7 @@ class GridBuilder extends StatefulWidget {
|
||||
});
|
||||
|
||||
final bool isSelectionMode;
|
||||
final Function(bool)? onSelectionChange;
|
||||
final ValueChanged<bool>? onSelectionChange;
|
||||
final List<bool> selectedList;
|
||||
|
||||
@override
|
||||
@@ -189,7 +189,7 @@ class ListBuilder extends StatefulWidget {
|
||||
|
||||
final bool isSelectionMode;
|
||||
final List<bool> selectedList;
|
||||
final Function(bool)? onSelectionChange;
|
||||
final ValueChanged<bool>? onSelectionChange;
|
||||
|
||||
@override
|
||||
State<ListBuilder> createState() => _ListBuilderState();
|
||||
|
||||
Reference in New Issue
Block a user