Skip to content

Commit

Permalink
chore: ui test
Browse files Browse the repository at this point in the history
  • Loading branch information
evan361425 committed Sep 17, 2024
1 parent 94c053e commit f51a234
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 17 deletions.
32 changes: 16 additions & 16 deletions lib/ui/stock/quantities_page.dart
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ class QuantitiesPage extends StatelessWidget {
final body = ListenableBuilder(
key: const Key('quantities_page'),
listenable: Quantities.instance,
builder: (context, child) => _buildBody(context),
builder: (context, child) => Center(child: _buildBody(context)),
);

final withScaffold = MediaQuery.sizeOf(context).width <= Breakpoint.medium.max;
Expand All @@ -31,10 +31,7 @@ class QuantitiesPage extends StatelessWidget {
),
body: body,
)
: ConstrainedBox(
constraints: BoxConstraints(maxWidth: Breakpoint.medium.max),
child: body,
);
: body;
}

Widget _buildBody(BuildContext context) {
Expand All @@ -45,18 +42,21 @@ class QuantitiesPage extends StatelessWidget {
);
}

return StockQuantityList(
quantities: Quantities.instance.itemList,
leading: Row(children: [
Expanded(
child: RouteElevatedIconButton(
key: const Key('quantity.add'),
route: Routes.quantityCreate,
label: S.stockQuantityTitleCreate,
icon: const Icon(KIcons.add),
return ConstrainedBox(
constraints: BoxConstraints(maxWidth: Breakpoint.medium.max),
child: StockQuantityList(
quantities: Quantities.instance.itemList,
leading: Row(children: [
Expanded(
child: RouteElevatedIconButton(
key: const Key('quantity.add'),
route: Routes.quantityCreate,
label: S.stockQuantityTitleCreate,
icon: const Icon(KIcons.add),
),
),
),
]),
]),
),
);
}
}
3 changes: 2 additions & 1 deletion lib/ui/transit/transit_order_list.dart
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,7 @@ class TransitOrderList extends StatelessWidget {
actions: [
PopButton(title: MaterialLocalizations.of(context).okButtonLabel),
],
scrollable: true,
content: ConstrainedBox(
constraints: const BoxConstraints(maxWidth: 600),
child: Column(children: [
Expand Down Expand Up @@ -172,7 +173,7 @@ class TransitOrderList extends StatelessWidget {
),
const Divider(),
Padding(
padding: const EdgeInsets.all(8.0),
padding: const EdgeInsets.symmetric(horizontal: kHorizontalSpacing),
child: Linkify.fromString([
S.transitOrderCapacityContent,
if (warning != null) '\n$warning',
Expand Down

0 comments on commit f51a234

Please sign in to comment.