password_textfield.dart 22 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612
  1. import 'dart:ui' as ui show BoxHeightStyle, BoxWidthStyle;
  2. import 'package:flutter/gestures.dart';
  3. import 'package:flutter/material.dart';
  4. import 'package:flutter/services.dart';
  5. import 'package:lszlgl/config/pics.dart';
  6. class PasswordTextField extends StatefulWidget {
  7. const PasswordTextField({
  8. super.key,
  9. this.visibleIcon = Icons.remove_red_eye_outlined,
  10. this.inVisibleIcon = Icons.remove_red_eye_outlined,
  11. this.initialObscurity = false,
  12. this.controller,
  13. this.focusNode,
  14. this.undoController,
  15. this.decoration = const InputDecoration(),
  16. this.keyboardType,
  17. this.textInputAction,
  18. this.textCapitalization = TextCapitalization.none,
  19. this.style,
  20. this.strutStyle,
  21. this.textAlign = TextAlign.start,
  22. this.textAlignVertical,
  23. this.textDirection,
  24. this.readOnly = false,
  25. this.showCursor,
  26. this.autofocus = false,
  27. this.obscuringCharacter = '•',
  28. this.autocorrect = true,
  29. this.enableSuggestions = true,
  30. this.maxLines = 1,
  31. this.minLines,
  32. this.expands = false,
  33. this.maxLength,
  34. this.maxLengthEnforcement,
  35. this.onChanged,
  36. this.onEditingComplete,
  37. this.onSubmitted,
  38. this.onAppPrivateCommand,
  39. this.inputFormatters,
  40. this.enabled,
  41. this.cursorWidth = 2.0,
  42. this.cursorHeight,
  43. this.cursorRadius,
  44. this.cursorOpacityAnimates,
  45. this.cursorColor,
  46. this.selectionHeightStyle = ui.BoxHeightStyle.tight,
  47. this.selectionWidthStyle = ui.BoxWidthStyle.tight,
  48. this.keyboardAppearance,
  49. this.scrollPadding = const EdgeInsets.all(20.0),
  50. this.dragStartBehavior = DragStartBehavior.start,
  51. this.enableInteractiveSelection = true,
  52. this.selectionControls,
  53. this.onTap,
  54. this.onTapOutside,
  55. this.mouseCursor,
  56. this.buildCounter,
  57. this.scrollController,
  58. this.scrollPhysics,
  59. this.autofillHints = const <String>[],
  60. this.contentInsertionConfiguration,
  61. this.clipBehavior = Clip.hardEdge,
  62. this.restorationId,
  63. this.scribbleEnabled = true,
  64. this.enableIMEPersonalizedLearning = true,
  65. this.contextMenuBuilder,
  66. this.canRequestFocus = true,
  67. this.spellCheckConfiguration,
  68. this.magnifierConfiguration,
  69. });
  70. /// Displaying toggle icon(show).
  71. ///
  72. /// Defaults is [Icons.visibility].
  73. final IconData visibleIcon;
  74. /// Displaying toggle icon(hide).
  75. ///
  76. /// Defaults is [Icons.visibility_off].
  77. final IconData inVisibleIcon;
  78. /// The obscure feature is enabled by default.
  79. ///
  80. /// Default is [false].
  81. final bool initialObscurity;
  82. /// {@macro flutter.widgets.magnifier.TextMagnifierConfiguration.intro}
  83. ///
  84. /// {@macro flutter.widgets.magnifier.intro}
  85. ///
  86. /// {@macro flutter.widgets.magnifier.TextMagnifierConfiguration.details}
  87. ///
  88. /// By default, builds a [CupertinoTextMagnifier] on iOS and [TextMagnifier]
  89. /// on Android, and builds nothing on all other platforms. If it is desired to
  90. /// suppress the magnifier, consider passing [TextMagnifierConfiguration.disabled].
  91. ///
  92. /// {@tool dartpad}
  93. /// This sample demonstrates how to customize the magnifier that this text field uses.
  94. ///
  95. /// ** See code in examples/api/lib/widgets/text_magnifier/text_magnifier.0.dart **
  96. /// {@end-tool}
  97. final TextMagnifierConfiguration? magnifierConfiguration;
  98. /// Controls the text being edited.
  99. ///
  100. /// If null, this widget will create its own [TextEditingController].
  101. final TextEditingController? controller;
  102. /// Defines the keyboard focus for this widget.
  103. ///
  104. /// The [focusNode] is a long-lived object that's typically managed by a
  105. /// [StatefulWidget] parent. See [FocusNode] for more information.
  106. ///
  107. /// To give the keyboard focus to this widget, provide a [focusNode] and then
  108. /// use the current [FocusScope] to request the focus:
  109. ///
  110. /// ```dart
  111. /// FocusScope.of(context).requestFocus(myFocusNode);
  112. /// ```
  113. ///
  114. /// This happens automatically when the widget is tapped.
  115. ///
  116. /// To be notified when the widget gains or loses the focus, add a listener
  117. /// to the [focusNode]:
  118. ///
  119. /// ```dart
  120. /// myFocusNode.addListener(() { print(myFocusNode.hasFocus); });
  121. /// ```
  122. ///
  123. /// If null, this widget will create its own [FocusNode].
  124. ///
  125. /// ## Keyboard
  126. ///
  127. /// Requesting the focus will typically cause the keyboard to be shown
  128. /// if it's not showing already.
  129. ///
  130. /// On Android, the user can hide the keyboard - without changing the focus -
  131. /// with the system back button. They can restore the keyboard's visibility
  132. /// by tapping on a text field. The user might hide the keyboard and
  133. /// switch to a physical keyboard, or they might just need to get it
  134. /// out of the way for a moment, to expose something it's
  135. /// obscuring. In this case requesting the focus again will not
  136. /// cause the focus to change, and will not make the keyboard visible.
  137. ///
  138. /// This widget builds an [EditableText] and will ensure that the keyboard is
  139. /// showing when it is tapped by calling [EditableTextState.requestKeyboard()].
  140. final FocusNode? focusNode;
  141. /// The decoration to show around the text field.
  142. ///
  143. /// By default, draws a horizontal line under the text field but can be
  144. /// configured to show an icon, label, hint text, and error text.
  145. ///
  146. /// Specify null to remove the decoration entirely (including the
  147. /// extra padding introduced by the decoration to save space for the labels).
  148. final InputDecoration decoration;
  149. /// {@macro flutter.widgets.editableText.keyboardType}
  150. final TextInputType? keyboardType;
  151. /// The type of action button to use for the keyboard.
  152. ///
  153. /// Defaults to [TextInputAction.newline] if [keyboardType] is
  154. /// [TextInputType.multiline] and [TextInputAction.done] otherwise.
  155. final TextInputAction? textInputAction;
  156. /// {@macro flutter.widgets.editableText.textCapitalization}
  157. final TextCapitalization textCapitalization;
  158. /// The style to use for the text being edited.
  159. ///
  160. /// This text style is also used as the base style for the [decoration].
  161. ///
  162. /// If null, defaults to the `titleMedium` text style from the current [Theme].
  163. final TextStyle? style;
  164. /// {@macro flutter.widgets.editableText.strutStyle}
  165. final StrutStyle? strutStyle;
  166. /// {@macro flutter.widgets.editableText.textAlign}
  167. final TextAlign textAlign;
  168. /// {@macro flutter.material.InputDecorator.textAlignVertical}
  169. final TextAlignVertical? textAlignVertical;
  170. /// {@macro flutter.widgets.editableText.textDirection}
  171. final TextDirection? textDirection;
  172. /// {@macro flutter.widgets.editableText.autofocus}
  173. final bool autofocus;
  174. /// {@macro flutter.widgets.editableText.obscuringCharacter}
  175. final String obscuringCharacter;
  176. /// {@macro flutter.widgets.editableText.autocorrect}
  177. final bool autocorrect;
  178. /// {@macro flutter.services.TextInputConfiguration.enableSuggestions}
  179. final bool enableSuggestions;
  180. /// {@macro flutter.widgets.editableText.maxLines}
  181. /// * [expands], which determines whether the field should fill the height of
  182. /// its parent.
  183. final int? maxLines;
  184. /// {@macro flutter.widgets.editableText.minLines}
  185. /// * [expands], which determines whether the field should fill the height of
  186. /// its parent.
  187. final int? minLines;
  188. /// {@macro flutter.widgets.editableText.expands}
  189. final bool expands;
  190. /// {@macro flutter.widgets.editableText.readOnly}
  191. final bool readOnly;
  192. /// {@macro flutter.widgets.editableText.showCursor}
  193. final bool? showCursor;
  194. /// The maximum number of characters (Unicode grapheme clusters) to allow in
  195. /// the text field.
  196. ///
  197. /// If set, a character counter will be displayed below the
  198. /// field showing how many characters have been entered. If set to a number
  199. /// greater than 0, it will also display the maximum number allowed. If set
  200. /// to [TextField.noMaxLength] then only the current character count is displayed.
  201. ///
  202. /// After [maxLength] characters have been input, additional input
  203. /// is ignored, unless [maxLengthEnforcement] is set to
  204. /// [MaxLengthEnforcement.none].
  205. ///
  206. /// The text field enforces the length with a [LengthLimitingTextInputFormatter],
  207. /// which is evaluated after the supplied [inputFormatters], if any.
  208. ///
  209. /// This value must be either null, [TextField.noMaxLength], or greater than 0.
  210. /// If null (the default) then there is no limit to the number of characters
  211. /// that can be entered. If set to [TextField.noMaxLength], then no limit will
  212. /// be enforced, but the number of characters entered will still be displayed.
  213. ///
  214. /// Whitespace characters (e.g. newline, space, tab) are included in the
  215. /// character count.
  216. ///
  217. /// If [maxLengthEnforcement] is [MaxLengthEnforcement.none], then more than
  218. /// [maxLength] characters may be entered, but the error counter and divider
  219. /// will switch to the [decoration]'s [InputDecoration.errorStyle] when the
  220. /// limit is exceeded.
  221. ///
  222. /// {@macro flutter.services.lengthLimitingTextInputFormatter.maxLength}
  223. final int? maxLength;
  224. /// Determines how the [maxLength] limit should be enforced.
  225. ///
  226. /// {@macro flutter.services.textFormatter.effectiveMaxLengthEnforcement}
  227. ///
  228. /// {@macro flutter.services.textFormatter.maxLengthEnforcement}
  229. final MaxLengthEnforcement? maxLengthEnforcement;
  230. /// {@macro flutter.widgets.editableText.onChanged}
  231. ///
  232. /// See also:
  233. ///
  234. /// * [inputFormatters], which are called before [onChanged]
  235. /// runs and can validate and change ("format") the input value.
  236. /// * [onEditingComplete], [onSubmitted]:
  237. /// which are more specialized input change notifications.
  238. final ValueChanged<String>? onChanged;
  239. /// {@macro flutter.widgets.editableText.onEditingComplete}
  240. final VoidCallback? onEditingComplete;
  241. /// {@macro flutter.widgets.editableText.onSubmitted}
  242. ///
  243. /// See also:
  244. ///
  245. /// * [TextInputAction.next] and [TextInputAction.previous], which
  246. /// automatically shift the focus to the next/previous focusable item when
  247. /// the user is done editing.
  248. final ValueChanged<String>? onSubmitted;
  249. /// {@macro flutter.widgets.editableText.onAppPrivateCommand}
  250. final AppPrivateCommandCallback? onAppPrivateCommand;
  251. /// {@macro flutter.widgets.editableText.inputFormatters}
  252. final List<TextInputFormatter>? inputFormatters;
  253. /// If false the text field is "disabled": it ignores taps and its
  254. /// [decoration] is rendered in grey.
  255. ///
  256. /// If non-null this property overrides the [decoration]'s
  257. /// [InputDecoration.enabled] property.
  258. final bool? enabled;
  259. /// {@macro flutter.widgets.editableText.cursorWidth}
  260. final double cursorWidth;
  261. /// {@macro flutter.widgets.editableText.cursorHeight}
  262. final double? cursorHeight;
  263. /// {@macro flutter.widgets.editableText.cursorRadius}
  264. final Radius? cursorRadius;
  265. /// {@macro flutter.widgets.editableText.cursorOpacityAnimates}
  266. final bool? cursorOpacityAnimates;
  267. /// The color of the cursor.
  268. ///
  269. /// The cursor indicates the current location of text insertion point in
  270. /// the field.
  271. ///
  272. /// If this is null it will default to the ambient
  273. /// [DefaultSelectionStyle.cursorColor]. If that is null, and the
  274. /// [ThemeData.platform] is [TargetPlatform.iOS] or [TargetPlatform.macOS]
  275. /// it will use [CupertinoThemeData.primaryColor]. Otherwise it will use
  276. /// the value of [ColorScheme.primary] of [ThemeData.colorScheme].
  277. final Color? cursorColor;
  278. /// Controls how tall the selection highlight boxes are computed to be.
  279. ///
  280. /// See [ui.BoxHeightStyle] for details on available styles.
  281. final ui.BoxHeightStyle selectionHeightStyle;
  282. /// Controls how wide the selection highlight boxes are computed to be.
  283. ///
  284. /// See [ui.BoxWidthStyle] for details on available styles.
  285. final ui.BoxWidthStyle selectionWidthStyle;
  286. /// The appearance of the keyboard.
  287. ///
  288. /// This setting is only honored on iOS devices.
  289. ///
  290. /// If unset, defaults to [ThemeData.brightness].
  291. final Brightness? keyboardAppearance;
  292. /// {@macro flutter.widgets.editableText.scrollPadding}
  293. final EdgeInsets scrollPadding;
  294. /// {@macro flutter.widgets.editableText.enableInteractiveSelection}
  295. final bool enableInteractiveSelection;
  296. /// {@macro flutter.widgets.editableText.selectionControls}
  297. final TextSelectionControls? selectionControls;
  298. /// {@macro flutter.widgets.scrollable.dragStartBehavior}
  299. final DragStartBehavior dragStartBehavior;
  300. /// {@macro flutter.widgets.editableText.selectionEnabled}
  301. bool get selectionEnabled => enableInteractiveSelection;
  302. /// {@template flutter.material.textfield.onTap}
  303. /// Called for each distinct tap except for every second tap of a double tap.
  304. ///
  305. /// The text field builds a [GestureDetector] to handle input events like tap,
  306. /// to trigger focus requests, to move the caret, adjust the selection, etc.
  307. /// Handling some of those events by wrapping the text field with a competing
  308. /// GestureDetector is problematic.
  309. ///
  310. /// To unconditionally handle taps, without interfering with the text field's
  311. /// internal gesture detector, provide this callback.
  312. ///
  313. /// If the text field is created with [enabled] false, taps will not be
  314. /// recognized.
  315. ///
  316. /// To be notified when the text field gains or loses the focus, provide a
  317. /// [focusNode] and add a listener to that.
  318. ///
  319. /// To listen to arbitrary pointer events without competing with the
  320. /// text field's internal gesture detector, use a [Listener].
  321. /// {@endtemplate}
  322. final GestureTapCallback? onTap;
  323. /// {@macro flutter.widgets.editableText.onTapOutside}
  324. ///
  325. /// {@tool dartpad}
  326. /// This example shows how to use a `TextFieldTapRegion` to wrap a set of
  327. /// "spinner" buttons that increment and decrement a value in the [TextField]
  328. /// without causing the text field to lose keyboard focus.
  329. ///
  330. /// This example includes a generic `SpinnerField<T>` class that you can copy
  331. /// into your own project and customize.
  332. ///
  333. /// ** See code in examples/api/lib/widgets/tap_region/text_field_tap_region.0.dart **
  334. /// {@end-tool}
  335. ///
  336. /// See also:
  337. ///
  338. /// * [TapRegion] for how the region group is determined.
  339. final TapRegionCallback? onTapOutside;
  340. /// The cursor for a mouse pointer when it enters or is hovering over the
  341. /// widget.
  342. ///
  343. /// If [mouseCursor] is a [MaterialStateProperty<MouseCursor>],
  344. /// [MaterialStateProperty.resolve] is used for the following [MaterialState]s:
  345. ///
  346. /// * [MaterialState.error].
  347. /// * [MaterialState.hovered].
  348. /// * [MaterialState.focused].
  349. /// * [MaterialState.disabled].
  350. ///
  351. /// If this property is null, [MaterialStateMouseCursor.textable] will be used.
  352. ///
  353. /// The [mouseCursor] is the only property of [TextField] that controls the
  354. /// appearance of the mouse pointer. All other properties related to "cursor"
  355. /// stand for the text cursor, which is usually a blinking vertical line at
  356. /// the editing position.
  357. final MouseCursor? mouseCursor;
  358. /// Callback that generates a custom [InputDecoration.counter] widget.
  359. ///
  360. /// See [InputCounterWidgetBuilder] for an explanation of the passed in
  361. /// arguments. The returned widget will be placed below the line in place of
  362. /// the default widget built when [InputDecoration.counterText] is specified.
  363. ///
  364. /// The returned widget will be wrapped in a [Semantics] widget for
  365. /// accessibility, but it also needs to be accessible itself. For example,
  366. /// if returning a Text widget, set the [Text.semanticsLabel] property.
  367. ///
  368. /// {@tool snippet}
  369. /// ```dart
  370. /// Widget counter(
  371. /// BuildContext context,
  372. /// {
  373. /// required int currentLength,
  374. /// required int? maxLength,
  375. /// required bool isFocused,
  376. /// }
  377. /// ) {
  378. /// return Text(
  379. /// '$currentLength of $maxLength characters',
  380. /// semanticsLabel: 'character count',
  381. /// );
  382. /// }
  383. /// ```
  384. /// {@end-tool}
  385. ///
  386. /// If buildCounter returns null, then no counter and no Semantics widget will
  387. /// be created at all.
  388. final InputCounterWidgetBuilder? buildCounter;
  389. /// {@macro flutter.widgets.editableText.scrollPhysics}
  390. final ScrollPhysics? scrollPhysics;
  391. /// {@macro flutter.widgets.editableText.scrollController}
  392. final ScrollController? scrollController;
  393. /// {@macro flutter.widgets.editableText.autofillHints}
  394. /// {@macro flutter.services.AutofillConfiguration.autofillHints}
  395. final Iterable<String>? autofillHints;
  396. /// {@macro flutter.material.Material.clipBehavior}
  397. ///
  398. /// Defaults to [Clip.hardEdge].
  399. final Clip clipBehavior;
  400. /// {@template flutter.material.textfield.restorationId}
  401. /// Restoration ID to save and restore the state of the text field.
  402. ///
  403. /// If non-null, the text field will persist and restore its current scroll
  404. /// offset and - if no [controller] has been provided - the content of the
  405. /// text field. If a [controller] has been provided, it is the responsibility
  406. /// of the owner of that controller to persist and restore it, e.g. by using
  407. /// a [RestorableTextEditingController].
  408. ///
  409. /// The state of this widget is persisted in a [RestorationBucket] claimed
  410. /// from the surrounding [RestorationScope] using the provided restoration ID.
  411. ///
  412. /// See also:
  413. ///
  414. /// * [RestorationManager], which explains how state restoration works in
  415. /// Flutter.
  416. /// {@endtemplate}
  417. final String? restorationId;
  418. /// {@macro flutter.widgets.editableText.scribbleEnabled}
  419. final bool scribbleEnabled;
  420. /// {@macro flutter.services.TextInputConfiguration.enableIMEPersonalizedLearning}
  421. final bool enableIMEPersonalizedLearning;
  422. /// {@macro flutter.widgets.editableText.contentInsertionConfiguration}
  423. final ContentInsertionConfiguration? contentInsertionConfiguration;
  424. /// {@macro flutter.widgets.EditableText.contextMenuBuilder}
  425. ///
  426. /// If not provided, will build a default menu based on the platform.
  427. ///
  428. /// See also:
  429. ///
  430. /// * [AdaptiveTextSelectionToolbar], which is built by default.
  431. final EditableTextContextMenuBuilder? contextMenuBuilder;
  432. /// Determine whether this text field can request the primary focus.
  433. ///
  434. /// Defaults to true. If false, the text field will not request focus
  435. /// when tapped, or when its context menu is displayed. If false it will not
  436. /// be possible to move the focus to the text field with tab key.
  437. final bool canRequestFocus;
  438. /// {@macro flutter.widgets.undoHistory.controller}
  439. final UndoHistoryController? undoController;
  440. /// {@macro flutter.widgets.EditableText.spellCheckConfiguration}
  441. ///
  442. /// If [SpellCheckConfiguration.misspelledTextStyle] is not specified in this
  443. /// configuration, then [materialMisspelledTextStyle] is used by default.
  444. final SpellCheckConfiguration? spellCheckConfiguration;
  445. @override
  446. State<PasswordTextField> createState() => _PasswordTextFieldState();
  447. }
  448. class _PasswordTextFieldState extends State<PasswordTextField> {
  449. late bool _obscure;
  450. @override
  451. void initState() {
  452. _obscure = widget.initialObscurity;
  453. super.initState();
  454. }
  455. @override
  456. Widget build(BuildContext context) {
  457. return TextField(
  458. obscureText: _obscure,
  459. decoration: widget.decoration.copyWith(
  460. suffixIconConstraints: const BoxConstraints(),
  461. suffixIcon: GestureDetector(
  462. child: Padding(
  463. padding: const EdgeInsets.only(top: 4,left: 12, right: 12),
  464. child: Image.asset(imgEyelash, width: 14,height: 14,),
  465. ) ,
  466. onTap: (){
  467. setState(() {
  468. _obscure = !_obscure;
  469. });
  470. },
  471. )
  472. // IconButton(
  473. // icon: Icon(
  474. // _obscure ? widget.inVisibleIcon : widget.visibleIcon,
  475. // size: 18, color: const Color(0xFFBBBBBB)
  476. // ),
  477. // onPressed: () {
  478. // setState(() {
  479. // _obscure = !_obscure;
  480. // });
  481. // },
  482. // ),
  483. ),
  484. controller: widget.controller,
  485. focusNode: widget.focusNode,
  486. undoController: widget.undoController,
  487. keyboardType: widget.keyboardType,
  488. textInputAction: widget.textInputAction,
  489. textCapitalization: widget.textCapitalization,
  490. style: widget.style,
  491. strutStyle: widget.strutStyle,
  492. textAlign: widget.textAlign,
  493. textAlignVertical: widget.textAlignVertical,
  494. textDirection: widget.textDirection,
  495. readOnly: widget.readOnly,
  496. showCursor: widget.showCursor,
  497. autofocus: widget.autofocus,
  498. obscuringCharacter: widget.obscuringCharacter,
  499. autocorrect: widget.autocorrect,
  500. enableSuggestions: widget.enableSuggestions,
  501. maxLines: widget.maxLines,
  502. minLines: widget.minLines,
  503. expands: widget.expands,
  504. maxLength: widget.maxLength,
  505. maxLengthEnforcement: widget.maxLengthEnforcement,
  506. onChanged: widget.onChanged,
  507. onEditingComplete: widget.onEditingComplete,
  508. onSubmitted: widget.onSubmitted,
  509. onAppPrivateCommand: widget.onAppPrivateCommand,
  510. inputFormatters: widget.inputFormatters,
  511. enabled: widget.enabled,
  512. cursorWidth: widget.cursorWidth,
  513. cursorHeight: widget.cursorHeight,
  514. cursorRadius: widget.cursorRadius,
  515. cursorOpacityAnimates: widget.cursorOpacityAnimates,
  516. cursorColor: widget.cursorColor,
  517. selectionHeightStyle: widget.selectionHeightStyle,
  518. selectionWidthStyle: widget.selectionWidthStyle,
  519. keyboardAppearance: widget.keyboardAppearance,
  520. scrollPadding: widget.scrollPadding,
  521. dragStartBehavior: widget.dragStartBehavior,
  522. enableInteractiveSelection: widget.enableInteractiveSelection,
  523. selectionControls: widget.selectionControls,
  524. onTap: widget.onTap,
  525. onTapOutside: widget.onTapOutside,
  526. mouseCursor: widget.mouseCursor,
  527. buildCounter: widget.buildCounter,
  528. scrollController: widget.scrollController,
  529. scrollPhysics: widget.scrollPhysics,
  530. autofillHints: widget.autofillHints,
  531. contentInsertionConfiguration: widget.contentInsertionConfiguration,
  532. clipBehavior: widget.clipBehavior,
  533. restorationId: widget.restorationId,
  534. scribbleEnabled: widget.scribbleEnabled,
  535. enableIMEPersonalizedLearning: widget.enableIMEPersonalizedLearning,
  536. contextMenuBuilder: widget.contextMenuBuilder,
  537. canRequestFocus: widget.canRequestFocus,
  538. spellCheckConfiguration: widget.spellCheckConfiguration,
  539. magnifierConfiguration: widget.magnifierConfiguration,
  540. );
  541. }
  542. }