Skip to content

Instantly share code, notes, and snippets.

@ijoschek ijoschek/.\lib\scr\home.dart Secret
Created Dec 5, 2018

Embed
What would you like to do?
flutter_firestore_tut
//...
class _Home extends State<StatefulWidget> {
var _totalDocs = 0;
var _queriedDocs = 0;
var _interactionCount = 0;
final _myContr = TextEditingController();
final _getContr = TextEditingController();
final _myUpdateContr = TextEditingController();
bool _switchOnOff = false;
var _listener;
var _transactionListener;
@override
void dispose() {
// Clean up controllers when disposed
_myContr.dispose();
_getContr.dispose();
_myUpdateContr.dispose();
// Cancel transaction listener subscription
_transactionListener.cancel();
super.dispose();
}
//...
@override
Widget build(BuildContext context) {
//...
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.