Skip to content

Commit 7d91353

Browse files
committed
add torrent snackbar
1 parent 0d068bd commit 7d91353

File tree

1 file changed

+12
-3
lines changed

1 file changed

+12
-3
lines changed

lib/Components/add_torrent_sheet.dart

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import 'dart:io';
44
import 'package:clipboard/clipboard.dart';
55
import 'package:file_picker/file_picker.dart';
66
import 'package:flood_mobile/Api/torrent_api.dart';
7+
import 'package:flood_mobile/Components/flood_snackbar.dart';
78
import 'package:flood_mobile/Constants/theme_provider.dart';
89
import 'package:flood_mobile/Model/client_settings_model.dart';
910
import 'package:flutter/material.dart';
@@ -267,6 +268,13 @@ class _AddTorrentSheetState extends State<AddTorrentSheet> {
267268
Navigator.pop(context);
268269
}
269270
}
271+
final addTorrentSnackbar = addFloodSnackBar(
272+
SnackbarType.information,
273+
'Torrent added successfully',
274+
'Dismiss');
275+
276+
ScaffoldMessenger.of(context)
277+
.showSnackBar(addTorrentSnackbar);
270278
},
271279
style: ElevatedButton.styleFrom(
272280
elevation: 0,
@@ -279,9 +287,10 @@ class _AddTorrentSheetState extends State<AddTorrentSheet> {
279287
child: Text(
280288
"Add Torrent",
281289
style: TextStyle(
282-
color: Colors.white,
283-
fontSize: 16,
284-
fontWeight: FontWeight.w600),
290+
color: Colors.white,
291+
fontSize: 16,
292+
fontWeight: FontWeight.w600,
293+
),
285294
),
286295
),
287296
),

0 commit comments

Comments
 (0)