@@ -124,7 +124,7 @@ void main() {
124
124
125
125
group ('Common text editing shortcuts: ' ,
126
126
() {
127
- final TargetPlatformVariant allExceptMacOS = TargetPlatformVariant (TargetPlatform .values.toSet ()..remove ( TargetPlatform .macOS));
127
+ final TargetPlatformVariant allExceptApple = TargetPlatformVariant (TargetPlatform .values.toSet ()..removeAll ( < TargetPlatform > [ TargetPlatform .macOS, TargetPlatform .iOS] ));
128
128
129
129
group ('backspace' , () {
130
130
const LogicalKeyboardKey trigger = LogicalKeyboardKey .backspace;
@@ -491,8 +491,8 @@ void main() {
491
491
group ('word modifier + backspace' , () {
492
492
const LogicalKeyboardKey trigger = LogicalKeyboardKey .backspace;
493
493
SingleActivator wordModifierBackspace () {
494
- final bool isMacOS = defaultTargetPlatform == TargetPlatform .macOS;
495
- return SingleActivator (trigger, control: ! isMacOS , alt: isMacOS );
494
+ final bool isApple = defaultTargetPlatform == TargetPlatform .macOS || defaultTargetPlatform == TargetPlatform .iOS ;
495
+ return SingleActivator (trigger, control: ! isApple , alt: isApple );
496
496
}
497
497
498
498
testWidgets ('WordModifier-backspace' , (WidgetTester tester) async {
@@ -631,8 +631,8 @@ void main() {
631
631
group ('word modifier + delete' , () {
632
632
const LogicalKeyboardKey trigger = LogicalKeyboardKey .delete;
633
633
SingleActivator wordModifierDelete () {
634
- final bool isMacOS = defaultTargetPlatform == TargetPlatform .macOS;
635
- return SingleActivator (trigger, control: ! isMacOS , alt: isMacOS );
634
+ final bool isApple = defaultTargetPlatform == TargetPlatform .macOS || defaultTargetPlatform == TargetPlatform .iOS ;
635
+ return SingleActivator (trigger, control: ! isApple , alt: isApple );
636
636
}
637
637
638
638
testWidgets ('WordModifier-delete' , (WidgetTester tester) async {
@@ -764,8 +764,8 @@ void main() {
764
764
group ('line modifier + backspace' , () {
765
765
const LogicalKeyboardKey trigger = LogicalKeyboardKey .backspace;
766
766
SingleActivator lineModifierBackspace () {
767
- final bool isMacOS = defaultTargetPlatform == TargetPlatform .macOS;
768
- return SingleActivator (trigger, meta: isMacOS , alt: ! isMacOS );
767
+ final bool isApple = defaultTargetPlatform == TargetPlatform .macOS || defaultTargetPlatform == TargetPlatform .iOS ;
768
+ return SingleActivator (trigger, meta: isApple , alt: ! isApple );
769
769
}
770
770
771
771
testWidgets ('alt-backspace' , (WidgetTester tester) async {
@@ -945,8 +945,8 @@ void main() {
945
945
group ('line modifier + delete' , () {
946
946
const LogicalKeyboardKey trigger = LogicalKeyboardKey .delete;
947
947
SingleActivator lineModifierDelete () {
948
- final bool isMacOS = defaultTargetPlatform == TargetPlatform .macOS;
949
- return SingleActivator (trigger, meta: isMacOS , alt: ! isMacOS );
948
+ final bool isApple = defaultTargetPlatform == TargetPlatform .macOS || defaultTargetPlatform == TargetPlatform .iOS ;
949
+ return SingleActivator (trigger, meta: isApple , alt: ! isApple );
950
950
}
951
951
952
952
testWidgets ('alt-delete' , (WidgetTester tester) async {
@@ -1167,7 +1167,7 @@ void main() {
1167
1167
expect (controller.selection, const TextSelection .collapsed (
1168
1168
offset: 4 ,
1169
1169
));
1170
- }, variant: allExceptMacOS );
1170
+ }, variant: allExceptApple );
1171
1171
1172
1172
testWidgets ('line modifier + arrow key movement' , (WidgetTester tester) async {
1173
1173
controller.text = testText;
@@ -1181,7 +1181,7 @@ void main() {
1181
1181
expect (controller.selection, const TextSelection .collapsed (
1182
1182
offset: 20 ,
1183
1183
));
1184
- }, variant: allExceptMacOS );
1184
+ }, variant: allExceptApple );
1185
1185
});
1186
1186
1187
1187
group ('right' , () {
@@ -1230,7 +1230,7 @@ void main() {
1230
1230
expect (controller.selection, const TextSelection .collapsed (
1231
1231
offset: 10 ,
1232
1232
));
1233
- }, variant: allExceptMacOS );
1233
+ }, variant: allExceptApple );
1234
1234
1235
1235
testWidgets ('line modifier + arrow key movement' , (WidgetTester tester) async {
1236
1236
controller.text = testText;
@@ -1245,7 +1245,7 @@ void main() {
1245
1245
offset: 35 , // Before the newline character.
1246
1246
affinity: TextAffinity .upstream,
1247
1247
));
1248
- }, variant: allExceptMacOS );
1248
+ }, variant: allExceptApple );
1249
1249
});
1250
1250
1251
1251
group ('With initial non-collapsed selection' , () {
@@ -1352,7 +1352,7 @@ void main() {
1352
1352
expect (controller.selection, const TextSelection .collapsed (
1353
1353
offset: 28 , // After "good".
1354
1354
));
1355
- }, variant: allExceptMacOS );
1355
+ }, variant: allExceptApple );
1356
1356
1357
1357
testWidgets ('line modifier + arrow key movement' , (WidgetTester tester) async {
1358
1358
controller.text = testText;
@@ -1406,7 +1406,7 @@ void main() {
1406
1406
offset: 35 , // After "people".
1407
1407
affinity: TextAffinity .upstream,
1408
1408
));
1409
- }, variant: allExceptMacOS );
1409
+ }, variant: allExceptApple );
1410
1410
});
1411
1411
1412
1412
group ('vertical movement' , () {
0 commit comments