@@ -3,6 +3,8 @@ import 'package:flood_mobile/Constants/theme_provider.dart';
3
3
import 'package:flood_mobile/Model/torrent_model.dart' ;
4
4
import 'package:flutter/material.dart' ;
5
5
6
+ import 'flood_snackbar.dart' ;
7
+
6
8
class DeleteTorrentSheet extends StatefulWidget {
7
9
final TorrentModel torrent;
8
10
@@ -85,10 +87,10 @@ class _DeleteTorrentSheetState extends State<DeleteTorrentSheet> {
85
87
child: Text (
86
88
"No" ,
87
89
style: TextStyle (
88
- color:
89
- ThemeProvider .theme.textTheme.bodyText1 ? .color ,
90
- fontSize : 16 ,
91
- fontWeight : FontWeight .w900 ),
90
+ color: ThemeProvider .theme.textTheme.bodyText1 ? .color,
91
+ fontSize : 16 ,
92
+ fontWeight : FontWeight .w900 ,
93
+ ),
92
94
),
93
95
),
94
96
),
@@ -100,15 +102,23 @@ class _DeleteTorrentSheetState extends State<DeleteTorrentSheet> {
100
102
Expanded (
101
103
child: Container (
102
104
height: MediaQuery .of (context).size.height * 0.06 ,
103
- decoration:
104
- BoxDecoration (borderRadius: BorderRadius .circular (20 )),
105
+ decoration: BoxDecoration (
106
+ borderRadius: BorderRadius .circular (20 ),
107
+ ),
105
108
child: ElevatedButton (
106
109
onPressed: () {
107
110
TorrentApi .deleteTorrent (
108
111
hash: widget.torrent.hash,
109
112
deleteWithData: deleteWithData,
110
113
context: context);
111
114
Navigator .of (context).pop ();
115
+
116
+ final deleteTorrentSnackBar = addFloodSnackBar (
117
+ SnackbarType .caution,
118
+ 'Torrent deleted successfuly' ,
119
+ 'Dismiss' );
120
+ ScaffoldMessenger .of (context)
121
+ .showSnackBar (deleteTorrentSnackBar);
112
122
},
113
123
style: ElevatedButton .styleFrom (
114
124
shape: RoundedRectangleBorder (
@@ -120,10 +130,10 @@ class _DeleteTorrentSheetState extends State<DeleteTorrentSheet> {
120
130
child: Text (
121
131
"Yes" ,
122
132
style: TextStyle (
123
- color:
124
- ThemeProvider .theme.textTheme.bodyText1 ? .color ,
125
- fontSize : 16 ,
126
- fontWeight : FontWeight .w900 ),
133
+ color: ThemeProvider .theme.textTheme.bodyText1 ? .color,
134
+ fontSize : 16 ,
135
+ fontWeight : FontWeight .w900 ,
136
+ ),
127
137
),
128
138
),
129
139
),
0 commit comments