mirror of
https://github.com/SyncrowIOT/web.git
synced 2025-07-16 01:56:24 +00:00
push scroll bar and design enhancment
This commit is contained in:
@ -13,6 +13,7 @@ class CustomWebTextField extends StatelessWidget {
|
||||
this.validator,
|
||||
this.hintText,
|
||||
this.height,
|
||||
this.onSubmitted,
|
||||
});
|
||||
|
||||
final bool isRequired;
|
||||
@ -22,6 +23,7 @@ class CustomWebTextField extends StatelessWidget {
|
||||
final String? Function(String?)? validator;
|
||||
final String? hintText;
|
||||
final double? height;
|
||||
final ValueChanged<String>? onSubmitted;
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
@ -32,33 +34,29 @@ class CustomWebTextField extends StatelessWidget {
|
||||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
|
||||
Row(
|
||||
children: [
|
||||
if (isRequired)
|
||||
Text('* ',
|
||||
style: Theme.of(context)
|
||||
.textTheme.bodyMedium!
|
||||
.copyWith(color: Colors.red),
|
||||
),
|
||||
Row(
|
||||
children: [
|
||||
if (isRequired)
|
||||
Text(
|
||||
textFieldName,
|
||||
style: Theme.of(context)
|
||||
.textTheme.bodySmall!
|
||||
.copyWith(color: Colors.black, fontSize: 13),
|
||||
'* ',
|
||||
style: Theme.of(context).textTheme.bodyMedium!.copyWith(color: Colors.red),
|
||||
),
|
||||
],
|
||||
),
|
||||
Text(
|
||||
textFieldName,
|
||||
style: Theme.of(context).textTheme.bodySmall!.copyWith(color: Colors.black, fontSize: 13),
|
||||
),
|
||||
],
|
||||
),
|
||||
const SizedBox(
|
||||
width: 10,
|
||||
),
|
||||
Expanded(
|
||||
child: Text(
|
||||
description ?? '',
|
||||
style: Theme.of(context).textTheme.bodySmall!.copyWith(
|
||||
fontSize: 9,
|
||||
fontWeight: FontWeight.w400,
|
||||
color: ColorsManager.textGray),
|
||||
style: Theme.of(context)
|
||||
.textTheme
|
||||
.bodySmall!
|
||||
.copyWith(fontSize: 9, fontWeight: FontWeight.w400, color: ColorsManager.textGray),
|
||||
),
|
||||
),
|
||||
],
|
||||
@ -68,26 +66,23 @@ class CustomWebTextField extends StatelessWidget {
|
||||
),
|
||||
Container(
|
||||
height: height ?? 35,
|
||||
decoration: containerDecoration.copyWith(
|
||||
color: const Color(0xFFF5F6F7),
|
||||
boxShadow: [
|
||||
decoration: containerDecoration.copyWith(color: const Color(0xFFF5F6F7), boxShadow: [
|
||||
BoxShadow(
|
||||
color: Colors.grey.withOpacity(0.3),
|
||||
spreadRadius: 2,
|
||||
blurRadius: 3,
|
||||
offset: const Offset(1, 1), // changes position of shadow
|
||||
),
|
||||
]
|
||||
),
|
||||
]),
|
||||
child: TextFormField(
|
||||
validator: validator,
|
||||
controller: controller,
|
||||
style: const TextStyle(color: Colors.black),
|
||||
decoration: textBoxDecoration()!.copyWith(
|
||||
errorStyle: const TextStyle(height: 0),
|
||||
hintStyle: context.textTheme.titleSmall!
|
||||
.copyWith(color: Colors.grey, fontSize: 12),
|
||||
hintStyle: context.textTheme.titleSmall!.copyWith(color: Colors.grey, fontSize: 12),
|
||||
hintText: hintText ?? 'Please enter'),
|
||||
onFieldSubmitted: onSubmitted,
|
||||
),
|
||||
),
|
||||
],
|
||||
|
Reference in New Issue
Block a user