update icon
This commit is contained in:
@@ -4,6 +4,7 @@
|
||||
library;
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:font_awesome_flutter/font_awesome_flutter.dart';
|
||||
import '../../core/constants/ui_constants.dart';
|
||||
|
||||
/// Custom app bar with consistent styling
|
||||
@@ -112,7 +113,7 @@ class SearchAppBar extends StatelessWidget implements PreferredSizeWidget {
|
||||
leading:
|
||||
leading ??
|
||||
IconButton(
|
||||
icon: const Icon(Icons.arrow_back),
|
||||
icon: const FaIcon(FontAwesomeIcons.arrowLeft, size: 20),
|
||||
onPressed: () => Navigator.of(context).pop(),
|
||||
),
|
||||
title: TextField(
|
||||
@@ -127,7 +128,7 @@ class SearchAppBar extends StatelessWidget implements PreferredSizeWidget {
|
||||
border: InputBorder.none,
|
||||
suffixIcon: controller?.text.isNotEmpty ?? false
|
||||
? IconButton(
|
||||
icon: const Icon(Icons.clear, color: Colors.white),
|
||||
icon: const FaIcon(FontAwesomeIcons.xmark, color: Colors.white, size: 18),
|
||||
onPressed: () {
|
||||
controller?.clear();
|
||||
onClear?.call();
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
library;
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:font_awesome_flutter/font_awesome_flutter.dart';
|
||||
import '../../core/utils/formatters.dart';
|
||||
import '../../core/utils/validators.dart';
|
||||
import '../../core/constants/ui_constants.dart';
|
||||
@@ -118,7 +119,7 @@ class _DatePickerFieldState extends State<DatePickerField> {
|
||||
InputDecoration(
|
||||
labelText: widget.labelText ?? 'Ngày',
|
||||
hintText: widget.hintText ?? 'dd/MM/yyyy',
|
||||
prefixIcon: widget.prefixIcon ?? const Icon(Icons.calendar_today),
|
||||
prefixIcon: widget.prefixIcon ?? const FaIcon(FontAwesomeIcons.calendar, size: 20),
|
||||
suffixIcon: widget.suffixIcon,
|
||||
border: OutlineInputBorder(
|
||||
borderRadius: BorderRadius.circular(InputFieldSpecs.borderRadius),
|
||||
@@ -219,7 +220,7 @@ class _DateRangePickerFieldState extends State<DateRangePickerField> {
|
||||
decoration: InputDecoration(
|
||||
labelText: widget.labelText ?? 'Khoảng thời gian',
|
||||
hintText: widget.hintText ?? 'Chọn khoảng thời gian',
|
||||
prefixIcon: widget.prefixIcon ?? const Icon(Icons.date_range),
|
||||
prefixIcon: widget.prefixIcon ?? const FaIcon(FontAwesomeIcons.calendarDays, size: 20),
|
||||
border: OutlineInputBorder(
|
||||
borderRadius: BorderRadius.circular(InputFieldSpecs.borderRadius),
|
||||
),
|
||||
@@ -266,7 +267,7 @@ class DateOfBirthField extends StatelessWidget {
|
||||
onDateSelected: onDateSelected,
|
||||
validator: validator ?? (value) => Validators.age(value, minAge: minAge),
|
||||
enabled: enabled,
|
||||
prefixIcon: const Icon(Icons.cake),
|
||||
prefixIcon: const FaIcon(FontAwesomeIcons.cakeCandles, size: 20),
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -364,7 +365,7 @@ class _TimePickerFieldState extends State<TimePickerField> {
|
||||
decoration: InputDecoration(
|
||||
labelText: widget.labelText ?? 'Thời gian',
|
||||
hintText: widget.hintText ?? 'HH:mm',
|
||||
prefixIcon: widget.prefixIcon ?? const Icon(Icons.access_time),
|
||||
prefixIcon: widget.prefixIcon ?? const FaIcon(FontAwesomeIcons.clock, size: 20),
|
||||
border: OutlineInputBorder(
|
||||
borderRadius: BorderRadius.circular(InputFieldSpecs.borderRadius),
|
||||
),
|
||||
|
||||
@@ -6,6 +6,7 @@ library;
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter/services.dart';
|
||||
import 'package:font_awesome_flutter/font_awesome_flutter.dart';
|
||||
import 'package:worker/core/constants/ui_constants.dart';
|
||||
import 'package:worker/core/utils/formatters.dart';
|
||||
import 'package:worker/core/utils/validators.dart';
|
||||
@@ -89,7 +90,7 @@ class _VietnamesePhoneFieldState extends State<VietnamesePhoneField> {
|
||||
decoration: InputDecoration(
|
||||
labelText: widget.labelText ?? 'Số điện thoại',
|
||||
hintText: widget.hintText ?? '0xxx xxx xxx',
|
||||
prefixIcon: widget.prefixIcon ?? const Icon(Icons.phone),
|
||||
prefixIcon: widget.prefixIcon ?? const FaIcon(FontAwesomeIcons.phone, size: 20),
|
||||
suffixIcon: widget.suffixIcon,
|
||||
border: OutlineInputBorder(
|
||||
borderRadius: BorderRadius.circular(InputFieldSpecs.borderRadius),
|
||||
@@ -158,8 +159,8 @@ class PhoneDisplayField extends StatelessWidget {
|
||||
onTap: onTap,
|
||||
decoration: InputDecoration(
|
||||
labelText: labelText ?? 'Số điện thoại',
|
||||
prefixIcon: prefixIcon ?? const Icon(Icons.phone),
|
||||
suffixIcon: onTap != null ? const Icon(Icons.edit) : null,
|
||||
prefixIcon: prefixIcon ?? const FaIcon(FontAwesomeIcons.phone, size: 20),
|
||||
suffixIcon: onTap != null ? const FaIcon(FontAwesomeIcons.penToSquare, size: 18) : null,
|
||||
border: OutlineInputBorder(
|
||||
borderRadius: BorderRadius.circular(InputFieldSpecs.borderRadius),
|
||||
),
|
||||
|
||||
Reference in New Issue
Block a user