|
@@ -15,6 +15,7 @@ class FlowyFormTextInput extends StatelessWidget {
|
|
final String? hintText;
|
|
final String? hintText;
|
|
final EdgeInsets? contentPadding;
|
|
final EdgeInsets? contentPadding;
|
|
final TextStyle? textStyle;
|
|
final TextStyle? textStyle;
|
|
|
|
+ final TextAlign textAlign;
|
|
final int? maxLines;
|
|
final int? maxLines;
|
|
final TextEditingController? controller;
|
|
final TextEditingController? controller;
|
|
final TextCapitalization? capitalization;
|
|
final TextCapitalization? capitalization;
|
|
@@ -37,6 +38,7 @@ class FlowyFormTextInput extends StatelessWidget {
|
|
this.contentPadding,
|
|
this.contentPadding,
|
|
this.capitalization,
|
|
this.capitalization,
|
|
this.textStyle,
|
|
this.textStyle,
|
|
|
|
+ this.textAlign = TextAlign.center,
|
|
this.maxLines})
|
|
this.maxLines})
|
|
: super(key: key);
|
|
: super(key: key);
|
|
|
|
|
|
@@ -50,6 +52,7 @@ class FlowyFormTextInput extends StatelessWidget {
|
|
onChanged: onChanged,
|
|
onChanged: onChanged,
|
|
onFocusCreated: onFocusCreated,
|
|
onFocusCreated: onFocusCreated,
|
|
style: textStyle ?? Theme.of(context).textTheme.bodyMedium,
|
|
style: textStyle ?? Theme.of(context).textTheme.bodyMedium,
|
|
|
|
+ textAlign: textAlign,
|
|
onEditingComplete: onEditingComplete,
|
|
onEditingComplete: onEditingComplete,
|
|
onFocusChanged: onFocusChanged,
|
|
onFocusChanged: onFocusChanged,
|
|
controller: controller,
|
|
controller: controller,
|
|
@@ -69,6 +72,7 @@ class FlowyFormTextInput extends StatelessWidget {
|
|
class StyledSearchTextInput extends StatefulWidget {
|
|
class StyledSearchTextInput extends StatefulWidget {
|
|
final String? label;
|
|
final String? label;
|
|
final TextStyle? style;
|
|
final TextStyle? style;
|
|
|
|
+ final TextAlign textAlign;
|
|
final EdgeInsets? contentPadding;
|
|
final EdgeInsets? contentPadding;
|
|
final bool? autoFocus;
|
|
final bool? autoFocus;
|
|
final bool? obscureText;
|
|
final bool? obscureText;
|
|
@@ -103,6 +107,7 @@ class StyledSearchTextInput extends StatefulWidget {
|
|
this.autoFocus = false,
|
|
this.autoFocus = false,
|
|
this.obscureText = false,
|
|
this.obscureText = false,
|
|
this.type = TextInputType.text,
|
|
this.type = TextInputType.text,
|
|
|
|
+ this.textAlign = TextAlign.center,
|
|
this.icon,
|
|
this.icon,
|
|
this.initialValue = '',
|
|
this.initialValue = '',
|
|
this.controller,
|
|
this.controller,
|
|
@@ -201,6 +206,7 @@ class StyledSearchTextInputState extends State<StyledSearchTextInput> {
|
|
enabled: widget.enabled,
|
|
enabled: widget.enabled,
|
|
maxLines: widget.maxLines,
|
|
maxLines: widget.maxLines,
|
|
textCapitalization: widget.capitalization ?? TextCapitalization.none,
|
|
textCapitalization: widget.capitalization ?? TextCapitalization.none,
|
|
|
|
+ textAlign: widget.textAlign,
|
|
decoration: widget.inputDecoration ??
|
|
decoration: widget.inputDecoration ??
|
|
InputDecoration(
|
|
InputDecoration(
|
|
prefixIcon: widget.prefixIcon,
|
|
prefixIcon: widget.prefixIcon,
|