diff --git a/CHANGELOG.md b/CHANGELOG.md index b137eccb3..c538f7992 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,9 +1,10 @@ -## [5.0.0-release-candidate-11] +## [5.0.0-release-candidate-9.2] -- Add canPop to GetPage +- Remove dart:html references -## [5.0.0-release-candidate-10] +## [5.0.0-release-candidate-9.1] +- Add canPop to GetPage - Fix Get.offNamedUntil - Fix GetObserver diff --git a/lib/get_connect/http/src/http/request/http_request.dart b/lib/get_connect/http/src/http/request/http_request.dart index 76ee90ace..baa212e56 100644 --- a/lib/get_connect/http/src/http/request/http_request.dart +++ b/lib/get_connect/http/src/http/request/http_request.dart @@ -1,6 +1,6 @@ import '../../certificates/certificates.dart'; import '../stub/http_request_stub.dart' - if (dart.library.html) '../html/http_request_html.dart' + if (dart.library.js_interop) '../html/http_request_html.dart' if (dart.library.io) '../io/http_request_io.dart'; HttpRequestImpl createHttp({ diff --git a/lib/get_connect/http/src/multipart/multipart_file.dart b/lib/get_connect/http/src/multipart/multipart_file.dart index 3e0704b35..ad8dd764b 100644 --- a/lib/get_connect/http/src/multipart/multipart_file.dart +++ b/lib/get_connect/http/src/multipart/multipart_file.dart @@ -1,5 +1,5 @@ import '../http/stub/file_decoder_stub.dart' - if (dart.library.html) '../http/html/file_decoder_html.dart' + if (dart.library.js_interop) '../http/html/file_decoder_html.dart' if (dart.library.io) '../http/io/file_decoder_io.dart'; import '../request/request.dart'; diff --git a/lib/get_connect/sockets/sockets.dart b/lib/get_connect/sockets/sockets.dart index 5dcbe6aa3..1c0a3194a 100644 --- a/lib/get_connect/sockets/sockets.dart +++ b/lib/get_connect/sockets/sockets.dart @@ -1,5 +1,5 @@ import 'src/sockets_stub.dart' - if (dart.library.html) 'src/sockets_html.dart' + if (dart.library.js_interop) 'src/sockets_html.dart' if (dart.library.io) 'src/sockets_io.dart'; class GetSocket extends BaseWebSocket { diff --git a/lib/get_navigation/src/routes/url_strategy/io/io_url.dart b/lib/get_navigation/src/routes/url_strategy/impl/io_url.dart similarity index 100% rename from lib/get_navigation/src/routes/url_strategy/io/io_url.dart rename to lib/get_navigation/src/routes/url_strategy/impl/io_url.dart diff --git a/lib/get_navigation/src/routes/url_strategy/impl/stub_url.dart b/lib/get_navigation/src/routes/url_strategy/impl/stub_url.dart new file mode 100644 index 000000000..866df3ba9 --- /dev/null +++ b/lib/get_navigation/src/routes/url_strategy/impl/stub_url.dart @@ -0,0 +1,3 @@ +void removeHash() { + throw UnimplementedError(); +} diff --git a/lib/get_navigation/src/routes/url_strategy/web/web_url.dart b/lib/get_navigation/src/routes/url_strategy/impl/web_url.dart similarity index 100% rename from lib/get_navigation/src/routes/url_strategy/web/web_url.dart rename to lib/get_navigation/src/routes/url_strategy/impl/web_url.dart diff --git a/lib/get_navigation/src/routes/url_strategy/url_strategy.dart b/lib/get_navigation/src/routes/url_strategy/url_strategy.dart index 544b15a99..22d073e37 100644 --- a/lib/get_navigation/src/routes/url_strategy/url_strategy.dart +++ b/lib/get_navigation/src/routes/url_strategy/url_strategy.dart @@ -1,4 +1,6 @@ -import 'web/web_url.dart' if (dart.library.io) 'io/io_url.dart'; +import 'impl/stub_url.dart' + if (dart.library.js_interop) 'impl/web_url.dart' + if (dart.library.io) 'impl/io_url.dart'; void setUrlStrategy() { removeHash(); diff --git a/lib/get_utils/src/platform/platform.dart b/lib/get_utils/src/platform/platform.dart index 63dc201cb..12ab97dc9 100644 --- a/lib/get_utils/src/platform/platform.dart +++ b/lib/get_utils/src/platform/platform.dart @@ -1,4 +1,6 @@ -import 'platform_web.dart' if (dart.library.io) 'platform_io.dart'; +import 'platform_stub.dart' + if (dart.library.js_interop) 'platform_web.dart' + if (dart.library.io) 'platform_io.dart'; // ignore: avoid_classes_with_only_static_members class GetPlatform { diff --git a/lib/get_utils/src/platform/platform_stub.dart b/lib/get_utils/src/platform/platform_stub.dart new file mode 100644 index 000000000..f4c8f6a9a --- /dev/null +++ b/lib/get_utils/src/platform/platform_stub.dart @@ -0,0 +1,17 @@ +class GeneralPlatform { + static bool get isWeb => throw UnimplementedError(); + + static bool get isMacOS => throw UnimplementedError(); + + static bool get isWindows => throw UnimplementedError(); + + static bool get isLinux => throw UnimplementedError(); + + static bool get isAndroid => throw UnimplementedError(); + + static bool get isIOS => throw UnimplementedError(); + + static bool get isFuchsia => throw UnimplementedError(); + + static bool get isDesktop => throw UnimplementedError(); +} diff --git a/pubspec.yaml b/pubspec.yaml index d78dcb2d3..53f738eac 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,6 +1,6 @@ name: get description: Open screens/snackbars/dialogs without context, manage states and inject dependencies easily with GetX. -version: 5.0.0-release-candidate-11 +version: 5.0.0-release-candidate-9.2 homepage: https://github.com/jonataslaw/getx environment: