imtoori / CountryCodePicker

A flutter package for showing a country code selector.
MIT License
223 stars 450 forks source link

A RenderFlex overflowed error when border in searchDecoration in 1.5.0 #108

Closed krzysiek-alm closed 4 years ago

krzysiek-alm commented 4 years ago

Hi,

When I set border in searchDecoration I receive following error message: A RenderFlex overflowed by 7.0 pixels on the bottom.

Please have a look at the screen how it looks on the device: Simulator Screen Shot - iPhone SE (2nd generation) - 2020-09-30 at 16 20 41

To reproduce this issue please run following code: (Without enabledBorder and focusedBorder there will not be any error.)


  Widget build(BuildContext context) {
    return MaterialApp(
        title: 'Country Picker',
        theme: ThemeData(primaryColor: Colors.white),
        home: Scaffold(
          body: Builder(
              builder: (context) => Center(
                    child: CountryCodePicker(
                      searchDecoration: _getSearchInputDecoration(),
                    ),
                  )),
        ));
  }

  InputDecoration _getSearchInputDecoration() {
    final inputBorder = OutlineInputBorder(
      borderSide: BorderSide(
        color: Color(0xFFDCE6EA),
      ),
    );
    return InputDecoration(
      border: InputBorder.none,
      hintText: "search",
      focusedBorder: inputBorder,
      enabledBorder: inputBorder,
    );
  }
imtoori commented 4 years ago

this has been fixed and a new release will be published asap