Skip to content

Commit

Permalink
fix(track_tile): track action popup not showing on narrow screens
Browse files Browse the repository at this point in the history
  • Loading branch information
KRTirtho committed Feb 6, 2023
1 parent 0e43504 commit 0c54f2d
Showing 1 changed file with 6 additions and 37 deletions.
43 changes: 6 additions & 37 deletions lib/components/shared/adaptive/adaptive_popup_menu_button.dart
Original file line number Diff line number Diff line change
Expand Up @@ -35,43 +35,12 @@ class Action extends StatelessWidget {
),
);
}
if (backgroundColor == null) {
return PlatformTextButton(
style: TextButton.styleFrom(
foregroundColor:
backgroundColor ?? PlatformTextTheme.of(context).body?.color,
backgroundColor: backgroundColor,
padding: const EdgeInsets.all(20),
),
onPressed: onPressed,
child: Row(
children: [
icon,
const SizedBox(width: 10),
text,
],
),
);
}

return Padding(
padding: const EdgeInsets.all(8.0),
child: PlatformFilledButton(
style: TextButton.styleFrom(
foregroundColor:
backgroundColor ?? PlatformTextTheme.of(context).body?.color,
backgroundColor: backgroundColor,
padding: const EdgeInsets.all(20),
),
onPressed: onPressed,
child: Row(
children: [
icon,
const SizedBox(width: 10),
text,
],
),
),
return PlatformListTile(
tileColor: backgroundColor,
onTap: onPressed,
leading: icon,
title: text,
);
}
}
Expand Down Expand Up @@ -103,7 +72,7 @@ class AdaptiveActions extends HookWidget {
children: actions
.map(
(action) => SizedBox(
width: 250,
width: 200,
child: Row(
children: [
Expanded(child: action),
Expand Down

0 comments on commit 0c54f2d

Please sign in to comment.