mirror of
https://github.com/KRTirtho/spotube.git
synced 2025-09-13 07:55:18 +00:00
32 lines
815 B
Dart
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);
|
|
},
|
|
)
|
|
],
|
|
);
|
|
}
|
|
}
|