spotube/lib/components/Shared/ReplaceDownloadedFileDialog.dart
Kingkor Roy Tirtho d9addcda8e feat(mpris): MPRIS metadata are now updated in realtime
refactor(download-button): use download provider and queue instead of custom logic
2022-09-09 13:05:02 +06:00

32 lines
815 B
Dart

import 'package:flutter/material.dart';
import 'package:spotify/spotify.dart';
class ReplaceDownloadedFileDialog extends StatelessWidget {
final Track track;
const ReplaceDownloadedFileDialog({required this.track, Key? key})
: super(key: key);
@override
Widget build(BuildContext context) {
return AlertDialog(
title: Text("Track ${track.name} Already Exists"),
content:
const Text("Do you want to replace the already downloaded track?"),
actions: [
TextButton(
child: const Text("No"),
onPressed: () {
Navigator.pop(context, false);
},
),
TextButton(
child: const Text("Yes"),
onPressed: () {
Navigator.pop(context, true);
},
)
],
);
}
}