Skip to content

Commit

Permalink
Support RTL mode for alignment composer
Browse files Browse the repository at this point in the history
  • Loading branch information
dab246 committed Jun 14, 2023
1 parent 1f33f6d commit cdcdf4d
Show file tree
Hide file tree
Showing 12 changed files with 1,225 additions and 1,461 deletions.
6 changes: 1 addition & 5 deletions core/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ dependencies:

pointer_interceptor: 0.9.1

flutter_keyboard_visibility: 5.4.0
flutter_keyboard_visibility: 5.4.1

flex_color_picker: 3.2.0

Expand Down Expand Up @@ -85,10 +85,6 @@ dev_dependencies:
# For information on the generic Dart part of this file, see the
# following page: https://dart.dev/tools/pub/pubspec

dependency_overrides:

flutter_keyboard_visibility: 5.4.1

flutter:
# The following line ensures that the Material Icons font is
# included with your application, so that you can use the icons in
Expand Down
10 changes: 2 additions & 8 deletions lib/features/base/widget/compose_floating_button.dart
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ import 'package:flutter/material.dart';
import 'package:flutter_svg/flutter_svg.dart';
import 'package:tmail_ui_user/main/localizations/app_localizations.dart';
import 'package:tmail_ui_user/main/routes/route_navigation.dart';
import 'package:tmail_ui_user/main/utils/app_utils.dart';

class ComposeFloatingButton extends StatelessWidget {

Expand All @@ -25,9 +24,7 @@ class ComposeFloatingButton extends StatelessWidget {
final imagePaths = getBinding<ImagePaths>();

return Align(
alignment: AppUtils.isDirectionRTL(context)
? Alignment.bottomLeft
: Alignment.bottomRight,
alignment: AlignmentDirectional.bottomEnd,
child: ScrollingFloatingButtonAnimated(
icon: SvgPicture.asset(
imagePaths!.icComposeWeb,
Expand All @@ -36,10 +33,7 @@ class ComposeFloatingButton extends StatelessWidget {
fit: BoxFit.fill
),
text: Padding(
padding: EdgeInsets.only(
right: AppUtils.isDirectionRTL(context) ? 0 : 16,
left: AppUtils.isDirectionRTL(context) ? 16 : 0,
),
padding: const EdgeInsetsDirectional.only(end: 16),
child: Text(AppLocalizations.of(context).compose,
overflow: CommonTextStyle.defaultTextOverFlow,
softWrap: CommonTextStyle.defaultSoftWrap,
Expand Down
Loading

0 comments on commit cdcdf4d

Please sign in to comment.