fix(ui): adjust ShopinBit travel form on desktop and mobile
What changed, and why it matters
This commit is a purely cosmetic user-interface tweak for a travel booking form inside the Stack Wallet app. It rounds the corners of text boxes, increases spacing between fields, and changes one placeholder label from an example to 'Destination city.' There is no security relevance.
No security action needed; treat as a normal UI/layout fix.
Security signals we found
No strong security signals were identified.
Evidence from the diff
The diff wraps a Flutter TextField in a ClipRRect with a circular border radius and adjusts vertical SizedBox spacing constants from 16/12 to 24/16 depending on desktop vs mobile. It also updates a hintText string. No logic, validation, input handling, network, or cryptographic code is modified.
Changed components
lib/pages/shopinbit/step_4_components/shopinbit_step4_text_field.dartlib/pages/shopinbit/step_4_components/shopinbit_travel_form.dartInspect captured patch +43 / −39
diff --git a/lib/pages/shopinbit/step_4_components/shopinbit_step4_text_field.dart b/lib/pages/shopinbit/step_4_components/shopinbit_step4_text_field.dart
index 7cdc97a..e43cf43 100644
--- a/lib/pages/shopinbit/step_4_components/shopinbit_step4_text_field.dart
+++ b/lib/pages/shopinbit/step_4_components/shopinbit_step4_text_field.dart
@@ -2,6 +2,7 @@ import "package:flutter/material.dart";
import "package:flutter/services.dart";
import "../../../themes/stack_colors.dart";
+import "../../../utilities/constants.dart";
import "../../../utilities/text_styles.dart";
import "../../../utilities/util.dart";
import "../../../widgets/stack_text_field.dart";
@@ -53,37 +54,40 @@ class ShopInBitStep4TextField extends StatelessWidget {
)
: STextStyles.field(context);
- return TextField(
- controller: controller,
- focusNode: focusNode,
- autocorrect: false,
- enableSuggestions: false,
- enabled: enabled,
- readOnly: readOnly,
- onTap: onTap,
- minLines: minLines,
- maxLines: maxLines,
- keyboardType: keyboardType,
- inputFormatters: inputFormatters,
- onChanged: onChanged,
- style: style,
- decoration:
- standardInputDecoration(
- hintText,
- focusNode,
- context,
- desktopMed: Util.isDesktop,
- ).copyWith(
- filled: true,
- contentPadding: const EdgeInsets.symmetric(
- horizontal: 16,
- vertical: 12,
+ return ClipRRect(
+ borderRadius: BorderRadius.circular(Constants.size.circularBorderRadius),
+ child: TextField(
+ controller: controller,
+ focusNode: focusNode,
+ autocorrect: false,
+ enableSuggestions: false,
+ enabled: enabled,
+ readOnly: readOnly,
+ onTap: onTap,
+ minLines: minLines,
+ maxLines: maxLines,
+ keyboardType: keyboardType,
+ inputFormatters: inputFormatters,
+ onChanged: onChanged,
+ style: style,
+ decoration:
+ standardInputDecoration(
+ hintText,
+ focusNode,
+ context,
+ desktopMed: Util.isDesktop,
+ ).copyWith(
+ filled: true,
+ contentPadding: const EdgeInsets.symmetric(
+ horizontal: 16,
+ vertical: 12,
+ ),
+ errorText: errorText,
+ suffixText: suffixText,
+ suffixIcon: suffixIcon,
+ labelText: labelText,
),
- errorText: errorText,
- suffixText: suffixText,
- suffixIcon: suffixIcon,
- labelText: labelText,
- ),
+ ),
);
}
}
diff --git a/lib/pages/shopinbit/step_4_components/shopinbit_travel_form.dart b/lib/pages/shopinbit/step_4_components/shopinbit_travel_form.dart
index a1e505f..16db676 100644
--- a/lib/pages/shopinbit/step_4_components/shopinbit_travel_form.dart
+++ b/lib/pages/shopinbit/step_4_components/shopinbit_travel_form.dart
@@ -353,7 +353,7 @@ class _ShopInBitTravelFormState extends ConsumerState<ShopInBitTravelForm> {
hintText: "Arrangement type",
onChanged: (value) => setState(() => _selectedArrangement = value),
),
- SizedBox(height: isDesktop ? 16 : 12),
+ SizedBox(height: isDesktop ? 24 : 16),
ShopInBitStep4TextField(
controller: _arrangementDetailsController,
focusNode: _arrangementDetailsFocusNode,
@@ -375,7 +375,7 @@ class _ShopInBitTravelFormState extends ConsumerState<ShopInBitTravelForm> {
setState(() => _selectedDepartureCountryIso = iso),
hintText: "Departure country",
),
- SizedBox(height: isDesktop ? 16 : 12),
+ SizedBox(height: isDesktop ? 24 : 16),
ShopInBitStep4TextField(
controller: _departureCityController,
focusNode: _departureCityFocusNode,
@@ -383,11 +383,11 @@ class _ShopInBitTravelFormState extends ConsumerState<ShopInBitTravelForm> {
errorText: departureCityError,
onChanged: (_) => setState(() {}),
),
- SizedBox(height: isDesktop ? 16 : 12),
+ SizedBox(height: isDesktop ? 24 : 16),
ShopInBitStep4TextField(
controller: _destinationsController,
focusNode: _destinationsFocusNode,
- hintText: "e.g. Paris, France; Rome, Italy",
+ hintText: "Destination city",
enabled: !_needsRecommendations,
errorText: destinationsError,
onChanged: (_) => setState(() {}),
@@ -408,7 +408,7 @@ class _ShopInBitTravelFormState extends ConsumerState<ShopInBitTravelForm> {
hintText: "Date mode",
onChanged: (value) => setState(() => _selectedDateMode = value),
),
- SizedBox(height: isDesktop ? 16 : 12),
+ SizedBox(height: isDesktop ? 24 : 16),
if (_selectedDateMode == _exactDates) ...[
ShopInBitStep4TextField(
@@ -424,7 +424,7 @@ class _ShopInBitTravelFormState extends ConsumerState<ShopInBitTravelForm> {
suffixIcon: const Icon(Icons.calendar_today, size: 18),
errorText: departureDateError,
),
- SizedBox(height: isDesktop ? 16 : 12),
+ SizedBox(height: isDesktop ? 24 : 16),
ShopInBitStep4TextField(
controller: _returnDateController,
focusNode: _returnDateFocusNode,
@@ -438,7 +438,7 @@ class _ShopInBitTravelFormState extends ConsumerState<ShopInBitTravelForm> {
suffixIcon: const Icon(Icons.calendar_today, size: 18),
errorText: returnDateError,
),
- SizedBox(height: isDesktop ? 16 : 12),
+ SizedBox(height: isDesktop ? 24 : 16),
ShopInBitStep4Dropdown(
value: _selectedFlexibility,
items: _flexibilities,
@@ -454,14 +454,14 @@ class _ShopInBitTravelFormState extends ConsumerState<ShopInBitTravelForm> {
hintText: "Year",
onChanged: (value) => setState(() => _selectedYear = value),
),
- SizedBox(height: isDesktop ? 16 : 12),
+ SizedBox(height: isDesktop ? 24 : 16),
ShopInBitStep4Dropdown(
value: _selectedMonthSeason,
items: _months,
hintText: "Month or season",
onChanged: (value) => setState(() => _selectedMonthSeason = value),
),
- SizedBox(height: isDesktop ? 16 : 12),
+ SizedBox(height: isDesktop ? 24 : 16),
ShopInBitStep4TextField(
controller: _tripLengthController,
focusNode: _tripLengthFocusNode,
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.