Use tristate checkbox engine changes (#111032)
* Introduce tests for tristate checkboxes * Initial * Use tristate changes in engine * Flutter_test matchers test update * Comments, tests * Update packages/flutter/lib/src/semantics/semantics.dart Co-authored-by: Chris Bracken <chris@bracken.jp> * Assert mutual exclusivity * Assert valid state before updating state * Update packages/flutter/lib/src/semantics/semantics.dart Typo fix in comment Co-authored-by: Loïc Sharma <737941+loic-sharma@users.noreply.github.com> Co-authored-by: Chris Bracken <chris@bracken.jp> Co-authored-by: Loïc Sharma <737941+loic-sharma@users.noreply.github.com>
This commit is contained in:
@@ -542,6 +542,7 @@ Matcher matchesSemantics({
|
||||
// Flags //
|
||||
bool hasCheckedState = false,
|
||||
bool isChecked = false,
|
||||
bool isCheckStateMixed = false,
|
||||
bool isSelected = false,
|
||||
bool isButton = false,
|
||||
bool isSlider = false,
|
||||
@@ -617,6 +618,7 @@ Matcher matchesSemantics({
|
||||
// Flags
|
||||
hasCheckedState: hasCheckedState,
|
||||
isChecked: isChecked,
|
||||
isCheckStateMixed: isCheckStateMixed,
|
||||
isSelected: isSelected,
|
||||
isButton: isButton,
|
||||
isSlider: isSlider,
|
||||
@@ -713,6 +715,7 @@ Matcher containsSemantics({
|
||||
// Flags
|
||||
bool? hasCheckedState,
|
||||
bool? isChecked,
|
||||
bool? isCheckStateMixed,
|
||||
bool? isSelected,
|
||||
bool? isButton,
|
||||
bool? isSlider,
|
||||
@@ -788,6 +791,7 @@ Matcher containsSemantics({
|
||||
// Flags
|
||||
hasCheckedState: hasCheckedState,
|
||||
isChecked: isChecked,
|
||||
isCheckStateMixed: isCheckStateMixed,
|
||||
isSelected: isSelected,
|
||||
isButton: isButton,
|
||||
isSlider: isSlider,
|
||||
@@ -2085,6 +2089,7 @@ class _MatchesSemanticsData extends Matcher {
|
||||
// Flags
|
||||
required bool? hasCheckedState,
|
||||
required bool? isChecked,
|
||||
required bool? isCheckStateMixed,
|
||||
required bool? isSelected,
|
||||
required bool? isButton,
|
||||
required bool? isSlider,
|
||||
@@ -2138,6 +2143,7 @@ class _MatchesSemanticsData extends Matcher {
|
||||
}) : flags = <SemanticsFlag, bool>{
|
||||
if (hasCheckedState != null) SemanticsFlag.hasCheckedState: hasCheckedState,
|
||||
if (isChecked != null) SemanticsFlag.isChecked: isChecked,
|
||||
if (isCheckStateMixed != null) SemanticsFlag.isCheckStateMixed: isCheckStateMixed,
|
||||
if (isSelected != null) SemanticsFlag.isSelected: isSelected,
|
||||
if (isButton != null) SemanticsFlag.isButton: isButton,
|
||||
if (isSlider != null) SemanticsFlag.isSlider: isSlider,
|
||||
|
||||
Reference in New Issue
Block a user