Skip to content

Commit

Permalink
Merge pull request #268 from karimkod/removing_generics_from_configur…
Browse files Browse the repository at this point in the history
…ation

Removed unecessary generic type from TextFieldConfiguration
  • Loading branch information
sjmcdowall committed Jan 6, 2021
2 parents 5291129 + c50996e commit bdeaedb
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion lib/cupertino_flutter_typeahead.dart
Original file line number Diff line number Diff line change
Expand Up @@ -1142,7 +1142,7 @@ class CupertinoSuggestionsBoxDecoration {
/// Supply an instance of this class to the [TypeAhead.textFieldConfiguration]
/// property to configure the displayed text field. See [documentation](https://docs.flutter.io/flutter/cupertino/CupertinoTextField-class.html)
/// for more information on properties.
class CupertinoTextFieldConfiguration<T> {
class CupertinoTextFieldConfiguration {
final TextEditingController controller;
final FocusNode focusNode;
final BoxDecoration decoration;
Expand Down
10 changes: 5 additions & 5 deletions lib/flutter_typeahead.dart
Original file line number Diff line number Diff line change
Expand Up @@ -1322,7 +1322,7 @@ class SuggestionsBoxDecoration {

/// Supply an instance of this class to the [TypeAhead.textFieldConfiguration]
/// property to configure the displayed text field
class TextFieldConfiguration<T> {
class TextFieldConfiguration {
/// The decoration to show around the text field.
///
/// Same as [TextField.decoration](https://docs.flutter.io/flutter/material/TextField/decoration.html)
Expand Down Expand Up @@ -1431,13 +1431,13 @@ class TextFieldConfiguration<T> {
/// Called when the text being edited changes.
///
/// Same as [TextField.onChanged](https://docs.flutter.io/flutter/material/TextField/onChanged.html)
final ValueChanged<T> onChanged;
final ValueChanged<String> onChanged;

/// Called when the user indicates that they are done editing the text in the
/// field.
///
/// Same as [TextField.onSubmitted](https://docs.flutter.io/flutter/material/TextField/onSubmitted.html)
final ValueChanged<T> onSubmitted;
final ValueChanged<String> onSubmitted;

/// The color to use when painting the cursor.
///
Expand Down Expand Up @@ -1525,8 +1525,8 @@ class TextFieldConfiguration<T> {
{InputDecoration decoration,
TextStyle style,
TextEditingController controller,
ValueChanged<T> onChanged,
ValueChanged<T> onSubmitted,
ValueChanged<String> onChanged,
ValueChanged<String> onSubmitted,
bool obscureText,
bool maxLengthEnforced,
int maxLength,
Expand Down

0 comments on commit bdeaedb

Please sign in to comment.