add auth, format

This commit is contained in:
Phuoc Nguyen
2025-11-07 11:52:06 +07:00
parent 24a8508fce
commit 3803bd26e0
173 changed files with 8505 additions and 7116 deletions

View File

@@ -6,9 +6,9 @@ library;
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
import '../../core/utils/validators.dart';
import '../../core/utils/formatters.dart';
import '../../core/constants/ui_constants.dart';
import 'package:worker/core/constants/ui_constants.dart';
import 'package:worker/core/utils/formatters.dart';
import 'package:worker/core/utils/validators.dart';
/// Phone number input field with Vietnamese formatting
class VietnamesePhoneField extends StatefulWidget {
@@ -89,15 +89,15 @@ 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 Icon(Icons.phone),
suffixIcon: widget.suffixIcon,
border: OutlineInputBorder(
borderRadius: BorderRadius.circular(InputFieldSpecs.borderRadius),
),
contentPadding: InputFieldSpecs.contentPadding,
),
validator: widget.validator ??
validator:
widget.validator ??
(widget.required ? Validators.phone : Validators.phoneOptional),
onChanged: widget.onChanged,
onFieldSubmitted: widget.onSubmitted,