search feature updated.
							parent
							
								
									f7599a47e7
								
							
						
					
					
						commit
						7cd4b6c73a
					
				@ -0,0 +1,89 @@
 | 
			
		||||
 | 
			
		||||
import 'package:flutter/material.dart';
 | 
			
		||||
 | 
			
		||||
Widget inputWidget(String _labelText, String _hintText, TextEditingController _controller, {String? prefix, bool isEnable = true, bool hasSelection = false, Widget? suffix, void Function(String)? onChanged,GestureTapCallback? onTap }) {
 | 
			
		||||
  return Container(
 | 
			
		||||
    padding: EdgeInsets.only(left: 10, right: 10, bottom: 5, top: 5),
 | 
			
		||||
    alignment: Alignment.center,
 | 
			
		||||
    decoration: BoxDecoration(
 | 
			
		||||
      borderRadius: BorderRadius.circular(15),
 | 
			
		||||
      color: Colors.white,
 | 
			
		||||
      border: Border.all(
 | 
			
		||||
        color: Color(0xffefefef),
 | 
			
		||||
        width: 1,
 | 
			
		||||
      ),
 | 
			
		||||
    ),
 | 
			
		||||
    child: InkWell(
 | 
			
		||||
      onTap: hasSelection ? () {} : null,
 | 
			
		||||
      child: Row(
 | 
			
		||||
        children: [
 | 
			
		||||
          Expanded(
 | 
			
		||||
            child: Column(
 | 
			
		||||
              mainAxisSize: MainAxisSize.min,
 | 
			
		||||
              crossAxisAlignment: CrossAxisAlignment.start,
 | 
			
		||||
              children: [
 | 
			
		||||
                Text(
 | 
			
		||||
                  _labelText,
 | 
			
		||||
                  style: TextStyle(
 | 
			
		||||
                    fontSize: 11,
 | 
			
		||||
                    fontWeight: FontWeight.w600,
 | 
			
		||||
                    color: Color(0xff2B353E),
 | 
			
		||||
                    letterSpacing: -0.44,
 | 
			
		||||
                  ),
 | 
			
		||||
                ),
 | 
			
		||||
 | 
			
		||||
                TextField(
 | 
			
		||||
                  enabled: isEnable,
 | 
			
		||||
                  onChanged: onChanged,
 | 
			
		||||
                  scrollPadding: EdgeInsets.zero,
 | 
			
		||||
                  onTap: onTap,
 | 
			
		||||
                  controller: _controller,
 | 
			
		||||
                  style: TextStyle(
 | 
			
		||||
                    fontSize: 14,
 | 
			
		||||
                    height: 21 / 14,
 | 
			
		||||
                    fontWeight: FontWeight.w400,
 | 
			
		||||
                    color: Color(0xff2B353E),
 | 
			
		||||
                    letterSpacing: -0.44,
 | 
			
		||||
                  ),
 | 
			
		||||
                  decoration: InputDecoration(
 | 
			
		||||
                    isDense: true,
 | 
			
		||||
                    hintText: _hintText,
 | 
			
		||||
                    hintStyle: TextStyle(
 | 
			
		||||
                      fontSize: 14,
 | 
			
		||||
                      height: 21 / 14,
 | 
			
		||||
                      fontWeight: FontWeight.w400,
 | 
			
		||||
                      color: Color(0xff575757),
 | 
			
		||||
                      letterSpacing: -0.56,
 | 
			
		||||
                    ),
 | 
			
		||||
                    prefixIconConstraints: BoxConstraints(minWidth: 50),
 | 
			
		||||
                    prefixIcon: prefix == null
 | 
			
		||||
                        ? null
 | 
			
		||||
                        : Text(
 | 
			
		||||
                      "+" + prefix,
 | 
			
		||||
                      style: TextStyle(
 | 
			
		||||
                        fontSize: 14,
 | 
			
		||||
                        height: 21 / 14,
 | 
			
		||||
                        fontWeight: FontWeight.w500,
 | 
			
		||||
                        color: Color(0xff2E303A),
 | 
			
		||||
                        letterSpacing: -0.56,
 | 
			
		||||
                      ),
 | 
			
		||||
                    ),
 | 
			
		||||
                    contentPadding: EdgeInsets.zero,
 | 
			
		||||
                    border: InputBorder.none,
 | 
			
		||||
                    focusedBorder: InputBorder.none,
 | 
			
		||||
                    enabledBorder: InputBorder.none,
 | 
			
		||||
 | 
			
		||||
                  ),
 | 
			
		||||
                ),
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
              ],
 | 
			
		||||
            ),
 | 
			
		||||
          ),
 | 
			
		||||
          suffix ?? SizedBox()
 | 
			
		||||
        ],
 | 
			
		||||
      ),
 | 
			
		||||
    ),
 | 
			
		||||
  );
 | 
			
		||||
}
 | 
			
		||||
					Loading…
					
					
				
		Reference in New Issue