-
Notifications
You must be signed in to change notification settings - Fork 84
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Support RTL mode for alignment mailbox view
- Loading branch information
Showing
14 changed files
with
198 additions
and
291 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
import 'package:core/presentation/extensions/color_extension.dart'; | ||
import 'package:core/presentation/resources/image_paths.dart'; | ||
import 'package:core/presentation/state/success.dart'; | ||
import 'package:core/presentation/utils/responsive_utils.dart'; | ||
import 'package:flutter/material.dart'; | ||
import 'package:get/get.dart'; | ||
import 'package:tmail_ui_user/features/base/mixin/app_loader_mixin.dart'; | ||
import 'package:tmail_ui_user/features/mailbox/presentation/mailbox_controller.dart'; | ||
import 'package:tmail_ui_user/features/mailbox/presentation/mixin/mailbox_widget_mixin.dart'; | ||
import 'package:tmail_ui_user/features/mailbox/presentation/widgets/user_information_widget_builder.dart'; | ||
import 'package:tmail_ui_user/main/localizations/app_localizations.dart'; | ||
|
||
abstract class BaseMailboxView extends GetWidget<MailboxController> | ||
with | ||
AppLoaderMixin, | ||
MailboxWidgetMixin { | ||
|
||
BaseMailboxView({Key? key}) : super(key: key); | ||
|
||
final responsiveUtils = Get.find<ResponsiveUtils>(); | ||
final imagePaths = Get.find<ImagePaths>(); | ||
|
||
Widget buildUserInformation(BuildContext context) { | ||
return Container( | ||
padding: const EdgeInsets.symmetric(vertical: 10), | ||
child: Column(children: [ | ||
Obx(() => UserInformationWidgetBuilder( | ||
imagePaths, | ||
controller.mailboxDashBoardController.userProfile.value, | ||
subtitle: AppLocalizations.of(context).manage_account, | ||
onSubtitleClick: controller.mailboxDashBoardController.goToSettings)), | ||
const Divider(color: AppColor.colorDividerMailbox, height: 0.5, thickness: 0.2) | ||
]), | ||
); | ||
} | ||
|
||
Widget buildLoadingView() { | ||
return Obx(() => controller.viewState.value.fold( | ||
(failure) => const SizedBox.shrink(), | ||
(success) => success is LoadingState | ||
? Padding(padding: const EdgeInsets.only(top: 16), child: loadingWidget) | ||
: const SizedBox.shrink())); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.