BASE: Update Icons & Name Of The App.
This commit is contained in:
@@ -2,7 +2,7 @@ import 'package:easy_localization/easy_localization.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter/services.dart';
|
||||
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
||||
import 'package:get/get.dart';
|
||||
import 'package:get/get.dart' hide Trans;
|
||||
import '../controllers/theme_controller.dart';
|
||||
import 'app_them_data.dart';
|
||||
|
||||
@@ -77,20 +77,39 @@ class _TextFieldWidgetState extends State<TextFieldWidget> {
|
||||
final themeController = Get.find<ThemeController>();
|
||||
final isDark = themeController.isDark.value;
|
||||
|
||||
final borderColor = widget.borderColor ?? (_focusNode.hasFocus ? (isDark ? AppThemeData.greyDark400 : AppThemeData.grey400) : (isDark ? AppThemeData.greyDark200 : AppThemeData.grey200));
|
||||
final borderColor =
|
||||
widget.borderColor ??
|
||||
(_focusNode.hasFocus
|
||||
? (isDark ? AppThemeData.greyDark400 : AppThemeData.grey400)
|
||||
: (isDark ? AppThemeData.greyDark200 : AppThemeData.grey200));
|
||||
|
||||
final fillColor =
|
||||
widget.backgroundColor ?? (isDark ? (_focusNode.hasFocus ? AppThemeData.greyDark50 : AppThemeData.greyDark100) : (_focusNode.hasFocus ? AppThemeData.grey100 : Colors.transparent));
|
||||
widget.backgroundColor ??
|
||||
(isDark
|
||||
? (_focusNode.hasFocus
|
||||
? AppThemeData.greyDark50
|
||||
: AppThemeData.greyDark100)
|
||||
: (_focusNode.hasFocus
|
||||
? AppThemeData.grey100
|
||||
: Colors.transparent));
|
||||
|
||||
final textColor = isDark ? AppThemeData.greyDark900 : AppThemeData.grey900;
|
||||
|
||||
final hintColor = widget.hintColor ?? (isDark ? AppThemeData.grey400 : AppThemeData.greyDark400);
|
||||
final hintColor =
|
||||
widget.hintColor ??
|
||||
(isDark ? AppThemeData.grey400 : AppThemeData.greyDark400);
|
||||
|
||||
return Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
if (widget.title != null) ...[
|
||||
Text(widget.title!.tr(), style: AppThemeData.boldTextStyle(fontSize: 14, color: isDark ? AppThemeData.greyDark800 : AppThemeData.grey800)),
|
||||
Text(
|
||||
widget.title!.tr(),
|
||||
style: AppThemeData.boldTextStyle(
|
||||
fontSize: 14,
|
||||
color: isDark ? AppThemeData.greyDark800 : AppThemeData.grey800,
|
||||
),
|
||||
),
|
||||
const SizedBox(height: 5),
|
||||
],
|
||||
TextFormField(
|
||||
@@ -112,18 +131,46 @@ class _TextFieldWidgetState extends State<TextFieldWidget> {
|
||||
filled: true,
|
||||
enabled: widget.enable ?? true,
|
||||
fillColor: fillColor,
|
||||
contentPadding: EdgeInsets.symmetric(vertical: widget.title == null ? 15 : (widget.enable == false ? 13 : 8), horizontal: 10),
|
||||
contentPadding: EdgeInsets.symmetric(
|
||||
vertical:
|
||||
widget.title == null ? 15 : (widget.enable == false ? 13 : 8),
|
||||
horizontal: 10,
|
||||
),
|
||||
prefixIcon: widget.prefix,
|
||||
suffixIcon: widget.suffix,
|
||||
prefixIconConstraints: const BoxConstraints(minHeight: 20, minWidth: 20),
|
||||
suffixIconConstraints: const BoxConstraints(minHeight: 20, minWidth: 20),
|
||||
border: OutlineInputBorder(borderRadius: BorderRadius.circular(8), borderSide: BorderSide(color: borderColor)),
|
||||
enabledBorder: OutlineInputBorder(borderRadius: BorderRadius.circular(8), borderSide: BorderSide(color: borderColor)),
|
||||
focusedBorder: OutlineInputBorder(borderRadius: BorderRadius.circular(8), borderSide: BorderSide(color: borderColor, width: 1.2)),
|
||||
errorBorder: OutlineInputBorder(borderRadius: BorderRadius.circular(8), borderSide: const BorderSide(color: Colors.red)),
|
||||
disabledBorder: OutlineInputBorder(borderRadius: BorderRadius.circular(8), borderSide: BorderSide(color: borderColor)),
|
||||
prefixIconConstraints: const BoxConstraints(
|
||||
minHeight: 20,
|
||||
minWidth: 20,
|
||||
),
|
||||
suffixIconConstraints: const BoxConstraints(
|
||||
minHeight: 20,
|
||||
minWidth: 20,
|
||||
),
|
||||
border: OutlineInputBorder(
|
||||
borderRadius: BorderRadius.circular(8),
|
||||
borderSide: BorderSide(color: borderColor),
|
||||
),
|
||||
enabledBorder: OutlineInputBorder(
|
||||
borderRadius: BorderRadius.circular(8),
|
||||
borderSide: BorderSide(color: borderColor),
|
||||
),
|
||||
focusedBorder: OutlineInputBorder(
|
||||
borderRadius: BorderRadius.circular(8),
|
||||
borderSide: BorderSide(color: borderColor, width: 1.2),
|
||||
),
|
||||
errorBorder: OutlineInputBorder(
|
||||
borderRadius: BorderRadius.circular(8),
|
||||
borderSide: const BorderSide(color: Colors.red),
|
||||
),
|
||||
disabledBorder: OutlineInputBorder(
|
||||
borderRadius: BorderRadius.circular(8),
|
||||
borderSide: BorderSide(color: borderColor),
|
||||
),
|
||||
hintText: widget.hintText.tr(),
|
||||
hintStyle: AppThemeData.regularTextStyle(fontSize: 14.sp, color: hintColor),
|
||||
hintStyle: AppThemeData.regularTextStyle(
|
||||
fontSize: 14.sp,
|
||||
color: hintColor,
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
|
||||
Reference in New Issue
Block a user