feat : logout ui and logic
This commit is contained in:
@@ -1,5 +1,4 @@
|
||||
<svg width="40" height="40" viewBox="0 0 40 40" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M25.3992 37.1176H25.1825C17.7825 37.1176 14.2159 34.2009 13.5992 27.6676C13.5325 26.9843 14.0325 26.3676 14.7325 26.3009C15.3992 26.2343 16.0325 26.7509 16.0992 27.4343C16.5825 32.6676 19.0492 34.6176 25.1992 34.6176H25.4159C32.1992 34.6176 34.5992 32.2176 34.5992 25.4343V14.5676C34.5992 7.78428 32.1992 5.38428 25.4159 5.38428H25.1992C19.0159 5.38428 16.5492 7.36761 16.0992 12.7009C16.0159 13.3843 15.4325 13.9009 14.7325 13.8343C14.0325 13.7843 13.5325 13.1676 13.5825 12.4843C14.1492 5.85094 17.7325 2.88428 25.1825 2.88428H25.3992C33.5825 2.88428 37.0825 6.38428 37.0825 14.5676V25.4343C37.0825 33.6176 33.5825 37.1176 25.3992 37.1176Z" fill="#FFFFFF"/>
|
||||
<path d="M24.9999 21.25H6.0332C5.34987 21.25 4.7832 20.6833 4.7832 20C4.7832 19.3167 5.34987 18.75 6.0332 18.75H24.9999C25.6832 18.75 26.2499 19.3167 26.2499 20C26.2499 20.6833 25.6832 21.25 24.9999 21.25Z" fill="#FFFFFF"/>
|
||||
<path d="M9.75104 26.8329C9.43438 26.8329 9.11771 26.7162 8.86771 26.4662L3.28438 20.8829C2.80104 20.3996 2.80104 19.5996 3.28438 19.1162L8.86771 13.5329C9.35104 13.0496 10.151 13.0496 10.6344 13.5329C11.1177 14.0162 11.1177 14.8162 10.6344 15.2996L5.93438 19.9996L10.6344 24.6996C11.1177 25.1829 11.1177 25.9829 10.6344 26.4662C10.401 26.7162 10.0677 26.8329 9.75104 26.8329Z" fill="#FFFFFF"/>
|
||||
<path d="M28 3.33301H23.6667C18.3333 3.33301 15 6.66634 15 11.9997V18.7497H25.4167C26.1 18.7497 26.6667 19.3163 26.6667 19.9997C26.6667 20.683 26.1 21.2497 25.4167 21.2497H15V27.9997C15 33.333 18.3333 36.6663 23.6667 36.6663H27.9833C33.3167 36.6663 36.65 33.333 36.65 27.9997V11.9997C36.6667 6.66634 33.3333 3.33301 28 3.33301Z" fill="#2D5FFF"/>
|
||||
<path d="M7.60002 18.7501L11.05 15.3001C11.3 15.0501 11.4167 14.7334 11.4167 14.4167C11.4167 14.1001 11.3 13.7667 11.05 13.5334C10.5667 13.0501 9.76669 13.0501 9.28336 13.5334L3.70002 19.1167C3.21669 19.6001 3.21669 20.4001 3.70002 20.8834L9.28336 26.4667C9.76669 26.9501 10.5667 26.9501 11.05 26.4667C11.5334 25.9834 11.5334 25.1834 11.05 24.7001L7.60002 21.2501H15V18.7501H7.60002Z" fill="#2D5FFF"/>
|
||||
</svg>
|
||||
|
||||
|
Before Width: | Height: | Size: 1.4 KiB After Width: | Height: | Size: 851 B |
Binary file not shown.
@@ -1,4 +1,6 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:rasadyar_auth/data/models/local/user_local/user_local_model.dart';
|
||||
import 'package:rasadyar_auth/presentation/routes/pages.dart';
|
||||
import 'package:rasadyar_chicken/data/models/response/iran_province_city/iran_province_city_model.dart';
|
||||
import 'package:rasadyar_chicken/data/models/response/user_profile/user_profile.dart';
|
||||
import 'package:rasadyar_chicken/presentation/widget/list_row_item.dart';
|
||||
@@ -79,6 +81,15 @@ class ProfilePage extends GetView<ProfileLogic> {
|
||||
},
|
||||
icon: Assets.vec.lockSvg.path,
|
||||
),
|
||||
|
||||
cardActionWidget(
|
||||
title: 'خروج',
|
||||
selected: true,
|
||||
onPressed: () {
|
||||
Get.bottomSheet(exitBottomSheet(), isScrollControlled: true);
|
||||
},
|
||||
icon: Assets.vec.logoutSvg.path,
|
||||
),
|
||||
/*cardActionWidget(
|
||||
title: 'اطلاعات بانکی',
|
||||
onPressed: () {
|
||||
@@ -499,4 +510,55 @@ class ProfilePage extends GetView<ProfileLogic> {
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
Widget exitBottomSheet() {
|
||||
return BaseBottomSheet(
|
||||
height: 220.h,
|
||||
child: SingleChildScrollView(
|
||||
child: Form(
|
||||
key: controller.formKey,
|
||||
child: Column(
|
||||
spacing: 8,
|
||||
children: [
|
||||
Text('خروج', style: AppFonts.yekan16Bold.copyWith(color: AppColor.error)),
|
||||
SizedBox(),
|
||||
Text(
|
||||
'آیا مطمئن هستید که میخواهید از حساب کاربری خود خارج شوید؟',
|
||||
textAlign: TextAlign.center,
|
||||
style: AppFonts.yekan16Bold.copyWith(color: AppColor.textColor),
|
||||
),
|
||||
|
||||
SizedBox(),
|
||||
|
||||
Row(
|
||||
spacing: 16,
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
RElevated(
|
||||
height: 40.h,
|
||||
text: 'خروج',
|
||||
backgroundColor: AppColor.error,
|
||||
onPressed: () async {
|
||||
await controller.rootLogic.tokenService.deleteTokens().then((value) {
|
||||
Get.back();
|
||||
Get.offAllNamed(AuthPaths.auth, arguments: Module.chicken);
|
||||
});
|
||||
},
|
||||
),
|
||||
ROutlinedElevated(
|
||||
height: 40.h,
|
||||
text: 'انصراف',
|
||||
borderColor: AppColor.blueNormal,
|
||||
onPressed: () {
|
||||
Get.back();
|
||||
},
|
||||
),
|
||||
],
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user