-
Flutter TextField 위젯 Style 예시DEV/flutter (dart) 2023. 2. 8. 17:02
다양한 TextBox (TextInput) 예시
Sample
...(대충 위젯) return Scaffold( appBar: AppBar(title: Text('TextField Sample')), body: Container( width: double.infinity, height: double.infinity, padding: EdgeInsets.all(10), child: Column(children: [ TextField( decoration: InputDecoration( icon: Icon(Icons.star), hintText: 'Icon' ), ), TextField( decoration: InputDecoration( hintText: 'Border (Colors.green)', enabledBorder: OutlineInputBorder( borderSide: BorderSide( color: Colors.green, width: 1.0, ), ), ), ), TextField( decoration: InputDecoration( hintText: 'Only underline', enabledBorder: UnderlineInputBorder(), ), ), TextField( decoration: InputDecoration( hintText: 'BorderRadius', enabledBorder: OutlineInputBorder( borderRadius: BorderRadius.circular(30), ), ), ), TextField( decoration: InputDecoration( hintText: 'background color', filled: true, fillColor: Colors.blue.shade100, enabledBorder: OutlineInputBorder( borderSide: BorderSide.none, ) ), ), TextField( decoration: InputDecoration( hintText: 'with label', helperText: 'helper', labelText: 'label', counterText: 'counter' ), ), ],), ),
ref.
https://www.youtube.com/@codingapple
'DEV > flutter (dart)' 카테고리의 다른 글
Flutter Button hover and click effect disable (0) 2023.02.10 Flutter HTTP 통신(GET, POST...) 패키지 (0) 2023.02.10 Flutter dart에서의 Null with !, ? 키워드 (Dart 문법 / Null safety) (0) 2023.02.08 Flutter 자료형(Type) 확인하는 법 (Dart 문법) (0) 2023.02.08 Flutter 연락처 추가 예시 (0) 2023.02.08