So I wanna the user type in the TextFormField then pop in the Text field above using setState or if anyone has better suggestion to implement that. I'd improve that text field afterwards with a list or something...
setState Code
TextEditingController textcontroller = TextEditingController();
Widget addtasks() {
setState(() {
Text(textcontroller.text);
});
return Text(textcontroller.text);
}
Form Maker CODE
Widget form_maker(textcontroller) {
return TextFormField(
controller: textcontroller,
keyboardType: TextInputType.text,
onFieldSubmitted: (String value) {
print(value);
},
onChanged: (String value) {
print(value);
},
decoration: const InputDecoration(
labelText: 'Add task...',
prefixIcon: Icon(
Icons.add,
),
border: OutlineInputBorder(),
),
);
}
Also the FloatingActionButton have plans for it i implemented the ShowBottomSheet but couldn't link it to anything from the body onPressed func in it
FAB CODE
floatingActionButton: FloatingActionButton(
child: const Icon(Icons.add),
backgroundColor: Colors.red,
hoverColor: Colors.white,
splashColor: Colors.white,
onPressed: () {
showModalBottomSheet(
context: context,
builder: (context) {
return Wrap(
children: [
InkWell(
child: const ListTile(
leading: Icon(Icons.edit),
title: Text('Add Task'),
),
onTap: () {},
),
const ListTile(
leading: Icon(Icons.share),
title: Text('Share'),
),
const ListTile(
leading: Icon(Icons.link),
title: Text('Get link'),
),
const ListTile(
leading: Icon(Icons.remove_outlined),
title: Text('Remove'),
),
],
);
});
},
),
