Skip to content

Commit

Permalink
Merge pull request #3198 from jonataslaw/stub-all
Browse files Browse the repository at this point in the history
stub-all
  • Loading branch information
jonataslaw authored Aug 29, 2024
2 parents 5db4322 + c58041a commit 9d3270e
Show file tree
Hide file tree
Showing 11 changed files with 34 additions and 9 deletions.
7 changes: 4 additions & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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

Expand Down
2 changes: 1 addition & 1 deletion lib/get_connect/http/src/http/request/http_request.dart
Original file line number Diff line number Diff line change
@@ -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({
Expand Down
2 changes: 1 addition & 1 deletion lib/get_connect/http/src/multipart/multipart_file.dart
Original file line number Diff line number Diff line change
@@ -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';

Expand Down
2 changes: 1 addition & 1 deletion lib/get_connect/sockets/sockets.dart
Original file line number Diff line number Diff line change
@@ -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 {
Expand Down
3 changes: 3 additions & 0 deletions lib/get_navigation/src/routes/url_strategy/impl/stub_url.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
void removeHash() {
throw UnimplementedError();
}
4 changes: 3 additions & 1 deletion lib/get_navigation/src/routes/url_strategy/url_strategy.dart
Original file line number Diff line number Diff line change
@@ -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();
Expand Down
4 changes: 3 additions & 1 deletion lib/get_utils/src/platform/platform.dart
Original file line number Diff line number Diff line change
@@ -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 {
Expand Down
17 changes: 17 additions & 0 deletions lib/get_utils/src/platform/platform_stub.dart
Original file line number Diff line number Diff line change
@@ -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();
}
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
@@ -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:
Expand Down

0 comments on commit 9d3270e

Please sign in to comment.