restore-button-fix | replaced Text widget on AutoSizeText

Oleksandr Sobol committed Mar 4, 2020 at 23:17 UTC 30f10ca6f37977dcd9a26c754475d013d9d27a99
3 files changed +17 -9
lib/src/screens/restore/widgets/restore_button.dart
+9 -9
@@ -1,5 +1,6 @@
1 import 'package:flutter/material.dart';
2 import 'package:cake_wallet/palette.dart';
3 +import 'package:auto_size_text/auto_size_text.dart';
4
5 class RestoreButton extends StatelessWidget {
6 const RestoreButton(
@@ -57,30 +58,29 @@ class RestoreButton extends StatelessWidget {
58 ),
59 Column(
60 children: <Widget>[
60 - Text(
61 + AutoSizeText(
62 title,
63 textAlign: TextAlign.center,
64 style: TextStyle(
65 color: titleColor,
65 - fontSize: 16.0,
66 fontWeight: FontWeight.bold),
67 + maxLines: 1,
68 ),
69 Padding(
70 padding: EdgeInsets.only(left: 20, right: 20, top: 10),
70 - child: Text(
71 + child: AutoSizeText(
72 description,
73 textAlign: TextAlign.center,
74 style: TextStyle(
74 - color:
75 - Theme.of(context).accentTextTheme.subhead.color,
76 - fontSize: 12.0,
77 - height: 1.4),
78 - ),
75 + color: Theme.of(context).accentTextTheme.subhead.color,
76 + ),
77 + maxLines: 2,
78 + )
79 )
80 ],
81 ),
82 SizedBox(
83 - height: 20.0,
83 + height: 20,
84 ),
85 Container(
86 height: 56.0,
pubspec.lock
+7
@@ -36,6 +36,13 @@ packages:
36 url: "https://pub.dartlang.org"
37 source: hosted
38 version: "2.4.0"
39 + auto_size_text:
40 + dependency: "direct main"
41 + description:
42 + name: auto_size_text
43 + url: "https://pub.dartlang.org"
44 + source: hosted
45 + version: "2.1.0"
46 barcode_scan:
47 dependency: "direct main"
48 description:
pubspec.yaml
+1
@@ -48,6 +48,7 @@ dependencies:
48 local_auth: ^0.6.1
49 package_info: ^0.4.0+13
50 devicelocale: ^0.2.1
51 + auto_size_text: ^2.1.0
52
53 # The following adds the Cupertino Icons font to your application.
54 # Use with the CupertinoIcons class for iOS style icons.