New Feature ✨
- **Widget**: TextInput & TextInputController
**Widget information:**
**TextInput** - Used to create and gather user inputs.
**TextInputController** - Used to leverage and access TextInput's properties, attributes, and methods (for example, setting value, disabling, etc.)
python
class App(UsesState):
def __init__(self):
self.input = ""
self.controller = TextInputController()
def build(self):
def print_input(ev):
self.input = self.controller.value
self.update()
return Container(
children=[
Text(self.input),
TextInput(controller=self.controller),
Button("Input!", onClick=print_input)
]
)
Breaking changes 🚨
New development folder structure.
**NOTE**:
- CSS files are now on `styles` folder that is now in the main directory (it was in `src/css`)
- New folder called `public`, it's where you're going to put your assets like images, HTMLs, etc.
_**🚨 WARN: You need to recreate your app if you want to update to this version.**_
**Steps:**
- Copy your `src` folder and paste it somewhere for later.
- Copy your `src/css` folder and paste it somewhere for later also.
- Recreate your app
- Delete the `src` folder generated on the create and paste your `src` folder on the main directory.
- Paste your `css` folder to `styles` folder.
- Put your css files to main `styles` folder and delete the `css` folder.
This is a long process but this change makes the development experience more great because of new code organization. Hope you understand. Thank you!