shadow and text color

This commit is contained in:
mohammad
2024-10-27 12:36:32 +03:00
parent 2941565b3d
commit b7dddcb8dd
10 changed files with 255 additions and 154 deletions

View File

@ -81,7 +81,10 @@ class DateTimeWebWidget extends StatelessWidget {
const SizedBox(
width: 30,
),
const Icon(Icons.arrow_right_alt),
const Icon(
Icons.arrow_right_alt,
color: ColorsManager.grayColor,
),
const SizedBox(
width: 30,
),

View File

@ -1,5 +1,6 @@
import 'package:flutter/material.dart';
import 'package:syncrow_web/utils/extension/build_context_x.dart';
import 'package:syncrow_web/utils/style.dart';
class StatefulTextField extends StatefulWidget {
const StatefulTextField(
@ -25,13 +26,15 @@ class StatefulTextField extends StatefulWidget {
class _StatefulTextFieldState extends State<StatefulTextField> {
@override
Widget build(BuildContext context) {
return CustomTextField(
title: widget.title,
controller: widget.controller,
hintText: widget.hintText,
width: widget.width,
elevation: widget.elevation,
onSubmittedFun: widget.onSubmitted);
return Container(
child: CustomTextField(
title: widget.title,
controller: widget.controller,
hintText: widget.hintText,
width: widget.width,
elevation: widget.elevation,
onSubmittedFun: widget.onSubmitted),
);
}
}
@ -73,17 +76,20 @@ class CustomTextField extends StatelessWidget {
child: Container(
width: width,
height: 45,
decoration: BoxDecoration(
color: Colors.white,
borderRadius: BorderRadius.circular(8),
),
decoration: containerDecoration,
// decoration: BoxDecoration(
// color: Colors.white,
// borderRadius: BorderRadius.circular(8),
// ),
child: TextFormField(
controller: controller,
style: const TextStyle(color: Colors.black),
decoration: InputDecoration(
hintText: hintText,
hintStyle: const TextStyle(fontSize: 12),
contentPadding: const EdgeInsets.symmetric(horizontal: 12, vertical: 10),
contentPadding:
const EdgeInsets.symmetric(horizontal: 12, vertical: 10),
border: InputBorder.none,
),
onFieldSubmitted: (_) {

View File

@ -39,11 +39,17 @@ class CustomWebTextField extends StatelessWidget {
if (isRequired)
Text(
'* ',
style: Theme.of(context).textTheme.bodyMedium!.copyWith(color: Colors.red),
style: Theme.of(context)
.textTheme
.bodyMedium!
.copyWith(color: Colors.red),
),
Text(
textFieldName,
style: Theme.of(context).textTheme.bodySmall!.copyWith(color: Colors.black, fontSize: 13),
style: Theme.of(context)
.textTheme
.bodySmall!
.copyWith(color: Colors.black, fontSize: 13),
),
],
),
@ -53,10 +59,10 @@ class CustomWebTextField extends StatelessWidget {
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),
),
),
],
@ -66,21 +72,15 @@ class CustomWebTextField extends StatelessWidget {
),
Container(
height: height ?? 35,
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
),
]),
decoration: containerDecoration,
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,
),