In today’s video we went over the more complex way of using the text data that comes from the what a user types in the TextFormField widget.

Although it is not a lot more code to write there is a lot more happening. Here is the code from the video:

import 'package:circles/widgets/bottomNavBar.dart';
import 'package:flutter/material.dart';

class PreferencesScreen extends StatefulWidget {
  State<StatefulWidget> createState() {
    return PreferencesScreenState();

class PreferencesScreenState extends State<PreferencesScreen> {
  final _controller = TextEditingController();
  String textValue;

  void initState() {
    _controller.addListener(() {
      print('TEXT: ${_controller.text}');

      setState(() {
        textValue = _controller.text;

      _controller.value = _controller.value.copyWith(text: textValue);


  void dispose() {

  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        automaticallyImplyLeading: false,
        title: Text('Preferences'),
      body: Container(
        child: Column(
          children: <Widget>[
              controller: _controller,
      bottomNavigationBar: BottomNavBar(),