From 49a12859e180fe8146ed997b6c5a96a9d4abb5f8 Mon Sep 17 00:00:00 2001 From: niloysikdar <niloysikdar30@gmail.com> Date: Sun, 2 May 2021 02:25:37 +0530 Subject: [PATCH] TextEditingController for oxygenform --- lib/screens/addoxygen.dart | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/lib/screens/addoxygen.dart b/lib/screens/addoxygen.dart index ee1e84f..d404d56 100644 --- a/lib/screens/addoxygen.dart +++ b/lib/screens/addoxygen.dart @@ -7,6 +7,35 @@ class AddOxygenDetails extends StatefulWidget { } class _AddOxygenDetailsState extends State<AddOxygenDetails> { + late TextEditingController titlecontroller; + late TextEditingController descriptioncontroller; + late TextEditingController pincontroller; + + String headerstring = + "Please ensure all the data that you are providing are from verified sources.\nFeeding any false information or spamming will lead to permanent ban."; + + void clearcontrollers() { + titlecontroller.clear(); + descriptioncontroller.clear(); + pincontroller.clear(); + } + + @override + void initState() { + super.initState(); + titlecontroller = TextEditingController(); + descriptioncontroller = TextEditingController(); + pincontroller = TextEditingController(); + } + + @override + void dispose() { + titlecontroller.dispose(); + descriptioncontroller.dispose(); + pincontroller.dispose(); + super.dispose(); + } + @override Widget build(BuildContext context) { Size size = MediaQuery.of(context).size;