收到此错误 -> type 'Null' is not a subtype of type 'Widget

getting this error -> type 'Null' is not a subtype of type 'Widget

  _buildPincode()  {
    final _pcode =  getUserLocation(_areaname);
    FutureBuilder<Widget>(
        builder: (context, snapshot)  {
      return TextFormField(
          decoration: InputDecoration(labelText: 'Pincode'),
    onSaved: (String? _pcode){
    _pincode = _pcode!;
    }
  }

我正在尝试使用用户将输入的区域名称获取密码

这是因为您没有在 _buildPincode 中返回任何内容:

_buildPincode() {
  final _pcode =  getUserLocation(_areaname);
  return FutureBuilder<Widget>(builder: (context, snapshot) {
    return TextFormField(
        decoration: InputDecoration(labelText: 'Pincode'),
        onSaved: (String? _pcode) {
          _pincode = _pcode!;
        });
  });
}