Flutter - Form Validation
사용 위젯 Form TextFormField TextField 위젯을 사용하면 TextEditingController 를 사용해야하는데, 여러 개의 필드 사용 시 관리가 어려워진다. 그래서 TextFormField 를 사용한다. 그럼 바로 시작해보자. 1. Form 생성 Form 위젯을 생성하고 key 값을 지정한다. key : GlobalKey() 지정 child : TextFormField 위젯 추가 예정 class FormScreen extends StatefulWidget { const FormScreen({Key? key}) : super(key: key); @override State createState() => _FormScreenState(); } class _FormScreenState..
2022.07.13