“Flutter Textfield” Respostas de código

Textfield Flutter

// full text field
TextField(
   cursorHeight: 20,
   autofocus: false,
   controller: TextEditingController(text: "Initial Text here"),
   decoration: InputDecoration(
      labelText: 'Enter your username',
      hintText: "Enter your Name",
      prefixIcon: Icon(Icons.star),
      suffixIcon: Icon(Icons.keyboard_arrow_down),
      contentPadding: const EdgeInsets.symmetric(vertical: 10,horizontal: 10),
      border: OutlineInputBorder(
          borderRadius: BorderRadius.circular(30),
          borderSide: BorderSide(color: Colors.grey, width: 2),
      ),
      enabledBorder: OutlineInputBorder(
        borderRadius: BorderRadius.circular(30),
        borderSide: BorderSide(color: Colors.grey, width: 1.5),
     ),
     focusedBorder: OutlineInputBorder(
        gapPadding: 0.0,
        borderRadius: BorderRadius.circular(30),
        borderSide: BorderSide(color: Colors.red, width: 1.5),
     ),
   ),
)
CodePadding

Texto de entrada de vibração no contêiner

TextField(
  decoration: InputDecoration(
    border: InputBorder.none,
    hintText: 'Enter a search term'
  ),
);
Prickly Puffin

Exemplo de Flutter do campo de texto

TextFormField(
  decoration: const InputDecoration(
    border: UnderlineInputBorder(),
    labelText: 'Enter your username'
  ),
);
Dark Dormouse

Flutter Textfield

TextField (  
  decoration: InputDecoration(  
    border: InputBorder.none,  
    labelText: 'Enter Name',  
    hintText: 'Enter Your Name'  
  ),  
);  
Tiny Coders

Respostas semelhantes a “Flutter Textfield”

Procure respostas de código populares por idioma

Procurar outros idiomas de código