showConnectDialog method
- {required BuildContext context,
- required WidgetRef ref,
- required AppModel appModel}
Dialog for menu action.
Implementation
void showConnectDialog(
{required BuildContext context,
required WidgetRef ref,
required AppModel appModel}) async {
if (isActive) {
showDisconnectPrompt(
context: context,
ref: ref,
appModel: appModel,
);
} else {
await showDialog(
context: context,
builder: (context) => WebsocketDialogPage(
address: lastAddress,
onConnect: (address) {
Navigator.pop(context);
setLastAddress(address);
setServerAddress(
address: address,
);
mediaType.refreshTab();
_controller.add(null);
},
),
);
}
}