From 122731ac5029eb82dace1c406ace5df18d9bd54f Mon Sep 17 00:00:00 2001 From: Marco Date: Sun, 29 Jan 2023 21:09:18 +0100 Subject: [PATCH] Remove html depencencies and alway connecto to remote server. --- lib/connection/ws_connection.dart | 8 ++------ lib/main.dart | 3 --- pubspec.lock | 4 ++-- 3 files changed, 4 insertions(+), 11 deletions(-) diff --git a/lib/connection/ws_connection.dart b/lib/connection/ws_connection.dart index e433bda..86a2e1b 100644 --- a/lib/connection/ws_connection.dart +++ b/lib/connection/ws_connection.dart @@ -34,12 +34,8 @@ class ServerConnection { void connect() { if (wasConnected) channel.sink.close(); - if (kDebugMode) { - channel = WebSocketChannel.connect(Uri.parse('ws://localhost:8080')); - } else { - channel = - WebSocketChannel.connect(Uri.parse('wss://chess.sw-gross.de:8080')); - } + channel = + WebSocketChannel.connect(Uri.parse('wss://chess.sw-gross.de:8080')); log(channel.closeCode.toString()); diff --git a/lib/main.dart b/lib/main.dart index 1beab70..34e0a50 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -1,9 +1,6 @@ -import 'package:flutter/foundation.dart'; import 'package:flutter/material.dart'; -import 'package:flutter_web_plugins/flutter_web_plugins.dart'; import 'package:mchess/chess/chess_app.dart'; void main() { - if (kIsWeb) setUrlStrategy(PathUrlStrategy()); runApp(const ChessApp()); } diff --git a/pubspec.lock b/pubspec.lock index 580d0a8..95b9145 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -273,10 +273,10 @@ packages: dependency: transitive description: name: test_api - sha256: c9282698e2982b6c3817037554e52f99d4daba493e8028f8112a83d68ccd0b12 + sha256: "6182294da5abf431177fccc1ee02401f6df30f766bc6130a0852c6b6d7ee6b2d" url: "https://pub.dev" source: hosted - version: "0.4.17" + version: "0.4.18" typed_data: dependency: transitive description: