diff --git a/lib/src/screens/restore/widgets/restore_button.dart b/lib/src/screens/restore/widgets/restore_button.dart index 4525bd367..3de1c9e03 100644 --- a/lib/src/screens/restore/widgets/restore_button.dart +++ b/lib/src/screens/restore/widgets/restore_button.dart @@ -1,5 +1,6 @@ import 'package:flutter/material.dart'; import 'package:cake_wallet/palette.dart'; +import 'package:auto_size_text/auto_size_text.dart'; class RestoreButton extends StatelessWidget { const RestoreButton( @@ -57,30 +58,29 @@ class RestoreButton extends StatelessWidget { ), Column( children: [ - Text( + AutoSizeText( title, textAlign: TextAlign.center, style: TextStyle( color: titleColor, - fontSize: 16.0, fontWeight: FontWeight.bold), + maxLines: 1, ), Padding( padding: EdgeInsets.only(left: 20, right: 20, top: 10), - child: Text( + child: AutoSizeText( description, textAlign: TextAlign.center, style: TextStyle( - color: - Theme.of(context).accentTextTheme.subhead.color, - fontSize: 12.0, - height: 1.4), - ), + color: Theme.of(context).accentTextTheme.subhead.color, + ), + maxLines: 2, + ) ) ], ), SizedBox( - height: 20.0, + height: 20, ), Container( height: 56.0, diff --git a/pubspec.lock b/pubspec.lock index e9687ee2b..ee0d1d59f 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -36,6 +36,13 @@ packages: url: "https://pub.dartlang.org" source: hosted version: "2.4.0" + auto_size_text: + dependency: "direct main" + description: + name: auto_size_text + url: "https://pub.dartlang.org" + source: hosted + version: "2.1.0" barcode_scan: dependency: "direct main" description: diff --git a/pubspec.yaml b/pubspec.yaml index b3e4f5082..6cf234025 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -48,6 +48,7 @@ dependencies: local_auth: ^0.6.1 package_info: ^0.4.0+13 devicelocale: ^0.2.1 + auto_size_text: ^2.1.0 # The following adds the Cupertino Icons font to your application. # Use with the CupertinoIcons class for iOS style icons.