小编ola*_*mii的帖子

如何使 HTML() 小部件中的 html 可选

我有一个 flutter 博客应用程序,我正在使用这个来呈现博客 HTML 内容,我希望这个内容是可选择的,我知道SelectableText()小部件,但这不能用于呈现 HTML。

Anyone has an idea how I can make my HTML text selectable from mobile?

mobile dart flutter

5
推荐指数
1
解决办法
398
查看次数

Using useState() with an object as state

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)

javascript reactjs

1
推荐指数
1
解决办法
42
查看次数

标签 统计

dart ×1

flutter ×1

javascript ×1

mobile ×1

reactjs ×1