我正在使用默认的 Flutter Radio Widget。我想增加它的大小,但没有可用的属性。
尝试使用宽度为 50,高度为 50 的 SizedBox。没有帮助。
不想实现整个自定义单选按钮。只想增加默认的大小。谢谢
Below is the code where I am first printing the type of myVar. It returns List<dynamic> in the console. But when I compare its type in a if condition, it does not pass this condition.
print(myVar.runtimeType);
if (myVar.runtimeType is List<dynamic>) {
print("Yes");
}
Run Code Online (Sandbox Code Playgroud)
What's wrong here?
我是 React 钩子的新手。所以,我想用 React 钩子实现 componentWillReceiveProps。我像这样使用 React.useEffect() :
React.useEffect(() => {
console.log(props.authLoginSuccess); // initially called every time, the component renders
}, [props.authLoginSuccess]);
return ( //JSX...)
onst mapStateToProps = (state: any): StateProps => {
return {
authLoginSuccess: selectAuthLoginSuccess(state) //used selector to select authLoginSuccess
};
};
export default connect(
mapStateToProps,
// mapDispatchToProps
{ authLogin, toggleLoadingStatus }
)(Auth);
Run Code Online (Sandbox Code Playgroud)
问题是,每次组件最初呈现时都会调用 useEffect,这是我不想要的。我只希望它在“props.authLoginSuccess”更改时呈现。