From 5cf18b0210a11114b43106b9887c454b4683f198 Mon Sep 17 00:00:00 2001 From: Alex Li Date: Mon, 26 Feb 2024 18:08:21 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=92=84=20Flexible=20example=20title?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- example/lib/pages/home_page.dart | 40 ++++++++++++++++++-------------- 1 file changed, 22 insertions(+), 18 deletions(-) diff --git a/example/lib/pages/home_page.dart b/example/lib/pages/home_page.dart index 2821259..8932410 100644 --- a/example/lib/pages/home_page.dart +++ b/example/lib/pages/home_page.dart @@ -50,27 +50,31 @@ class _MyHomePageState extends State { ), ), const SizedBox(width: 10), - Column( - mainAxisAlignment: MainAxisAlignment.spaceEvenly, - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Semantics( - sortKey: const OrdinalSortKey(0), - child: Text( - context.l10n.appTitle, - style: Theme.of(context).textTheme.titleLarge, + Flexible( + child: Column( + mainAxisAlignment: MainAxisAlignment.spaceEvenly, + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Semantics( + sortKey: const OrdinalSortKey(0), + child: Text( + context.l10n.appTitle, + style: Theme.of(context).textTheme.titleLarge, + overflow: TextOverflow.fade, + maxLines: 1, + ), ), - ), - Semantics( - sortKey: const OrdinalSortKey(0.1), - child: Text( - context.l10n.appVersion( - packageVersion ?? context.l10n.appVersionUnknown, + Semantics( + sortKey: const OrdinalSortKey(0.1), + child: Text( + context.l10n.appVersion( + packageVersion ?? context.l10n.appVersionUnknown, + ), + style: Theme.of(context).textTheme.bodySmall, ), - style: Theme.of(context).textTheme.bodySmall, ), - ), - ], + ], + ), ), const SizedBox(width: 20), ],