WIP Themes: Make all fonts depend on theme
This commit is contained in:
@ -13,12 +13,6 @@ class _MediaPlayerSeekBarState extends State<MediaPlayerSeekBar> {
|
||||
double _currentPosition = 0;
|
||||
int _savedPosition = 0;
|
||||
|
||||
final TextStyle _seekTextStyle = TextStyle(
|
||||
fontSize: 20,
|
||||
color: Colors.blue,
|
||||
fontWeight: FontWeight.bold
|
||||
);
|
||||
|
||||
@override
|
||||
initState() {
|
||||
super.initState();
|
||||
@ -79,7 +73,13 @@ class _MediaPlayerSeekBarState extends State<MediaPlayerSeekBar> {
|
||||
children: <Widget>[
|
||||
Text("00:00"),
|
||||
Expanded(
|
||||
child: Text("${Duration(seconds: _currentPosition.toInt()).toString().split(".")[0]}",textAlign: TextAlign.center, style: _seekTextStyle),
|
||||
child: Text(
|
||||
"${Duration(seconds: _currentPosition.toInt()).toString().split(".")[0]}",
|
||||
textAlign: TextAlign.center,
|
||||
style: Theme.of(context).textTheme.title.copyWith(
|
||||
color: Colors.blue
|
||||
)
|
||||
),
|
||||
),
|
||||
Text("${Duration(seconds: entity.durationSeconds).toString().split(".")[0]}")
|
||||
],
|
||||
|
@ -19,7 +19,7 @@ class MediaPlayerWidget extends StatelessWidget {
|
||||
right: 0.0,
|
||||
child: Container(
|
||||
color: Colors.black45,
|
||||
child: _buildState(entity),
|
||||
child: _buildState(entity, context),
|
||||
),
|
||||
),
|
||||
Positioned(
|
||||
@ -35,12 +35,9 @@ class MediaPlayerWidget extends StatelessWidget {
|
||||
);
|
||||
}
|
||||
|
||||
Widget _buildState(MediaPlayerEntity entity) {
|
||||
TextStyle style = TextStyle(
|
||||
fontSize: 14.0,
|
||||
color: Colors.white,
|
||||
fontWeight: FontWeight.normal,
|
||||
height: 1.2
|
||||
Widget _buildState(MediaPlayerEntity entity, BuildContext context) {
|
||||
TextStyle style = Theme.of(context).textTheme.body1.copyWith(
|
||||
color: Colors.white
|
||||
);
|
||||
List<Widget> states = [];
|
||||
states.add(Text("${entity.displayName}", style: style));
|
||||
|
Reference in New Issue
Block a user