diff --git a/CHANGELOG.md b/CHANGELOG.md index 61b1416..c22d512 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,10 @@ +## 1.2.1 + +* fix returnKeyType and onSubmitted usage + ## 1.2.0 -* add supoort of cursorColor, returnKeyType and textCapitalization +* add support of cursorColor, returnKeyType and textCapitalization ## 1.1.1 diff --git a/README.md b/README.md index 8dbc3e0..885cfe8 100644 --- a/README.md +++ b/README.md @@ -25,7 +25,7 @@ Hope you find it useful and happy coding! 🎉🎉🎉 |:----------------|:--------------|:-------------------------------|:-------------------------| | `controller` | TextEditingController | Controlling the text being edited (https://api.flutter.dev/flutter/material/TextField/controller.html) | null | | `cursorColor` | Color | The color of the cursor (https://api.flutter.dev/flutter/material/TextField/cursorColor.html) | null | -| `decoration` | BoxDecoration | Controls the BoxDecoration of the box behind the text input. (https://api.flutter.dev/flutter/cupertino/CupertinoTextField/decoration.html) | null | +| `decoration` | BoxDecoration | Controls the BoxDecoration of the box behind the text input (https://api.flutter.dev/flutter/cupertino/CupertinoTextField/decoration.html) | null | | `focusNode` | FocusNode | Defines the keyboard focus for this widget (https://api.flutter.dev/flutter/material/TextField/focusNode.html) | null | | `keyboardAppearance` | Brightness | The appearance of the keyboard (https://api.flutter.dev/flutter/material/TextField/keyboardAppearance.html) | null | | `keyboardType` | KeyboardType | Type of keyboard to display for a given text-based view (https://developer.apple.com/documentation/uikit/uikeyboardtype) | KeyboardType.defaultType | @@ -33,6 +33,7 @@ Hope you find it useful and happy coding! 🎉🎉🎉 | `minLines` | int | Minimum number of lines of text input widget | 1 | | `placeholder` | String | Placeholder text when text entry is empty (https://api.flutter.dev/flutter/cupertino/CupertinoTextField/placeholder.html) | null | | `placeholderStyle`| TextStyle | The style to use for the placeholder text. [Only `fontSize`, `fontWeight`, `color` are supported] (https://api.flutter.dev/flutter/cupertino/CupertinoTextField/placeholderStyle.html) | null | +| `returnKeyType` | ReturnKeyType | Constants that specify the text string that displays in the Return key of a keyboard (https://developer.apple.com/documentation/uikit/uireturnkeytype) | ReturnKeyType.defaultAction | | `style` | TextStyle | The style to use for the text being edited [Only `fontSize`, `fontWeight`, `color` are supported] (https://api.flutter.dev/flutter/material/TextField/style.html) | null | | `textAlign` | TextAlign | How the text should be aligned horizontally (https://api.flutter.dev/flutter/material/TextField/textAlign.html) | TextAlign.start | | `textCapitalization` | TextCapitalization | Configures how the platform keyboard will select an uppercase or lowercase keyboard (https://api.flutter.dev/flutter/material/TextField/textCapitalization.html) | TextCapitalization.none | diff --git a/example/ios/Podfile.lock b/example/ios/Podfile.lock index 84bb6be..c92a29b 100644 --- a/example/ios/Podfile.lock +++ b/example/ios/Podfile.lock @@ -1,6 +1,6 @@ PODS: - Flutter (1.0.0) - - flutter_native_text_input (1.2.0): + - flutter_native_text_input (1.2.1): - Flutter DEPENDENCIES: @@ -19,4 +19,4 @@ SPEC CHECKSUMS: PODFILE CHECKSUM: 8e679eca47255a8ca8067c4c67aab20e64cb974d -COCOAPODS: 1.10.1 +COCOAPODS: 1.11.2 diff --git a/ios/flutter_native_text_input.podspec b/ios/flutter_native_text_input.podspec index 614dd47..82c553e 100644 --- a/ios/flutter_native_text_input.podspec +++ b/ios/flutter_native_text_input.podspec @@ -3,7 +3,7 @@ # Pod::Spec.new do |s| s.name = 'flutter_native_text_input' - s.version = '1.2.0' + s.version = '1.2.1' s.summary = 'Native text input for Flutter' s.description = <<-DESC Native text input for Flutter diff --git a/lib/flutter_native_text_input.dart b/lib/flutter_native_text_input.dart index 2572915..7e1206a 100644 --- a/lib/flutter_native_text_input.dart +++ b/lib/flutter_native_text_input.dart @@ -106,41 +106,105 @@ class NativeTextInput extends StatefulWidget { this.onSubmitted, }) : super(key: key); - /// Controls the text being edited. - /// - /// If null, this widget will create its own [TextEditingController]. + /// Controlling the text being edited + /// (https://api.flutter.dev/flutter/material/TextField/controller.html) + /// + /// Default: null, this widget will create its own [TextEditingController]. final TextEditingController? controller; + /// The color of the cursor + /// (https://api.flutter.dev/flutter/material/TextField/cursorColor.html) + /// + /// Default: null final Color? cursorColor; + /// Controls the BoxDecoration of the box behind the text input + /// (https://api.flutter.dev/flutter/cupertino/CupertinoTextField/decoration.html) + /// + /// Default: null final BoxDecoration? decoration; + /// Defines the keyboard focus for this widget + /// (https://api.flutter.dev/flutter/material/TextField/focusNode.html) + /// + /// Default: null final FocusNode? focusNode; + /// The appearance of the keyboard + /// (https://api.flutter.dev/flutter/material/TextField/keyboardAppearance.html) + /// + /// Default: null final Brightness? keyboardAppearance; + /// Type of keyboard to display for a given text-based view + /// (https://developer.apple.com/documentation/uikit/uikeyboardtype) + /// + /// Default: KeyboardType.defaultType final KeyboardType keyboardType; + /// The maximum number of lines to show at one time, wrapping if necessary + /// (https://api.flutter.dev/flutter/material/TextField/maxLines.html) + /// + /// Default: 1 final int maxLines; + /// Minimum number of lines of text input widget + /// + /// Default: 1 final int minLines; - final ReturnKeyType returnKeyType; - + /// Placeholder text when text entry is empty + /// (https://api.flutter.dev/flutter/cupertino/CupertinoTextField/placeholder.html) + /// + /// Default: null final String? placeholder; + /// The style to use for the placeholder text. [Only `fontSize`, `fontWeight`, `color` are supported] + /// (https://api.flutter.dev/flutter/cupertino/CupertinoTextField/placeholderStyle.html) + /// + /// Default: null final TextStyle? placeholderStyle; + /// Constants that specify the text string that displays in the Return key of a keyboard + /// (https://developer.apple.com/documentation/uikit/uireturnkeytype) + /// + /// Default: ReturnKeyType.defaultAction + final ReturnKeyType returnKeyType; + + /// The style to use for the text being edited [Only `fontSize`, `fontWeight`, `color` are supported] + /// (https://api.flutter.dev/flutter/material/TextField/style.html) + /// + /// Default: null final TextStyle? style; + /// How the text should be aligned horizontally + /// (https://api.flutter.dev/flutter/material/TextField/textAlign.html) + /// + /// Default: TextAlign.start final TextAlign textAlign; + /// Configures how the platform keyboard will select an uppercase or lowercase keyboard + /// (https://api.flutter.dev/flutter/material/TextField/textCapitalization.html) + /// + /// Default: TextCapitalization.none final TextCapitalization textCapitalization; + /// To identify the semantic meaning expected for a text-entry area + /// (https://developer.apple.com/documentation/uikit/uitextcontenttype) + /// + /// Default: null final TextContentType? textContentType; + /// Called when the user initiates a change to text entry + /// (https://api.flutter.dev/flutter/material/TextField/onChanged.html) + /// + /// Default: null final ValueChanged? onChanged; + /// Called when the user indicates that they are done editing the text in the field + /// (https://api.flutter.dev/flutter/material/TextField/onSubmitted.html) + /// + /// Default: null final ValueChanged? onSubmitted; @override diff --git a/pubspec.yaml b/pubspec.yaml index f9753f5..8c44034 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,7 +1,7 @@ name: flutter_native_text_input description: Native text input for Flutter. Currently iOS-only with the use of UITextView. -version: 1.2.0 +version: 1.2.1 homepage: https://github.com/henryleunghk/flutter-native-text-input environment: