diff --git a/packages/smooth_app/lib/widgets/smooth_product_carousel.dart b/packages/smooth_app/lib/widgets/smooth_product_carousel.dart index 7d84b2d6bb8..db872b56f93 100644 --- a/packages/smooth_app/lib/widgets/smooth_product_carousel.dart +++ b/packages/smooth_app/lib/widgets/smooth_product_carousel.dart @@ -1,3 +1,4 @@ +import 'package:auto_size_text/auto_size_text.dart'; import 'package:carousel_slider/carousel_slider.dart'; import 'package:flutter/material.dart'; import 'package:flutter_gen/gen_l10n/app_localizations.dart'; @@ -120,13 +121,14 @@ class SearchCard extends StatelessWidget { mainAxisAlignment: MainAxisAlignment.spaceEvenly, crossAxisAlignment: CrossAxisAlignment.stretch, children: [ - Text( + AutoSizeText( localizations.welcomeToOpenFoodFacts, textAlign: TextAlign.center, style: const TextStyle( fontSize: 36.0, fontWeight: FontWeight.bold, ), + maxLines: 2, ), Text( localizations.searchPanelHeader, diff --git a/packages/smooth_app/pubspec.lock b/packages/smooth_app/pubspec.lock index 41bfc6fc271..83feed6d228 100644 --- a/packages/smooth_app/pubspec.lock +++ b/packages/smooth_app/pubspec.lock @@ -43,6 +43,13 @@ packages: url: "https://pub.dartlang.org" source: hosted version: "2.8.2" + auto_size_text: + dependency: "direct main" + description: + name: auto_size_text + url: "https://pub.dartlang.org" + source: hosted + version: "3.0.0" boolean_selector: dependency: transitive description: diff --git a/packages/smooth_app/pubspec.yaml b/packages/smooth_app/pubspec.yaml index 8e122c6de47..6d691040e1b 100644 --- a/packages/smooth_app/pubspec.yaml +++ b/packages/smooth_app/pubspec.yaml @@ -51,6 +51,7 @@ dependencies: git: url: https://github.com/cli1005/google_ml_barcode_scanner.git ref: master + auto_size_text: ^3.0.0