I tried to use Modal from iced_aw 0.7.0 like it’s described in the documentation, but it isn’t working.
The documentation tells me, it only needs two arguments (1 underlay and 1 overlay), but also talks about an “state”. I don’t know where to store, access and give that “state”-argument. So the situation now is, that modals are always open and never close.
The state argument remains from the docs of iced_aw 0.2.0 (see Modal in iced_aw::native::modal - Rust). The documentation should be updated. Did you try giving a Message to Modal::on_esc so it knows what to do on escape?
I think you misunderstood what @thunderstorm010 is saying. Here he says that the documentation is outdated and does not correspond to the function’s prototype. The second argument is no longer a closure taking a state as in 0.2.0.
To get it working with the iced_aw Modal (the only way, I get it at least) is the way in your example. To thanks for that. I’m not satisfied with it, but after all it is working atm.