fix(ui): shopinbit ticket detail review offer options styling
What changed, and why it matters
This commit is a purely cosmetic user-interface tweak. It changes how a 'Review offer' button and product text are arranged on the screen depending on whether the app is running on desktop or mobile. There is no security relevance.
No security action needed; treat as a normal UI fix.
Security signals we found
No strong security signals were identified.
Evidence from the diff
The diff modifies lib/pages/shopinbit/shopinbit_ticket_detail.dart to wrap an existing Column in a ConditionalParent widget. On desktop, the offer text and button are laid out horizontally in a Row with a fixed button width/height; on mobile, the original vertical Column layout is preserved with minor spacing adjustments. No logic, navigation arguments, data handling, or security-sensitive code is changed.
Changed components
lib/pages/shopinbit/shopinbit_ticket_detail.dartInspect captured patch +50 / −28
diff --git a/lib/pages/shopinbit/shopinbit_ticket_detail.dart b/lib/pages/shopinbit/shopinbit_ticket_detail.dart
index 6251f62..fa374fe 100644
--- a/lib/pages/shopinbit/shopinbit_ticket_detail.dart
+++ b/lib/pages/shopinbit/shopinbit_ticket_detail.dart
@@ -396,34 +396,56 @@ class _ShopInBitTicketDetailState extends ConsumerState<ShopInBitTicketDetail> {
context,
).extension<StackColors>()!.textFieldDefaultBG
: null,
- child: Column(
- crossAxisAlignment: CrossAxisAlignment.start,
- children: [
- Text(
- "Offer available",
- style: isDesktop
- ? STextStyles.desktopTextSmall(context)
- : STextStyles.titleBold12(context),
- ),
- const SizedBox(height: 4),
- Text(
- "${model.offerProductName ?? 'Item'} \u2014 "
- "${model.offerPrice ?? '0'} EUR",
- style: isDesktop
- ? STextStyles.desktopTextExtraExtraSmall(context)
- : STextStyles.itemSubtitle12(context),
- ),
- SizedBox(height: isDesktop ? 12 : 8),
- PrimaryButton(
- label: "Review offer",
- onPressed: () {
- Navigator.of(context).pushNamed(
- ShopInBitOfferView.routeName,
- arguments: model,
- );
- },
- ),
- ],
+ child: ConditionalParent(
+ condition: Util.isDesktop,
+ builder: (child) => Row(
+ children: [
+ Expanded(child: child),
+ PrimaryButton(
+ label: "Review offer",
+ width: 220,
+ buttonHeight: ButtonHeight.l,
+ onPressed: () {
+ Navigator.of(context).pushNamed(
+ ShopInBitOfferView.routeName,
+ arguments: model,
+ );
+ },
+ ),
+ ],
+ ),
+ child: Column(
+ crossAxisAlignment: .start,
+ mainAxisSize: .min,
+ children: [
+ Text(
+ "Offer available",
+ style: isDesktop
+ ? STextStyles.desktopTextSmall(context)
+ : STextStyles.titleBold12(context),
+ ),
+ const SizedBox(height: 4),
+ Text(
+ "${model.offerProductName ?? 'Item'} \u2014 "
+ "${model.offerPrice ?? '0'} EUR",
+ style: isDesktop
+ ? STextStyles.desktopTextExtraExtraSmall(context)
+ : STextStyles.itemSubtitle12(context),
+ ),
+ if (!Util.isDesktop) const SizedBox(height: 12),
+ if (!Util.isDesktop)
+ PrimaryButton(
+ label: "Review offer",
+ buttonHeight: Util.isDesktop ? ButtonHeight.l : null,
+ onPressed: () {
+ Navigator.of(context).pushNamed(
+ ShopInBitOfferView.routeName,
+ arguments: model,
+ );
+ },
+ ),
+ ],
+ ),
),
),
)
Why this scored 15/100
Community notes
Notes can correct, qualify, or add evidence to the AI analysis. Every note shown here has been validated by a human moderator.
The AI analysis stands alone for now. Submit a note if you can add evidence or important context.