Skip to content

Commit c9ff732

Browse files
committed
Add snackbar for adding feed and rule
1 parent 83d65c6 commit c9ff732

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

lib/Components/RSSFeedHomePage.dart

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import 'package:flood_mobile/Api/update_feed_api.dart';
55
import 'package:flood_mobile/Model/single_feed_and_response_model.dart';
66
import 'package:flood_mobile/Provider/home_provider.dart';
77
import 'package:flutter/material.dart';
8+
import 'package:flood_mobile/Components/flood_snackbar.dart';
89
import 'package:provider/provider.dart';
910
import '../Api/delete_feeds_and_rules.dart';
1011
import '../Api/feed_api.dart';
@@ -610,6 +611,13 @@ class _RSSFeedHomePageState extends State<RSSFeedHomePage>
610611
context: context,
611612
);
612613
}
614+
final addFeedSnackbar = addFloodSnackBar(
615+
SnackbarType.information,
616+
'New Feed added successfully',
617+
'Dismiss');
618+
619+
ScaffoldMessenger.of(context)
620+
.showSnackBar(addFeedSnackbar);
613621
FeedsApi.listAllFeedsAndRules(
614622
context: context);
615623
if (isUpdateFeedSelected) {
@@ -1984,6 +1992,13 @@ class _RSSFeedHomePageState extends State<RSSFeedHomePage>
19841992
count: 0,
19851993
context: context,
19861994
);
1995+
final addRuleSnackbar = addFloodSnackBar(
1996+
SnackbarType.information,
1997+
'New Rule added successfully',
1998+
'Dismiss');
1999+
2000+
ScaffoldMessenger.of(context)
2001+
.showSnackBar(addRuleSnackbar);
19872002
FeedsApi.listAllFeedsAndRules(
19882003
context: context);
19892004
});

0 commit comments

Comments
 (0)