File tree Expand file tree Collapse file tree 2 files changed +23
-1
lines changed Expand file tree Collapse file tree 2 files changed +23
-1
lines changed Original file line number Diff line number Diff line change @@ -9,6 +9,7 @@ import 'package:provider/provider.dart';
9
9
import '../Api/torrent_api.dart' ;
10
10
import '../Constants/theme_provider.dart' ;
11
11
import '../Provider/client_provider.dart' ;
12
+ import 'flood_snackbar.dart' ;
12
13
13
14
class BottomFloatingMenuButton extends StatefulWidget {
14
15
@override
@@ -301,6 +302,15 @@ class _BottomFloatingMenuButtonState extends State<BottomFloatingMenuButton>
301
302
sequentialDownload,
302
303
isCompleted: completed,
303
304
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);
304
314
Navigator .pop (context);
305
315
},
306
316
style: ElevatedButton .styleFrom (
@@ -565,6 +575,14 @@ class _BottomFloatingMenuButtonState extends State<BottomFloatingMenuButton>
565
575
isSequential: sequentialDownload,
566
576
isCompleted: completed,
567
577
context: context);
578
+ final addTorrentSnackbar =
579
+ addFloodSnackBar (
580
+ SnackbarType .information,
581
+ 'Torrent added successfully' ,
582
+ 'Dismiss' );
583
+
584
+ ScaffoldMessenger .of (context)
585
+ .showSnackBar (addTorrentSnackbar);
568
586
Navigator .pop (context);
569
587
},
570
588
style: ElevatedButton .styleFrom (
Original file line number Diff line number Diff line change @@ -763,7 +763,11 @@ class AuthenticationSection extends StatelessWidget {
763
763
level: isAdmin ? 10 : 5 ,
764
764
path: pathController.text,
765
765
host: hostController.text,
766
- port: int .parse (portController.text),
766
+ port: int .parse (
767
+ portController.text.isEmpty
768
+ ? "0"
769
+ : portController.text,
770
+ ),
767
771
),
768
772
);
769
773
final addNewUserSnackBar = addFloodSnackBar (
You can’t perform that action at this time.
0 commit comments