mucke/lib/presentation/widgets/previous_button.dart

24 lines
571 B
Dart
Raw Normal View History

2020-07-12 18:25:34 +02:00
import 'package:flutter/material.dart';
import 'package:provider/provider.dart';
import '../state/audio_store.dart';
class PreviousButton extends StatelessWidget {
const PreviousButton({Key key, this.iconSize = 24.0}) : super(key: key);
final double iconSize;
@override
Widget build(BuildContext context) {
final AudioStore audioStore = Provider.of<AudioStore>(context);
2020-12-31 17:52:20 +01:00
return IconButton(
icon: const Icon(Icons.skip_previous_rounded),
iconSize: iconSize,
onPressed: () {
audioStore.skipToPrevious();
2020-07-12 18:25:34 +02:00
},
);
}
}