Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import 'dart:io';
import 'package:ffi/ffi.dart';
import 'package:win32/win32.dart';

class LANGANDCODEPAGE extends Struct {
base class LANGANDCODEPAGE extends Struct {
@WORD()
external int wLanguage;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import 'dart:convert';
import 'dart:html';

import 'package:flutter_web_plugins/flutter_web_plugins.dart';
import 'package:http/http.dart';
import 'package:package_info_plus_platform_interface/package_info_data.dart';
import 'package:package_info_plus_platform_interface/package_info_platform_interface.dart';
import 'package:web/helpers.dart' as web;

/// The web implementation of [PackageInfoPlatform].
///
Expand Down Expand Up @@ -51,8 +51,8 @@ class PackageInfoPlusWebPlugin extends PackageInfoPlatform {
@override
Future<PackageInfoData> getAll() async {
final cacheBuster = DateTime.now().millisecondsSinceEpoch;
final url = versionJsonUrl(window.document.baseUri!, cacheBuster);
final response = _client == null ? await get(url) : await _client!.get(url);
final url = versionJsonUrl(web.window.document.baseURI, cacheBuster);
final response = _client == null ? await get(url) : await _client.get(url);
final versionMap = _getVersionMap(response);

return PackageInfoData(
Expand Down
5 changes: 3 additions & 2 deletions packages/package_info_plus/package_info_plus/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ dependencies:
meta: ^1.8.0
path: ^1.8.2
package_info_plus_platform_interface: ^2.0.1
web: '>=0.3.0 <0.5.0'

# win32 is compatible across v4 and v5 for Win32 only (not COM)
win32: ">=4.0.0 <6.0.0"
Expand All @@ -44,5 +45,5 @@ dev_dependencies:
test: ^1.22.0

environment:
sdk: ">=2.18.0 <4.0.0"
flutter: ">=3.3.0"
Comment thread
kevmoo marked this conversation as resolved.
sdk: ^3.2.0
flutter: '>=3.6.0'