Browse Source

fix: profile page

pull/10/head
AmirrezaChegini 1 week ago
parent
commit
54516d3134
  1. 12
      lib/core/widgets/input/my_input.dart
  2. 13
      lib/features/profile/presentation/ui/profile_page.dart
  3. 12
      lib/features/profile/presentation/ui/widgets/profile_delete_account.dart
  4. 14
      lib/features/profile/presentation/ui/widgets/profile_logout.dart

12
lib/core/widgets/input/my_input.dart

@ -1,7 +1,7 @@
import 'package:flutter/material.dart';
import 'package:shia_game_flutter/common_ui/resources/my_spaces.dart';
import 'package:shia_game_flutter/common_ui/resources/my_text_style.dart';
import 'package:shia_game_flutter/common_ui/theme/my_theme.dart';
import 'package:shia_game_flutter/core/utils/screen_size.dart';
class MyInput extends StatelessWidget {
const MyInput({
@ -43,12 +43,12 @@ class MyInput extends StatelessWidget {
Widget build(BuildContext context) {
return Column(
crossAxisAlignment: CrossAxisAlignment.start,
spacing: MySpaces.s8,
spacing: 8,
children: [
if (labelText != null && labelText!.isNotEmpty)
Text(
labelText ?? '',
style: Lexend.bold.copyWith(fontSize: 12),
style: Lexend.bold.copyWith(fontSize: 12.sp),
),
TextFormField(
controller: controller,
@ -63,10 +63,10 @@ class MyInput extends StatelessWidget {
readOnly: readOnly ?? false,
maxLines: maxLines,
minLines: minLines,
style: Lexend.extraBold.copyWith(fontSize: 12),
style: Lexend.extraBold.copyWith(fontSize: 12.sp),
cursorColor: context.primaryColor,
decoration: InputDecoration(
contentPadding: const EdgeInsets.all(MySpaces.s14),
contentPadding: const EdgeInsets.all(14),
enabledBorder: const OutlineInputBorder(
borderRadius: BorderRadius.all(Radius.circular(12)),
borderSide: BorderSide(color: Color(0XFF5715BF), width: 1),
@ -78,7 +78,7 @@ class MyInput extends StatelessWidget {
fillColor: const Color(0XFF000000).withValues(alpha: 0.2),
filled: true,
hintText: hintText,
hintStyle: Lexend.extraBold.copyWith(fontSize: 12),
hintStyle: Lexend.extraBold.copyWith(fontSize: 12.sp),
),
onTapOutside: (event) {
FocusManager.instance.primaryFocus?.unfocus();

13
lib/features/profile/presentation/ui/profile_page.dart

@ -1,8 +1,8 @@
import 'package:flutter/material.dart';
import 'package:get/get.dart';
import 'package:shia_game_flutter/common_ui/resources/my_spaces.dart';
import 'package:shia_game_flutter/core/utils/gap.dart';
import 'package:shia_game_flutter/core/utils/my_localization.dart';
import 'package:shia_game_flutter/core/utils/screen_size.dart';
import 'package:shia_game_flutter/core/widgets/background/my_background.dart';
import 'package:shia_game_flutter/core/widgets/button/my_gradient_button.dart';
import 'package:shia_game_flutter/core/widgets/input/my_input.dart';
@ -20,14 +20,13 @@ class ProfilePage extends GetView<ProfileController> {
return MyBackground(
child: Column(
children: [
60.0.gapHeight,
const ProfileAvatar(),
_changeProfileBtn(context),
MySpaces.s40.gapHeight,
40.h.gapHeight,
_userNameInput(context),
MySpaces.s28.gapHeight,
28.h.gapHeight,
_locationInput(context),
200.0.gapHeight,
150.h.gapHeight,
_bottomButtons(),
],
),
@ -51,7 +50,7 @@ class ProfilePage extends GetView<ProfileController> {
Row _locationInput(BuildContext context) {
return Row(
crossAxisAlignment: CrossAxisAlignment.end,
spacing: MySpaces.s10,
spacing: 10,
children: [
Expanded(
child: MyInput(
@ -66,7 +65,7 @@ class ProfilePage extends GetView<ProfileController> {
Row _bottomButtons() {
return const Row(
spacing: MySpaces.s20,
spacing: 20,
children: [
Expanded(child: ProfileDeleteAccount()),
Expanded(child: ProfileLogout()),

12
lib/features/profile/presentation/ui/widgets/profile_delete_account.dart

@ -1,8 +1,8 @@
import 'package:flutter/material.dart';
import 'package:shia_game_flutter/common_ui/resources/my_spaces.dart';
import 'package:shia_game_flutter/common_ui/resources/my_text_style.dart';
import 'package:shia_game_flutter/common_ui/theme/my_theme.dart';
import 'package:shia_game_flutter/core/utils/my_localization.dart';
import 'package:shia_game_flutter/core/utils/screen_size.dart';
import 'package:shia_game_flutter/core/widgets/container/my_container.dart';
class ProfileDeleteAccount extends StatelessWidget {
@ -11,9 +11,9 @@ class ProfileDeleteAccount extends StatelessWidget {
@override
Widget build(BuildContext context) {
return MyContainer(
height: 58,
height: 58.h,
onTap: () {},
borderRadius: const BorderRadius.all(Radius.circular(MySpaces.s12)),
borderRadius: const BorderRadius.all(Radius.circular(12)),
color: context.backgroundColor,
borderGradient: LinearGradient(
begin: AlignmentDirectional.centerStart,
@ -24,14 +24,14 @@ class ProfileDeleteAccount extends StatelessWidget {
],
),
padding: const EdgeInsets.symmetric(
vertical: MySpaces.s16,
horizontal: MySpaces.s28,
vertical: 16,
horizontal: 28,
),
child: FittedBox(
child: Text(
context.translate.delete_account,
maxLines: 1,
style: Lexend.semiBold.copyWith(fontSize: 14, color: const Color(0XFF5F5F88)),
style: Lexend.semiBold.copyWith(fontSize: 14.sp, color: const Color(0XFF5F5F88)),
),
),
);

14
lib/features/profile/presentation/ui/widgets/profile_logout.dart

@ -1,8 +1,8 @@
import 'package:flutter/material.dart';
import 'package:shia_game_flutter/common_ui/resources/my_assets.dart';
import 'package:shia_game_flutter/common_ui/resources/my_spaces.dart';
import 'package:shia_game_flutter/common_ui/resources/my_text_style.dart';
import 'package:shia_game_flutter/core/utils/my_localization.dart';
import 'package:shia_game_flutter/core/utils/screen_size.dart';
import 'package:shia_game_flutter/core/widgets/container/my_container.dart';
import 'package:shia_game_flutter/core/widgets/image/my_image.dart';
@ -12,23 +12,23 @@ class ProfileLogout extends StatelessWidget {
@override
Widget build(BuildContext context) {
return MyContainer(
height: 58,
height: 58.h,
onTap: () {},
borderRadius: const BorderRadius.all(Radius.circular(MySpaces.s12)),
borderRadius: const BorderRadius.all(Radius.circular(12)),
color: const Color(0XFF270A59),
padding: const EdgeInsets.symmetric(
vertical: MySpaces.s16,
horizontal: MySpaces.s28,
vertical: 16,
horizontal: 28,
),
child: Row(
spacing: MySpaces.s10,
spacing: 10,
mainAxisAlignment: MainAxisAlignment.center,
children: [
const MyImage(asset: MyAssets.iconLogout),
FittedBox(
child: Text(
context.translate.logout,
style: Lexend.semiBold.copyWith(fontSize: 14),
style: Lexend.semiBold.copyWith(fontSize: 14.sp),
),
),
],

Loading…
Cancel
Save