# settingText function

Widget settingText(

1. dynamic item,
2. Function setState,
3. String parent,
4. String setting

)

## Implementation

    Widget settingText(item, Function setState, String parent, String setting) {
      final name = setting.uppercaseFirst();
      final controller =
          TextEditingController(text: prefs.getString('$item-$setting') ?? "");
      return Padding(
        padding: const EdgeInsets.all(8.0),
        child: Row(
          mainAxisAlignment: MainAxisAlignment.spaceBetween,
          children: [
            Text("$name:"),
            const SizedBox(
              width: 8.0,
            ),
            SizedBox(
              width: 300.0,
              child: TextBox(
                controller: controller,
                onChanged: (value) {
                  prefs.setString('$item-$setting', value);
                  // Execute command in WSL
                  WSLApi().setSetting(item, parent, setting, value);
                },
              ),
            ),
          ],
        ),
      );
    }