Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.

Commit d78ee38

Browse files
committed
address comments for text_editing.dart
1 parent 63025e1 commit d78ee38

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

lib/web_ui/lib/src/engine/text_editing/text_editing.dart

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ class EngineAutofillForm {
126126
EngineInputType.fromName(field['inputType']['name']);
127127

128128
html.HtmlElement htmlElement = engineInputType.createDomElement();
129-
autofill.editingState!.applyToDomElement(htmlElement);
129+
autofill.editingState.applyToDomElement(htmlElement);
130130
autofill.applyToDomElement(htmlElement);
131131
_hideAutofillElements(htmlElement);
132132

@@ -207,10 +207,10 @@ class EngineAutofillForm {
207207
/// These values are to be used when a text field have autofill enabled.
208208
@visibleForTesting
209209
class AutofillInfo {
210-
AutofillInfo({this.editingState, required this.uniqueIdentifier, required this.hint});
210+
AutofillInfo({required this.editingState, required this.uniqueIdentifier, required this.hint});
211211

212212
/// The current text and selection state of a text field.
213-
final EditingState? editingState;
213+
final EditingState editingState;
214214

215215
/// Unique value set by the developer.
216216
///
@@ -668,7 +668,7 @@ abstract class DefaultTextEditingStrategy implements TextEditingStrategy {
668668
_subscriptions[i].cancel();
669669
}
670670
_subscriptions.clear();
671-
_domElement?.remove();
671+
domElement.remove();
672672
_domElement = null;
673673
_inputConfiguration.autofillGroup?.removeForm();
674674
}
@@ -1377,7 +1377,7 @@ class EditableTextStyle {
13771377
final ui.TextAlign textAlign;
13781378
final ui.TextDirection textDirection;
13791379

1380-
String? get align => textAlignToCssValue(textAlign, textDirection);
1380+
String get align => textAlignToCssValue(textAlign, textDirection)!;
13811381

13821382
String get cssFont => '${fontWeight} ${fontSize}px ${fontFamily}';
13831383

@@ -1418,10 +1418,10 @@ class EditableTextGeometry {
14181418
}
14191419

14201420
/// The width of the editable in local coordinates, i.e. before applying [globalTransform].
1421-
final double? width;
1421+
final double width;
14221422

14231423
/// The height of the editable in local coordinates, i.e. before applying [globalTransform].
1424-
final double? height;
1424+
final double height;
14251425

14261426
/// The aggregate transform rooted at the global (screen) coordinate system
14271427
/// that places and sizes the editable.

0 commit comments

Comments
 (0)