SnapModel: toggle connections correctly
Here the connections that are established for the corresponding snap are loaded
https://github.com/ubuntu-flutter-community/software/blob/8af4ad3dd648c42e240b2d50382f2df3eaea2f24/lib/store_app/common/snap_model.dart#L330-L345
I tried to toggle a connection on and off and get the connections for this snap again but load the ones that are established and not established but the not established / un-toggled connections were not discoverable (for me).
We've spoke about this on Telegram before @robert-ancell - could you look at this again and give a hint how to solve this?
Connect / disconnect works fine
https://github.com/ubuntu-flutter-community/software/blob/8af4ad3dd648c42e240b2d50382f2df3eaea2f24/lib/store_app/common/snap_model.dart#L304-L328
But currently the switches do nothing because toggling a connection off would remove them from the list and make them dissappear "forever" in the view.
I think what you need is https://github.com/canonical/snapd.dart/pull/67 - then you can use _client.getConnections(filter: SnapdConnectionFilter.all).
This might also help https://github.com/canonical/snapd.dart/pull/68
Uh, thank you! I'll try this :)