fixed marquee

This commit is contained in:
MSpeed 2020-02-20 11:09:10 +01:00
parent 4bce64ae99
commit 6053460ac7
4 changed files with 12 additions and 27 deletions

View File

@ -1,6 +1,5 @@
import 'package:audioplayers/audioplayers.dart';
import 'package:flutter/material.dart';
import 'package:marquee/marquee.dart';
import '../colors.dart';
import '../viewmodel/list_item.dart';
@ -72,6 +71,7 @@ class _PlayerWidgetState extends State<PlayerWidget> {
mainAxisSize: MainAxisSize.min,
mainAxisAlignment: MainAxisAlignment.end,
children: <Widget>[
Container(height: 1, color: MeditoColors.lightColorTrans),
_buildMarquee(),
widget.showReadMoreButton ? _buildReadMoreButton() : Container(),
buildControlRow(),
@ -137,15 +137,15 @@ class _PlayerWidgetState extends State<PlayerWidget> {
}
Widget _buildMarquee() {
return Container(
height: 48,
child: Marquee(
blankSpace: 48,
startPadding: 16,
crossAxisAlignment: CrossAxisAlignment.center,
accelerationCurve: Curves.easeInOut,
text: widget.fileModel != null ? widget.fileModel.title : " ",
style: Theme.of(context).textTheme.display3,
return Padding(
padding: const EdgeInsets.only(left: 24.0, right: 24.0, top: 16, bottom: 16),
child: Center(
child: Text(
widget.fileModel != null ? widget.fileModel.title : " ",
softWrap: false,
overflow: TextOverflow.fade,
style: Theme.of(context).textTheme.display3,
),
),
);
}
@ -196,7 +196,7 @@ class _PlayerWidgetState extends State<PlayerWidget> {
flex: 1,
child: Padding(
padding: const EdgeInsets.only(
top: 8.0, bottom: 8.0, left: 26.0, right: 26.0),
top: 8.0, bottom: 8.0, left: 24.0, right: 24.0),
child: OutlineButton(
child: Text(
"READ MORE",

View File

@ -2,6 +2,7 @@ import 'package:flutter/material.dart';
class MeditoColors {
static const lightColor = Color(0xffebe7e4);
static const lightColorTrans = Color(0x40ebe7e4);
static var lightGreyColor = Color(0xff343b43);
static var darkGreyColor = Color(0xff343b43);
}

View File

@ -83,13 +83,6 @@ packages:
url: "https://pub.dartlang.org"
source: hosted
version: "0.0.3"
flutter_sequence_animation:
dependency: "direct main"
description:
name: flutter_sequence_animation
url: "https://pub.dartlang.org"
source: hosted
version: "3.0.1"
flutter_svg:
dependency: "direct main"
description:
@ -142,13 +135,6 @@ packages:
url: "https://pub.dartlang.org"
source: hosted
version: "2.1.4"
marquee:
dependency: "direct main"
description:
name: marquee
url: "https://pub.dartlang.org"
source: hosted
version: "1.3.1"
matcher:
dependency: transitive
description:

View File

@ -20,8 +20,6 @@ dependencies:
flutter:
sdk: flutter
google_fonts: ^0.3.7
flutter_sequence_animation: ^3.0.1
marquee: ^1.3.1
audioplayers: ^0.14.0
flutter_svg: ^0.17.1
path_provider: ^1.6.0