Login and Register translation font
This commit is contained in:
parent
9f75e090fd
commit
1787488987
@ -15,12 +15,12 @@ import 'package:uae_stat/presentation/components/indicators/locale_provider.dart
|
||||
import '../../components/my_toggle.dart';
|
||||
import '../../routes/auth_routes/login_route.dart';
|
||||
|
||||
class RegisterScreen extends StatefulWidget {
|
||||
class RegisterScreen extends ConsumerStatefulWidget {
|
||||
@override
|
||||
_RegisterScreenState createState() => _RegisterScreenState();
|
||||
}
|
||||
|
||||
class _RegisterScreenState extends State<RegisterScreen> {
|
||||
class _RegisterScreenState extends ConsumerState<RegisterScreen> {
|
||||
final _formKey = GlobalKey<FormState>();
|
||||
final _usernameController = TextEditingController();
|
||||
final _emailController = TextEditingController();
|
||||
@ -311,6 +311,7 @@ class _RegisterScreenState extends State<RegisterScreen> {
|
||||
Widget build(BuildContext context) {
|
||||
double screenheight = MediaQuery.of(context).size.height;
|
||||
double screenwidth = MediaQuery.of(context).size.width;
|
||||
final registerLocale = ref.watch(localeProvider);
|
||||
|
||||
Widget buildIconContainer(IconData icon, Color iconColor) {
|
||||
return Container(
|
||||
@ -432,7 +433,7 @@ class _RegisterScreenState extends State<RegisterScreen> {
|
||||
'آسف ${_usernameController.text}!'),
|
||||
textAlign: TextAlign.center,
|
||||
style: TextStyle(
|
||||
fontSize: 16,
|
||||
fontSize: registerLocale?.languageCode == 'ar' ? 14 : 16,
|
||||
fontWeight: FontWeight.w500,
|
||||
color: Color(0xFF414042)),
|
||||
),
|
||||
@ -443,7 +444,7 @@ class _RegisterScreenState extends State<RegisterScreen> {
|
||||
'فشلت عملية التسجيل الخاصة بك. لمزيد من المساعدة، يرجى الاتصال بالدعم.'),
|
||||
textAlign: TextAlign.center,
|
||||
style: TextStyle(
|
||||
fontSize: 14,
|
||||
fontSize: registerLocale?.languageCode == 'ar' ? 12 : 14,
|
||||
color: Color(0xFF898C81),
|
||||
),
|
||||
),
|
||||
@ -491,7 +492,7 @@ class _RegisterScreenState extends State<RegisterScreen> {
|
||||
// 'Register',
|
||||
AppLocalizations.of(context)!.register_title,
|
||||
style: TextStyle(
|
||||
fontSize: 32, fontWeight: FontWeight.w400),
|
||||
fontSize: registerLocale?.languageCode == 'ar' ? 30 : 32, fontWeight: FontWeight.w400),
|
||||
),
|
||||
SizedBox(height: 10),
|
||||
Text(AppLocalizations.of(context)!.register_details),
|
||||
@ -562,7 +563,9 @@ class _RegisterScreenState extends State<RegisterScreen> {
|
||||
width: 1), // Match the error color
|
||||
),
|
||||
counterText: '',
|
||||
hintStyle: TextStyle(color: Color(0xFFC3C6CB)),
|
||||
hintStyle: TextStyle(color: Color(0xFFC3C6CB),
|
||||
fontSize: registerLocale?.languageCode == 'ar' ? 14 : 16,
|
||||
),
|
||||
),
|
||||
validator: _validateUsername,
|
||||
maxLength:
|
||||
@ -632,7 +635,9 @@ class _RegisterScreenState extends State<RegisterScreen> {
|
||||
width: 1), // Match the error color
|
||||
),
|
||||
counterText: '',
|
||||
hintStyle: TextStyle(color: Color(0xFFC3C6CB)),
|
||||
hintStyle: TextStyle(color: Color(0xFFC3C6CB),
|
||||
fontSize: registerLocale?.languageCode == 'ar' ? 14 : 16,
|
||||
),
|
||||
),
|
||||
validator: _validateEmail,
|
||||
maxLength: 320,
|
||||
@ -735,7 +740,9 @@ class _RegisterScreenState extends State<RegisterScreen> {
|
||||
),
|
||||
|
||||
counterText: '',
|
||||
hintStyle: TextStyle(color: Color(0xFFC3C6CB)),
|
||||
hintStyle: TextStyle(color: Color(0xFFC3C6CB),
|
||||
fontSize: registerLocale?.languageCode == 'ar' ? 14 : 16,
|
||||
),
|
||||
),
|
||||
validator: _validatePassword,
|
||||
maxLength: 40,
|
||||
@ -824,7 +831,9 @@ class _RegisterScreenState extends State<RegisterScreen> {
|
||||
width: 1), // Match the error color
|
||||
),
|
||||
counterText: '',
|
||||
hintStyle: TextStyle(color: Color(0xFFC3C6CB)),
|
||||
hintStyle: TextStyle(color: Color(0xFFC3C6CB),
|
||||
fontSize: registerLocale?.languageCode == 'ar' ? 14 : 16,
|
||||
),
|
||||
),
|
||||
validator: _validateConfirmPassword,
|
||||
maxLength: 40,
|
||||
@ -868,6 +877,7 @@ class _RegisterScreenState extends State<RegisterScreen> {
|
||||
.terms_conditions,
|
||||
// text: 'Terms & Conditions',
|
||||
style: TextStyle(
|
||||
fontSize: registerLocale?.languageCode == 'ar' ? 12 : 14,
|
||||
fontWeight: FontWeight.bold,
|
||||
color: Color(0xFF985400),
|
||||
// Makes the text bold
|
||||
@ -884,7 +894,7 @@ class _RegisterScreenState extends State<RegisterScreen> {
|
||||
.privacy_policy,
|
||||
style: TextStyle(
|
||||
fontWeight: FontWeight.bold,
|
||||
fontSize: 14,
|
||||
fontSize: registerLocale?.languageCode == 'ar' ? 12 : 14,
|
||||
fontFamily: 'Roboto',
|
||||
color: Color(0xFF985400),
|
||||
decoration:
|
||||
@ -912,7 +922,7 @@ class _RegisterScreenState extends State<RegisterScreen> {
|
||||
'Required',
|
||||
style: TextStyle(
|
||||
color: Color(0xFFb22222),
|
||||
fontSize: 12,
|
||||
fontSize: registerLocale?.languageCode == 'ar' ? 12 : 14,
|
||||
),
|
||||
),
|
||||
),
|
||||
@ -941,7 +951,8 @@ class _RegisterScreenState extends State<RegisterScreen> {
|
||||
AppLocalizations.of(context)!
|
||||
.register_title,
|
||||
style: TextStyle(
|
||||
fontSize: 16, color: Colors.white),
|
||||
fontSize: registerLocale?.languageCode == 'ar' ? 14 : 16,
|
||||
color: Colors.white),
|
||||
),
|
||||
SizedBox(width: 8),
|
||||
const Icon(
|
||||
@ -958,7 +969,8 @@ class _RegisterScreenState extends State<RegisterScreen> {
|
||||
Text(
|
||||
AppLocalizations.of(context)!.account_confirmation,
|
||||
style: TextStyle(
|
||||
fontSize: 14, color: Colors.grey[600]),
|
||||
fontSize: registerLocale?.languageCode == 'ar' ? 12 : 14,
|
||||
color: Colors.grey[600]),
|
||||
),
|
||||
SizedBox(height: 15),
|
||||
Padding(
|
||||
|
||||
@ -145,7 +145,7 @@ class LoginRoute extends HookConsumerWidget {
|
||||
'إعادة تعيين كلمة المرور',
|
||||
),
|
||||
style: TextStyle(
|
||||
fontSize: 20,
|
||||
fontSize: locale?.languageCode == 'ar' ? 18 : 20,
|
||||
color: Color(0xFF898C81),
|
||||
fontWeight: FontWeight.w600),
|
||||
),
|
||||
@ -160,7 +160,7 @@ class LoginRoute extends HookConsumerWidget {
|
||||
'عنوان البريد الإلكتروني',
|
||||
),
|
||||
labelStyle: TextStyle(
|
||||
fontSize: 16,
|
||||
fontSize: locale?.languageCode == 'ar' ? 13 : 16,
|
||||
color: Color(0xFF898C81), // For label text color
|
||||
// fontWeight: FontWeight.w600,
|
||||
),
|
||||
@ -254,10 +254,10 @@ class LoginRoute extends HookConsumerWidget {
|
||||
style: TextStyle(
|
||||
fontFamily: context.translate(
|
||||
'Roboto',
|
||||
'NotoKufi',
|
||||
'Roboto',
|
||||
),
|
||||
fontWeight: FontWeight.bold,
|
||||
fontSize: 14,
|
||||
fontSize: locale?.languageCode == 'ar' ? 12 : 14,
|
||||
color: Color(0xFF985400),
|
||||
),
|
||||
),
|
||||
@ -418,9 +418,9 @@ class LoginRoute extends HookConsumerWidget {
|
||||
TextStyle(
|
||||
fontFamily: context.translate(
|
||||
'Roboto',
|
||||
'NotoKufi',
|
||||
'Roboto',
|
||||
),
|
||||
fontSize: 16,
|
||||
fontSize: locale?.languageCode == 'ar' ? 14 : 16,
|
||||
fontWeight: FontWeight.w600,
|
||||
),
|
||||
),
|
||||
@ -442,6 +442,14 @@ class LoginRoute extends HookConsumerWidget {
|
||||
'Login',
|
||||
'تسجيل الدخول',
|
||||
),
|
||||
style: TextStyle(
|
||||
fontFamily: context.translate(
|
||||
'Roboto',
|
||||
'Roboto',
|
||||
),
|
||||
fontSize: locale?.languageCode == 'ar' ? 16: 18,
|
||||
fontWeight: FontWeight.bold,
|
||||
)
|
||||
),
|
||||
6.horizontalSpace,
|
||||
const Icon(
|
||||
@ -511,9 +519,9 @@ class LoginRoute extends HookConsumerWidget {
|
||||
style: TextStyle(
|
||||
fontFamily: context.translate(
|
||||
'Roboto',
|
||||
'NotoKufi',
|
||||
'Roboto',
|
||||
),
|
||||
fontSize: 40,
|
||||
fontSize: locale?.languageCode == 'ar' ? 38 : 40,
|
||||
fontWeight: FontWeight.w300,
|
||||
),
|
||||
),
|
||||
@ -527,7 +535,7 @@ class LoginRoute extends HookConsumerWidget {
|
||||
style: TextStyle(
|
||||
fontFamily: context.translate(
|
||||
'Roboto',
|
||||
'NotoKufi',
|
||||
'Roboto',
|
||||
),
|
||||
fontSize: context.translate(18.0, 14.0),
|
||||
color: const Color(0xff898C81),
|
||||
@ -544,9 +552,9 @@ class LoginRoute extends HookConsumerWidget {
|
||||
style: TextStyle(
|
||||
fontFamily: context.translate(
|
||||
'Roboto',
|
||||
'NotoKufi',
|
||||
'Roboto',
|
||||
),
|
||||
fontSize: 14,
|
||||
fontSize: locale?.languageCode == 'ar' ? 12 : 14,
|
||||
fontWeight: FontWeight.bold,
|
||||
),
|
||||
children: [
|
||||
|
||||
Loading…
Reference in New Issue
Block a user