Flutter2.2中提示 The parameter 'key' can't have a value of 'null' because of its type
Flutter2.2中提示 The parameter ‘key’ can’t have a value of ‘null’ because of its type, but the implicit default value is ‘null’. Try adding either an explicit non-‘null’ default value or the ‘required’ 解决方案
解决办法:
实例化的时候把Key配置成可选参数
class PayPage extends StatefulWidget {
PayPage({Key? key}) : super(key: key);
_PayPageState createState() => _PayPageState();
}