Skip to content

Commit 7723eaa

Browse files
authored
[material_ui] replace identical checks with equality when dealing with enums (flutter#12633)
related PRs: - flutter#191537 - flutter#191788 - flutter/packages#12632 see - dart-lang/language#1811 - dart-lang/language#312 more info : - dart-lang/sdk#26980 - dart-lang/sdk#36511 - dart-lang/sdk#36564 - dart-lang/sdk#36528 ## Pre-Review Checklist **Note**: The Flutter team is currently trialing the use of [Gemini Code Assist for GitHub](https://developers.google.com/gemini-code-assist/docs/review-github-code). Comments from the `gemini-code-assist` bot should not be taken as authoritative feedback from the Flutter team. If you find its comments useful you can update your code accordingly, but if you are unsure or disagree with the feedback, please feel free to wait for a Flutter team member's review for guidance on which automated comments should be addressed. [^1]: Regular contributors who have demonstrated familiarity with the repository guidelines only need to comment if the PR is not auto-exempted by repo tooling.
1 parent 0d000f4 commit 7723eaa

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

‎packages/material_ui/lib/src/text_field.dart‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -366,9 +366,9 @@ class TextField extends StatefulWidget {
366366
assert(maxLength == null || maxLength == TextField.noMaxLength || maxLength > 0),
367367
// Assert the following instead of setting it directly to avoid surprising the user by silently changing the value they set.
368368
assert(
369-
!identical(textInputAction, TextInputAction.newline) ||
369+
textInputAction != TextInputAction.newline ||
370370
maxLines == 1 ||
371-
!identical(keyboardType, TextInputType.text),
371+
keyboardType != TextInputType.text,
372372
'Use keyboardType TextInputType.multiline when using TextInputAction.newline on a multiline TextField.',
373373
),
374374
keyboardType =

0 commit comments

Comments
 (0)