mirror of
https://github.com/lollipopkit/flutter_server_box.git
synced 2025-12-17 07:14:28 +01:00
#29 opt. for material 3
This commit is contained in:
@@ -1,22 +1,27 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:toolbox/view/widget/round_rect_card.dart';
|
||||
|
||||
Widget buildInput(BuildContext context, TextEditingController controller,
|
||||
{int maxLines = 20,
|
||||
String? hint,
|
||||
Function(String)? onSubmitted,
|
||||
bool? obscureText}) {
|
||||
Widget buildInput(
|
||||
BuildContext context,
|
||||
TextEditingController controller, {
|
||||
int maxLines = 20,
|
||||
String? hint,
|
||||
Function(String)? onSubmitted,
|
||||
bool obscureText = false,
|
||||
IconData? icon,
|
||||
}) {
|
||||
return RoundRectCard(
|
||||
TextField(
|
||||
maxLines: maxLines,
|
||||
onSubmitted: onSubmitted,
|
||||
decoration: InputDecoration(
|
||||
fillColor: Theme.of(context).cardColor,
|
||||
hintText: hint,
|
||||
filled: true,
|
||||
border: InputBorder.none),
|
||||
hintText: hint,
|
||||
icon: icon != null ? Icon(icon) : null,
|
||||
border: InputBorder.none,
|
||||
contentPadding: const EdgeInsets.symmetric(horizontal: 13, vertical: 7)
|
||||
),
|
||||
controller: controller,
|
||||
obscureText: obscureText ?? false,
|
||||
obscureText: obscureText,
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user