Skip to content

Commit 80d49b2

Browse files
committed
Fixed no snackbar when a torrent is added
The torrent when added through Bottom Sheet didnt had the code for snackbar. Added the piece of code there
1 parent 83d65c6 commit 80d49b2

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

lib/Components/bottom_floating_menu_button.dart

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ import 'package:provider/provider.dart';
99
import '../Api/torrent_api.dart';
1010
import '../Constants/theme_provider.dart';
1111
import '../Provider/client_provider.dart';
12+
import 'flood_snackbar.dart';
1213

1314
class BottomFloatingMenuButton extends StatefulWidget {
1415
@override
@@ -301,6 +302,15 @@ class _BottomFloatingMenuButtonState extends State<BottomFloatingMenuButton>
301302
sequentialDownload,
302303
isCompleted: completed,
303304
context: context);
305+
final addTorrentSnackbar =
306+
addFloodSnackBar(
307+
SnackbarType.information,
308+
'Torrent added successfully',
309+
'Dismiss');
310+
311+
ScaffoldMessenger.of(context)
312+
.showSnackBar(
313+
addTorrentSnackbar);
304314
Navigator.pop(context);
305315
},
306316
style: ElevatedButton.styleFrom(

0 commit comments

Comments
 (0)