Skip to content

Commit

Permalink
fix: The wrong theme is used for the Edit Product Page title (#3805)
Browse files Browse the repository at this point in the history
  • Loading branch information
g123k committed Mar 27, 2023
1 parent 0d48729 commit 475d228
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions packages/smooth_app/lib/pages/product/edit_product_page.dart
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ import 'package:smooth_app/pages/product/ocr_packaging_helper.dart';
import 'package:smooth_app/pages/product/product_image_gallery_view.dart';
import 'package:smooth_app/pages/product/simple_input_page.dart';
import 'package:smooth_app/pages/product/simple_input_page_helpers.dart';
import 'package:smooth_app/widgets/smooth_app_bar.dart';
import 'package:smooth_app/widgets/smooth_scaffold.dart';

/// Page where we can indirectly edit all data about a product.
Expand Down Expand Up @@ -66,19 +67,19 @@ class _EditProductPageState extends State<EditProductPage> {
final ThemeData theme = Theme.of(context);

return SmoothScaffold(
appBar: AppBar(
appBar: SmoothAppBar(
centerTitle: false,
leading: const SmoothBackButton(),
title: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
AutoSizeText(
getProductName(_product, appLocalizations),
minFontSize: (theme.primaryTextTheme.titleLarge?.fontSize
?.clamp(13.0, 17.0)) ??
13.0,
minFontSize:
(theme.textTheme.titleLarge?.fontSize?.clamp(13.0, 17.0)) ??
13.0,
maxLines: !_barcodeVisibleInAppbar ? 2 : 1,
style: theme.primaryTextTheme.titleLarge
style: theme.textTheme.titleLarge
?.copyWith(fontWeight: FontWeight.w500),
),
if (_barcode.isNotEmpty)
Expand Down

0 comments on commit 475d228

Please sign in to comment.