Skip to content

Instantly share code, notes, and snippets.

@nparsons08
Created Dec 11, 2019
Embed
What would you like to do?
// mobile/lib/new_activity.dart:22
Future _postMessage(BuildContext context) async {
if (_messageController.text.length > 0) {
await ApiService().postMessage(widget.account, _messageController.text);
Navigator.pop(context, true);
} else {
Scaffold.of(context).showSnackBar(
SnackBar(
content: Text('Please type a message'),
),
);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment