Skip to content

Commit

Permalink
fix ui bug
Browse files Browse the repository at this point in the history
  • Loading branch information
Emil1483 committed Feb 2, 2020
1 parent 1fe6daa commit 51e3a2f
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/ui_elements/button.dart
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import 'dart:async';
import 'package:flutter/material.dart';
import 'package:audioplayers/audioplayers.dart';
import 'package:provider/provider.dart';
import 'package:auto_size_text/auto_size_text.dart';

import '../providers/app_data.dart';
import '../helpers/sound_data.dart';
Expand Down Expand Up @@ -121,9 +122,10 @@ class _ButtonState extends State<Button> with SingleTickerProviderStateMixin {
Expanded(
child: Align(
alignment: Alignment(0, -0.5),
child: Text(
child: AutoSizeText(
widget.soundData.name,
style: Theme.of(context).textTheme.subtitle,
textAlign: TextAlign.center,
),
),
),
Expand Down
7 changes: 7 additions & 0 deletions pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,13 @@ packages:
url: "https://pub.dartlang.org"
source: hosted
version: "0.13.7"
auto_size_text:
dependency: "direct main"
description:
name: auto_size_text
url: "https://pub.dartlang.org"
source: hosted
version: "2.1.0"
boolean_selector:
dependency: transitive
description:
Expand Down
2 changes: 2 additions & 0 deletions pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,8 @@ dependencies:

provider: ^4.0.2

auto_size_text: ^2.1.0

dev_dependencies:
flutter_test:
sdk: flutter
Expand Down

0 comments on commit 51e3a2f

Please sign in to comment.