error fixes

This commit is contained in:
Prerak Mann
2019-05-12 01:30:07 +05:30
parent c118ce5096
commit 9ff7aa546f
2 changed files with 10 additions and 16 deletions

View File

@@ -201,10 +201,13 @@ class _MyBodyState extends State<Body> {
),
RaisedButton(
child: Text("Reject Connection"),
onPressed: () {
onPressed: () async {
Navigator.pop(context);
Nearby().rejectConnection(id);
try {
await Nearby().rejectConnection(id);
} catch (e) {
showSnackbar(e);
}
},
),
],