Last active
June 28, 2023 16:26
-
-
Save lukepighetti/a33fda4bf2314215cf4ad8127df2925c to your computer and use it in GitHub Desktop.
Conversation from https://twitter.com/luke_pighetti/status/1674089421640007681?s=20 about https://www.jetpackcompose.app/compare-declarative-frameworks/JetpackCompose-vs-SwiftUI-vs-Flutter
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import 'package:flutter/material.dart'; | |
class TextInputComponent extends StatefulWidget { | |
const TextInputComponent({super.key}); | |
@override | |
State<TextInputComponent> createState() => _TextInputComponentState(); | |
} | |
class _TextInputComponentState extends State<TextInputComponent> { | |
late final _controller = TextEditingController(text: ""); | |
@override | |
void dispose() { | |
_controller.dispose(); | |
super.dispose(); | |
} | |
@override | |
Widget build(BuildContext context) { | |
return TextField( | |
controller: _controller, | |
decoration: const InputDecoration(labelText: "Enter text"), | |
); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment