我有一个 flutter 博客应用程序,我正在使用这个包来呈现博客 HTML 内容,我希望这个内容是可选择的,我知道SelectableText()小部件,但这不能用于呈现 HTML。
Anyone has an idea how I can make my HTML text selectable from mobile?
I am trying to use the setState react hook and I am trying to make an object of states for different states like this
const [myState, setMyState] = useState({bulb1state: true, bulb2state: true})
Run Code Online (Sandbox Code Playgroud)
then i try to change the states by doing:
setMyState({...myState, bulb1state: false})
//My state is now {bulb1state: false, bulb2state: true }
Run Code Online (Sandbox Code Playgroud)
which is normal and expected, but when i try to set the other state of the object by doing
setMyState({...myState, bulb2state: false})
//My state now becomes {bulb1state: …Run Code Online (Sandbox Code Playgroud)