Update dart preamble code. (#87557)

DataTable and Button NNBD docs fixes
This commit is contained in:
Mahdi K. Fard 2021-08-06 09:14:50 +04:30 committed by GitHub
parent 972bdf80bd
commit 40e8620a27
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 4 deletions

View File

@ -35,7 +35,7 @@ import 'theme_data.dart';
/// ```dart /// ```dart
/// ElevatedButton( /// ElevatedButton(
/// style: ButtonStyle( /// style: ButtonStyle(
/// backgroundColor: MaterialStateProperty.resolveWith<Color>( /// backgroundColor: MaterialStateProperty.resolveWith<Color?>(
/// (Set<MaterialState> states) { /// (Set<MaterialState> states) {
/// if (states.contains(MaterialState.pressed)) /// if (states.contains(MaterialState.pressed))
/// return Theme.of(context).colorScheme.primary.withOpacity(0.5); /// return Theme.of(context).colorScheme.primary.withOpacity(0.5);

View File

@ -167,7 +167,7 @@ class DataRow {
/// ///
/// ```dart /// ```dart
/// DataRow( /// DataRow(
/// color: MaterialStateProperty.resolveWith<Color>((Set<MaterialState> states) { /// color: MaterialStateProperty.resolveWith<Color?>((Set<MaterialState> states) {
/// if (states.contains(MaterialState.selected)) /// if (states.contains(MaterialState.selected))
/// return Theme.of(context).colorScheme.primary.withOpacity(0.08); /// return Theme.of(context).colorScheme.primary.withOpacity(0.08);
/// return null; // Use the default value. /// return null; // Use the default value.
@ -549,7 +549,7 @@ class DataTable extends StatelessWidget {
/// {@template flutter.material.DataTable.dataRowColor} /// {@template flutter.material.DataTable.dataRowColor}
/// ```dart /// ```dart
/// DataTable( /// DataTable(
/// dataRowColor: MaterialStateProperty.resolveWith<Color>((Set<MaterialState> states) { /// dataRowColor: MaterialStateProperty.resolveWith<Color?>((Set<MaterialState> states) {
/// if (states.contains(MaterialState.selected)) /// if (states.contains(MaterialState.selected))
/// return Theme.of(context).colorScheme.primary.withOpacity(0.08); /// return Theme.of(context).colorScheme.primary.withOpacity(0.08);
/// return null; // Use the default value. /// return null; // Use the default value.
@ -597,7 +597,7 @@ class DataTable extends StatelessWidget {
/// {@template flutter.material.DataTable.headingRowColor} /// {@template flutter.material.DataTable.headingRowColor}
/// ```dart /// ```dart
/// DataTable( /// DataTable(
/// headingRowColor: MaterialStateProperty.resolveWith<Color>((Set<MaterialState> states) { /// headingRowColor: MaterialStateProperty.resolveWith<Color?>((Set<MaterialState> states) {
/// if (states.contains(MaterialState.hovered)) /// if (states.contains(MaterialState.hovered))
/// return Theme.of(context).colorScheme.primary.withOpacity(0.08); /// return Theme.of(context).colorScheme.primary.withOpacity(0.08);
/// return null; // Use the default value. /// return null; // Use the default value.