I was wondering if there is a way to actually edit the large title as part of the CupertinoSliverNavigationBar for my TODO list app I want to make the large title as a title that can be editable and when scrolled up it actually displays the title.
Widget build(BuildContext context) {
return CupertinoPageScaffold(
child: CustomScrollView(
slivers: [
// The CupertinoSliverNavigationBar
CupertinoSliverNavigationBar(
leading: Material(
child: IconButton(
icon: const Icon(Icons.home),
onPressed: () {},
)),
trailing: Material(
child: IconButton(
icon: const Icon(Icons.add),
onPressed: () {},
)),
largeTitle: const Text('Large Title'),
),
],
));
}
}
here is the basic code.
thank you.
You can a state variable for title or direct
controller.text
. To update the UI, you canaddListener
oronChanged
method onCupertinoTextField
.