Skip to content

Commit

Permalink
whoops
Browse files Browse the repository at this point in the history
  • Loading branch information
Pante committed Nov 13, 2024
1 parent 2bf6ea7 commit a615069
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions forui/lib/src/widgets/tile/tile_content.dart
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@ class FTileContent extends StatelessWidget {

@override
Widget build(BuildContext context) {
final ltr = Directionality.maybeOf(context) == TextDirection.ltr;

final tile = FTileData.maybeOf(context)!;
final FTileData(style: tileStyle, :enabled, :hovered, :focused) = tile;

Expand All @@ -53,7 +55,9 @@ class FTileContent extends StatelessWidget {
children: [
if (prefixIcon case final prefixIcon?)
Padding(
padding: EdgeInsets.only(right: contentStyle.prefixIconSpacing),
padding: ltr
? EdgeInsets.only(right: contentStyle.prefixIconSpacing)
: EdgeInsets.only(left: contentStyle.prefixIconSpacing),
child: FIconStyleData(
style: style.prefixIconStyle,
child: prefixIcon,
Expand All @@ -62,7 +66,9 @@ class FTileContent extends StatelessWidget {
else
const SizedBox(),
Padding(
padding: EdgeInsets.only(right: contentStyle.middleSpacing),
padding: ltr
? EdgeInsets.only(right: contentStyle.middleSpacing)
: EdgeInsets.only(left: contentStyle.middleSpacing),
child: Column(
mainAxisSize: MainAxisSize.min,
mainAxisAlignment: MainAxisAlignment.center,
Expand Down Expand Up @@ -107,7 +113,9 @@ class FTileContent extends StatelessWidget {
const SizedBox(),
if (suffixIcon case final suffixIcon?)
Padding(
padding: EdgeInsets.only(left: contentStyle.suffixIconSpacing),
padding: ltr
? EdgeInsets.only(left: contentStyle.suffixIconSpacing)
: EdgeInsets.only(right: contentStyle.suffixIconSpacing),
child: FIconStyleData(
style: style.suffixIconStyle,
child: suffixIcon,
Expand Down

0 comments on commit a615069

Please sign in to comment.