how to implement this UI using flutter?
i try to add dropdownbutton to appBar. Adding Row widget with textfield and icon. but the how to minimize textfield width? how to make container as same height as textfield?. thanks in advance.
2
IntrinsicHeight( child: Row( crossAxisAlignment: CrossAxisAlignment.stretch, children: [ Expanded( child: TextField( decoration: InputDecoration( enabledBorder: OutlineInputBorder() ), ), ), const SizedBox(width: 8), Container( padding: const EdgeInsets.all(8), decoration: BoxDecoration( color: Colors.blue ), child: Icon(Icons.menu), ), ], ), ),
final searchAndFilterRowHeight = 50.0; //desired height for search field and the filter (blue) container SizedBox( height: searchAndFilterRowHeight, child: Row( children: [ Expanded( child: TextField( decoration: InputDecoration( contentPadding: EdgeInsets.zero, hintText: "Search here", prefixIcon: const Icon(Icons.search), filled: true, fillColor: Colors.white, border: OutlineInputBorder( borderRadius: BorderRadius.circular(10.0), borderSide: BorderSide.none), ))), const SizedBox(width: 10.0), Container( width: searchAndFilterRowHeight, decoration: BoxDecoration( color: Colors.blue, borderRadius: BorderRadius.circular(10.0), ), child: const Center( child: Icon( Icons.format_align_left_sharp, color: Colors.white, )), ), ], ), ),
Click here to cancel reply.
2
Answers