Skip to content

Commit

Permalink
Fix Error: Not found: 'dart:js' error. Fixes #292.
Browse files Browse the repository at this point in the history
  • Loading branch information
jonbhanson committed Feb 15, 2022
1 parent 92d9514 commit 6000365
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 3 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
## [2.0.4] - (2022-Feb-15)
* Fix Error: Not found: 'dart:js' error. Fixes [#292](https://github.com/jonbhanson/flutter_native_splash/issues/292).

## [2.0.3+1] - (2022-Feb-14)
* Added preserve() and remove() methods.
* Remove splash from DOM in web.
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ First, add `flutter_native_splash` as a dependency in your pubspec.yaml file.

```yaml
dependencies:
flutter_native_splash: ^2.0.3+1
flutter_native_splash: ^2.0.4
```

Don't forget to `flutter pub get`.
Expand Down
2 changes: 1 addition & 1 deletion lib/flutter_native_splash.dart
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ library flutter_native_splash;

import 'package:flutter/foundation.dart';
import 'package:flutter/widgets.dart';
import 'package:flutter_native_splash/remove_splash_from_web.dart';
import 'package:flutter_native_splash/remove_splash.dart';

class FlutterNativeSplash {
static void removeAfter(Function initializeFunction) {
Expand Down
2 changes: 2 additions & 0 deletions lib/remove_splash.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
export 'remove_splash_from_web.dart'
if (dart.library.io) 'remove_splash_non_web.dart';
4 changes: 4 additions & 0 deletions lib/remove_splash_non_web.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
void removeSplashFromWeb() {
// You can remove the below line below and include your own implementation if you need
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: flutter_native_splash
description: Customize Flutter's default white native splash screen with background color and splash image. Supports dark mode, full screen, and more.
version: 2.0.3+1
version: 2.0.4
homepage: https://github.com/jonbhanson/flutter_native_splash

environment:
Expand Down

0 comments on commit 6000365

Please sign in to comment.