new & opt.

opt.: input field auto focus
opt.: snippet page top padding
new: setting of editor font size
This commit is contained in:
lollipopkit
2023-08-21 13:54:09 +08:00
parent 6a2191ff92
commit e3f2b211a9
16 changed files with 106 additions and 43 deletions

View File

@@ -18,6 +18,7 @@ class Input extends StatelessWidget {
final bool suggestiion;
final String? errorText;
final Widget? prefix;
final bool autoFocus;
const Input({
super.key,
@@ -36,6 +37,7 @@ class Input extends StatelessWidget {
this.suggestiion = false,
this.errorText,
this.prefix,
this.autoFocus = false,
});
@override
Widget build(BuildContext context) {
@@ -49,6 +51,7 @@ class Input extends StatelessWidget {
onChanged: onChanged,
keyboardType: type,
focusNode: node,
autofocus: autoFocus,
autocorrect: autoCorrect,
enableSuggestions: suggestiion,
decoration: InputDecoration(
@@ -57,7 +60,7 @@ class Input extends StatelessWidget {
icon: icon != null ? Icon(icon) : null,
border: InputBorder.none,
errorText: errorText,
prefix: prefix),
prefix: prefix,),
controller: controller,
obscureText: obscureText,
),