Merge pull request #26 from Iconica-Development/feature/text_capitalization

feat: Added the parameter for textcapitalization for plain text and m…
This commit is contained in:
Freek van de Ven 2023-12-14 16:32:59 +01:00 committed by GitHub
commit 6ae18d09bb
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 11 additions and 2 deletions

View file

@ -50,4 +50,7 @@
* Addition of `formatInputs` parameter to `FlutterFormInputPassword` widget. * Addition of `formatInputs` parameter to `FlutterFormInputPassword` widget.
## 2.5.2 ## 2.5.2
* Addition of `style` parameter to `FlutterFormInputPassword` widget. * Addition of `style` parameter to `FlutterFormInputPassword` widget.
## 2.6.0
* Addition of the `textCapitalization` parameter to `FlutterFormInputPlainText` and `FlutterFormInputMultiLine`.

View file

@ -25,6 +25,7 @@ class FlutterFormInputPlainText extends StatelessWidget {
this.style, this.style,
this.formatInputs, this.formatInputs,
this.enabled = true, this.enabled = true,
this.textCapitalization = TextCapitalization.none,
}) : super( }) : super(
key: key, key: key,
); );
@ -46,6 +47,7 @@ class FlutterFormInputPlainText extends StatelessWidget {
final TextStyle? style; final TextStyle? style;
final List<TextInputFormatter>? formatInputs; final List<TextInputFormatter>? formatInputs;
final bool enabled; final bool enabled;
final TextCapitalization textCapitalization;
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
@ -71,6 +73,7 @@ class FlutterFormInputPlainText extends StatelessWidget {
maxLength: maxLength, maxLength: maxLength,
keyboardType: keyboardType, keyboardType: keyboardType,
enabled: enabled, enabled: enabled,
textCapitalization: textCapitalization,
); );
} }
} }
@ -91,6 +94,7 @@ class FlutterFormInputMultiLine extends StatelessWidget {
this.onSaved, this.onSaved,
this.validator, this.validator,
this.onFieldSubmitted, this.onFieldSubmitted,
this.textCapitalization = TextCapitalization.sentences,
}) : super(key: key); }) : super(key: key);
final Widget? label; final Widget? label;
@ -107,6 +111,7 @@ class FlutterFormInputMultiLine extends StatelessWidget {
final String? Function(String?)? validator; final String? Function(String?)? validator;
final Function(String?)? onChanged; final Function(String?)? onChanged;
final Function(String?)? onFieldSubmitted; final Function(String?)? onFieldSubmitted;
final TextCapitalization textCapitalization;
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
@ -141,6 +146,7 @@ class FlutterFormInputMultiLine extends StatelessWidget {
filled: true, filled: true,
), ),
enabled: enabled, enabled: enabled,
textCapitalization: textCapitalization,
), ),
), ),
], ],

View file

@ -1,6 +1,6 @@
name: flutter_input_library name: flutter_input_library
description: A new Flutter package project. description: A new Flutter package project.
version: 2.5.2 version: 2.6.0
repository: https://github.com/Iconica-Development/flutter_input_library repository: https://github.com/Iconica-Development/flutter_input_library
environment: environment: