Skip to content

Commit 40e8620

Browse files
authored
Update dart preamble code. (flutter#87557)
DataTable and Button NNBD docs fixes
1 parent 972bdf8 commit 40e8620

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

packages/flutter/lib/src/material/button_style.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ import 'theme_data.dart';
3535
/// ```dart
3636
/// ElevatedButton(
3737
/// style: ButtonStyle(
38-
/// backgroundColor: MaterialStateProperty.resolveWith<Color>(
38+
/// backgroundColor: MaterialStateProperty.resolveWith<Color?>(
3939
/// (Set<MaterialState> states) {
4040
/// if (states.contains(MaterialState.pressed))
4141
/// return Theme.of(context).colorScheme.primary.withOpacity(0.5);

packages/flutter/lib/src/material/data_table.dart

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,7 @@ class DataRow {
167167
///
168168
/// ```dart
169169
/// DataRow(
170-
/// color: MaterialStateProperty.resolveWith<Color>((Set<MaterialState> states) {
170+
/// color: MaterialStateProperty.resolveWith<Color?>((Set<MaterialState> states) {
171171
/// if (states.contains(MaterialState.selected))
172172
/// return Theme.of(context).colorScheme.primary.withOpacity(0.08);
173173
/// return null; // Use the default value.
@@ -549,7 +549,7 @@ class DataTable extends StatelessWidget {
549549
/// {@template flutter.material.DataTable.dataRowColor}
550550
/// ```dart
551551
/// DataTable(
552-
/// dataRowColor: MaterialStateProperty.resolveWith<Color>((Set<MaterialState> states) {
552+
/// dataRowColor: MaterialStateProperty.resolveWith<Color?>((Set<MaterialState> states) {
553553
/// if (states.contains(MaterialState.selected))
554554
/// return Theme.of(context).colorScheme.primary.withOpacity(0.08);
555555
/// return null; // Use the default value.
@@ -597,7 +597,7 @@ class DataTable extends StatelessWidget {
597597
/// {@template flutter.material.DataTable.headingRowColor}
598598
/// ```dart
599599
/// DataTable(
600-
/// headingRowColor: MaterialStateProperty.resolveWith<Color>((Set<MaterialState> states) {
600+
/// headingRowColor: MaterialStateProperty.resolveWith<Color?>((Set<MaterialState> states) {
601601
/// if (states.contains(MaterialState.hovered))
602602
/// return Theme.of(context).colorScheme.primary.withOpacity(0.08);
603603
/// return null; // Use the default value.

0 commit comments

Comments
 (0)