Skip to content

Commit

Permalink
loosen web package dependency constraints (#518)
Browse files Browse the repository at this point in the history
  • Loading branch information
a-h-mzd authored Aug 14, 2024
1 parent 5852c92 commit 59d0810
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 13 deletions.
2 changes: 0 additions & 2 deletions example/lib/toast_context.dart
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
import 'dart:async';

import 'package:fluttertoast_example/main.dart';
import 'package:flutter/material.dart';
import 'package:fluttertoast/fluttertoast.dart';
Expand Down
12 changes: 6 additions & 6 deletions example/pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -45,10 +45,10 @@ packages:
dependency: "direct main"
description:
name: cupertino_icons
sha256: e35129dc44c9118cee2a5603506d823bab99c68393879edb440e0090d07586be
sha256: ba631d1c7f7bef6b729a622b7b752645a2d076dba9976925b8f25725a30e1ee6
url: "https://pub.dev"
source: hosted
version: "1.0.5"
version: "1.0.8"
fake_async:
dependency: transitive
description:
Expand Down Expand Up @@ -78,7 +78,7 @@ packages:
path: ".."
relative: true
source: path
version: "8.2.5"
version: "8.2.6"
leak_tracker:
dependency: transitive
description:
Expand Down Expand Up @@ -208,10 +208,10 @@ packages:
dependency: transitive
description:
name: web
sha256: "97da13628db363c635202ad97068d47c5b8aa555808e7a9411963c533b449b27"
sha256: d43c1d6b787bf0afad444700ae7f4db8827f701bc61c255ac8d328c6f4d52062
url: "https://pub.dev"
source: hosted
version: "0.5.1"
version: "1.0.0"
sdks:
dart: ">=3.3.0 <4.0.0"
dart: ">=3.4.0 <4.0.0"
flutter: ">=3.18.0-18.0.pre.54"
3 changes: 2 additions & 1 deletion lib/fluttertoast_web.dart
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import 'dart:async';
import 'dart:js_interop';
import 'package:web/web.dart' as web;
import 'dart:ui_web' as ui;
import 'package:flutter/services.dart';
Expand Down Expand Up @@ -124,7 +125,7 @@ class FluttertoastWebPlugin {
}
final web.HTMLScriptElement scriptText = web.HTMLScriptElement()
..id = "toast-content"
..innerHTML = content;
..innerHTML = content.toJS;

This comment has been minimized.

Copy link
@tushar-asodariya

tushar-asodariya Aug 14, 2024

Contributor

this is causing error Error: A value of type 'JSString' can't be assigned to a variable of type 'String'.

web.document.body!.append(scriptText);
if (textColor != null) {
web.Element toast = web.document.querySelector('.toastify')!;
Expand Down
6 changes: 3 additions & 3 deletions pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -60,10 +60,10 @@ packages:
dependency: "direct main"
description:
name: web
sha256: "97da13628db363c635202ad97068d47c5b8aa555808e7a9411963c533b449b27"
sha256: d43c1d6b787bf0afad444700ae7f4db8827f701bc61c255ac8d328c6f4d52062
url: "https://pub.dev"
source: hosted
version: "0.5.1"
version: "1.0.0"
sdks:
dart: ">=3.3.0 <4.0.0"
dart: ">=3.4.0 <4.0.0"
flutter: ">=1.10.0"
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ dependencies:
sdk: flutter
flutter_web_plugins:
sdk: flutter
web: ^0.5.1
web: ">=0.5.1 <2.0.0"

flutter:
plugin:
Expand Down

0 comments on commit 59d0810

Please sign in to comment.