<commit_before>// Copyright 2016 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

import 'dart:async';
import 'dart:ui' show TextAffinity, hashValues;

import 'package:flutter/foundation.dart';

import 'message_codec.dart';
import 'system_channels.dart';
import 'text_editing.dart';

export 'dart:ui' show TextAffinity;

/// For which type of information to optimize the text input control.
enum TextInputType {
  /// Optimize for textual information.
  text,

  /// Optimize for numerical information.
  number,

  /// Optimize for telephone numbers.
  phone,

  /// Optimize for date and time information.
  datetime,
}

/// A action the user has requested the text input control to perform.
enum TextInputAction {
  /// Complete the text input operation.
  done,
}

/// Controls the visual appearance of the text input control.
///
/// See also:
///
///  * [TextInput.attach]
@immutable
class TextInputConfiguration {
  /// Creates configuration information for a text input control.
  ///
  /// The [inputType] argument must not be null.
  const TextInputConfiguration({
    this.inputType: TextInputType.text,
    this.actionLabel,
  });

  /// For which type of information to optimize the text input control.
  final TextInputType inputType;

  /// What text to display in the text input control's action button.
  final String actionLabel;

  /// Returns a representation of this object as a JSON object.<commit_msg>Minor improvements to TextInput docs (#9859)<commit_after>// Copyright 2016 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

import 'dart:async';
import 'dart:ui' show TextAffinity, hashValues;

import 'package:flutter/foundation.dart';

import 'message_codec.dart';
import 'system_channels.dart';
import 'text_editing.dart';

export 'dart:ui' show TextAffinity;

/// The type of information for which to optimize the text input control.
enum TextInputType {
  /// Optimize for textual information.
  text,

  /// Optimize for numerical information.
  number,

  /// Optimize for telephone numbers.
  phone,

  /// Optimize for date and time information.
  datetime,
}

/// An action the user has requested the text input control to perform.
enum TextInputAction {
  /// Complete the text input operation.
  done,
}

/// Controls the visual appearance of the text input control.
///
/// See also:
///
///  * [TextInput.attach]
@immutable
class TextInputConfiguration {
  /// Creates configuration information for a text input control.
  ///
  /// The [inputType] argument must not be null.
  const TextInputConfiguration({
    this.inputType: TextInputType.text,
    this.actionLabel,
  });

  /// The type of information for which to optimize the text input control.
  final TextInputType inputType;

  /// What text to display in the text input control's action button.
  final String actionLabel;

  /// Returns a representation of this object as a JSON object.
{'fraction_non_alphanumeric': 0.09364873622812703, 'fraction_numerical': 0.0038885288399222295, 'mean_word_length': 3.3725212464589234, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '819474', 'n_tokens_mistral': 864, 'n_tokens_neox': 828, 'n_words': 356}