From 4419c5582aae304a7692fb113422fd78ed41540f Mon Sep 17 00:00:00 2001 From: zlshames Date: Sat, 14 May 2022 18:17:17 -0400 Subject: [PATCH] Fixes compilation issues --- packages/flutter/lib/src/cupertino/text_field.dart | 12 +----------- packages/flutter/lib/src/material/text_field.dart | 12 +----------- 2 files changed, 2 insertions(+), 22 deletions(-) diff --git a/packages/flutter/lib/src/cupertino/text_field.dart b/packages/flutter/lib/src/cupertino/text_field.dart index fdd7dd1da8221..c509e7e39f1d6 100644 --- a/packages/flutter/lib/src/cupertino/text_field.dart +++ b/packages/flutter/lib/src/cupertino/text_field.dart @@ -273,7 +273,7 @@ class CupertinoTextField extends StatefulWidget { this.restorationId, this.scribbleEnabled = true, this.enableIMEPersonalizedLearning = true, - List contentCommitMimeTypes = const [], + this.contentCommitMimeTypes = const [], }) : assert(textAlign != null), assert(readOnly != null), assert(autofocus != null), @@ -314,16 +314,6 @@ class CupertinoTextField extends StatefulWidget { assert(contentCommitMimeTypes != null), keyboardType = keyboardType ?? (maxLines == 1 ? TextInputType.text : TextInputType.multiline), enableInteractiveSelection = enableInteractiveSelection ?? (!readOnly || !obscureText), - contentCommitMimeTypes = contentCommitMimeTypes.isEmpty - ? onContentCommitted == null ? const [] : const [ - 'image/png', - 'image/bmp', - 'image/jpg', - 'image/tiff', - 'image/gif', - 'image/jpeg', - 'image/webp' - ] : contentCommitMimeTypes, toolbarOptions = toolbarOptions ?? (obscureText ? (readOnly diff --git a/packages/flutter/lib/src/material/text_field.dart b/packages/flutter/lib/src/material/text_field.dart index 5be22d35e3bd8..3e41918dbb1a0 100644 --- a/packages/flutter/lib/src/material/text_field.dart +++ b/packages/flutter/lib/src/material/text_field.dart @@ -330,7 +330,7 @@ class TextField extends StatefulWidget { this.restorationId, this.scribbleEnabled = true, this.enableIMEPersonalizedLearning = true, - List contentCommitMimeTypes = const [], + this.contentCommitMimeTypes = const [], }) : assert(textAlign != null), assert(readOnly != null), assert(autofocus != null), @@ -369,16 +369,6 @@ class TextField extends StatefulWidget { assert(contentCommitMimeTypes != null), keyboardType = keyboardType ?? (maxLines == 1 ? TextInputType.text : TextInputType.multiline), enableInteractiveSelection = enableInteractiveSelection ?? (!readOnly || !obscureText), - contentCommitMimeTypes = contentCommitMimeTypes.isEmpty - ? (onContentCommitted == null ? const [] : const [ - 'image/png', - 'image/bmp', - 'image/jpg', - 'image/tiff', - 'image/gif', - 'image/jpeg', - 'image/webp' - ]) : contentCommitMimeTypes, toolbarOptions = toolbarOptions ?? (obscureText ? (readOnly