Skip to content
Snippets Groups Projects
Commit 61ca2ebc authored by Benoît Harrault's avatar Benoît Harrault
Browse files

Merge branch '16-fix-autosize-text-in-buttons' into 'master'

Resolve "Fix autosize text in buttons"

Closes #16

See merge request !14
parents 56cd86da 52b5ab3d
No related branches found
No related tags found
1 merge request!14Resolve "Fix autosize text in buttons"
Pipeline #7373 passed
## 0.8.1
- Fix autosized text in styled buttons
## 0.8.0
- Allow multiline parameter item
......
......@@ -2,8 +2,6 @@ import 'dart:math';
import 'package:flutter/material.dart';
import 'package:auto_size_text/auto_size_text.dart';
import 'package:flutter_custom_toolbox/utils/color_extensions.dart';
class StyledButton extends StatelessWidget {
......@@ -27,11 +25,13 @@ class StyledButton extends StatelessWidget {
required String caption,
required Color color,
}) {
final Widget captionWidget = AutoSizeText(
final Widget captionWidget = FittedBox(
fit: BoxFit.scaleDown,
child: Text(
caption,
maxLines: 1,
style: TextStyle(
inherit: true,
fontSize: 99,
fontWeight: FontWeight.w900,
color: color.darken(60),
shadows: [
......@@ -57,6 +57,7 @@ class StyledButton extends StatelessWidget {
),
],
),
),
);
return StyledButton(
......
......@@ -3,7 +3,7 @@ description: "Flutter custom toolbox for org.benoitharrault.* projects."
publish_to: "none"
version: 0.8.0
version: 0.8.1
homepage: https://git.harrault.fr/android/flutter-toolbox
......@@ -16,7 +16,6 @@ dependencies:
sdk: flutter
# base
auto_size_text: ^3.0.0
easy_localization: ^3.0.1
equatable: ^2.0.5
flutter_bloc: ^8.1.1
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment