restore-button-fix | replaced Text widget on AutoSizeText

This commit is contained in:
Oleksandr Sobol 2020-03-04 23:17:18 +02:00
parent e33bb4989e
commit 30f10ca6f3
3 changed files with 17 additions and 9 deletions

View file

@ -1,5 +1,6 @@
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:cake_wallet/palette.dart'; import 'package:cake_wallet/palette.dart';
import 'package:auto_size_text/auto_size_text.dart';
class RestoreButton extends StatelessWidget { class RestoreButton extends StatelessWidget {
const RestoreButton( const RestoreButton(
@ -57,30 +58,29 @@ class RestoreButton extends StatelessWidget {
), ),
Column( Column(
children: <Widget>[ children: <Widget>[
Text( AutoSizeText(
title, title,
textAlign: TextAlign.center, textAlign: TextAlign.center,
style: TextStyle( style: TextStyle(
color: titleColor, color: titleColor,
fontSize: 16.0,
fontWeight: FontWeight.bold), fontWeight: FontWeight.bold),
maxLines: 1,
), ),
Padding( Padding(
padding: EdgeInsets.only(left: 20, right: 20, top: 10), padding: EdgeInsets.only(left: 20, right: 20, top: 10),
child: Text( child: AutoSizeText(
description, description,
textAlign: TextAlign.center, textAlign: TextAlign.center,
style: TextStyle( style: TextStyle(
color: color: Theme.of(context).accentTextTheme.subhead.color,
Theme.of(context).accentTextTheme.subhead.color, ),
fontSize: 12.0, maxLines: 2,
height: 1.4), )
),
) )
], ],
), ),
SizedBox( SizedBox(
height: 20.0, height: 20,
), ),
Container( Container(
height: 56.0, height: 56.0,

View file

@ -36,6 +36,13 @@ packages:
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "2.4.0" 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: barcode_scan:
dependency: "direct main" dependency: "direct main"
description: description:

View file

@ -48,6 +48,7 @@ dependencies:
local_auth: ^0.6.1 local_auth: ^0.6.1
package_info: ^0.4.0+13 package_info: ^0.4.0+13
devicelocale: ^0.2.1 devicelocale: ^0.2.1
auto_size_text: ^2.1.0
# The following adds the Cupertino Icons font to your application. # The following adds the Cupertino Icons font to your application.
# Use with the CupertinoIcons class for iOS style icons. # Use with the CupertinoIcons class for iOS style icons.