TF-1581 Update UI to support language RTL

This commit is contained in:
dab246
2023-03-10 13:05:00 +07:00
committed by Dat Vu
parent 42bde0e415
commit 9af4924b9a
44 changed files with 821 additions and 392 deletions
@@ -2,6 +2,7 @@ import 'package:core/presentation/extensions/color_extension.dart';
import 'package:core/presentation/utils/responsive_utils.dart';
import 'package:core/utils/build_utils.dart';
import 'package:flutter/material.dart';
import 'package:tmail_ui_user/main/utils/app_utils.dart';
class SettingsUtils {
static double getHorizontalPadding(BuildContext context, ResponsiveUtils responsiveUtils) {
@@ -142,4 +143,20 @@ class SettingsUtils {
return EdgeInsets.zero;
}
}
static EdgeInsets getPaddingHeaderSetting(BuildContext context) {
if (AppUtils.isDirectionRTL(context)) {
return const EdgeInsets.only(top: 25, bottom: 25, right: 32);
} else {
return const EdgeInsets.only(top: 25, bottom: 25, left: 32);
}
}
static EdgeInsets getPaddingRightHeaderSetting(BuildContext context) {
if (AppUtils.isDirectionRTL(context)) {
return const EdgeInsets.only(right: 48, top: 16, bottom: 10, left: 10);
} else {
return const EdgeInsets.only(right: 10, top: 16, bottom: 10, left: 48);
}
}
}