builttoroam / device_calendar

A cross platform plugin for modifying calendars on the user's device
https://pub.dev/packages/device_calendar
BSD 3-Clause "New" or "Revised" License
259 stars 258 forks source link

Unable to run the app due to dart:html package #462

Closed fasikawsow closed 1 year ago

fasikawsow commented 1 year ago

I used device_calendar: ^4.2.0 to add event to local mobile device calendar,

But I can't run the app, when I try to run the app I face the following error.

/C:/Users/fasik/AppData/Local/Pub/Cache/hosted/pub.dartlang.org/timezone-0.8.0/lib/browser.dart:16:8: Error: Not found: 'dart:html'
import 'dart:html';
       ^

/C:/Users/fasik/AppData/Local/Pub/Cache/hosted/pub.dartlang.org/timezone-0.8.0/lib/browser.dart:47:10: Error: Undefined name 'HttpRequest'.
  return HttpRequest.request(path,
         ^^^^^^^^^^^

flutter doctor -v

[✓] Flutter (Channel stable, 2.10.4, on Microsoft Windows [Version 10.0.22000.1219], locale en-US)
    • Flutter version 2.10.4 at C:\src\flutter
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision c860cba910 (9 months ago), 2022-03-25 00:23:12 -0500
    • Engine revision 57d3bac3dd
    • Dart version 2.16.2
    • DevTools version 2.9.2

[✓] Android toolchain - develop for Android devices (Android SDK version 33.0.0)
    • Android SDK at C:\Users\fasik\AppData\Local\Android\sdk
    • Platform android-TiramisuPrivacySandbox, build-tools 33.0.0
    • Java binary at: C:\Program Files\Android\Android Studio\jre\bin\java
    • Java version OpenJDK Runtime Environment (build 11.0.12+7-b1504.28-7817840)
    • All Android licenses accepted.

[✓] Chrome - develop for the web
    • Chrome at C:\Program Files\Google\Chrome\Application\chrome.exe

[✓] Visual Studio - develop for Windows (Visual Studio Community 2022 17.4.2)
    • Visual Studio at C:\Program Files\Microsoft Visual Studio\2022\Community
    • Visual Studio Community 2022 version 17.4.33122.133
    • Windows 10 SDK version 10.0.22000.0

[✓] Android Studio (version 2021.2)
    • Android Studio at C:\Program Files\Android\Android Studio
    • Flutter plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/6351-dart
    • Java version OpenJDK Runtime Environment (build 11.0.12+7-b1504.28-7817840)

[✓] VS Code (version 1.73.1)
    • VS Code at C:\Users\fasik\AppData\Local\Programs\Microsoft VS Code
    • Flutter extension version 3.54.0

[✓] Connected device (3 available)
    • Windows (desktop) • windows • windows-x64    • Microsoft Windows [Version 10.0.22000.1219]
    • Chrome (web)      • chrome  • web-javascript • Google Chrome 108.0.5359.71
    • Edge (web)        • edge    • web-javascript • Microsoft Edge 107.0.1418.62

[✓] HTTP Host Availability
    • All required HTTP hosts are available

• No issues found!

What can be the issue? how to resolve this?

IVLIVS-III commented 1 year ago

please provide the output of flutter doctor -v

thomassth commented 1 year ago

Try grabbing the release branch and test it. It's supposed to be a 4.3 release.

fasikawsow commented 1 year ago

please provide the output of flutter doctor -v

I have added the result of flutter doctor -v

IVLIVS-III commented 1 year ago

@fasikawsow I see that you are still on flutter version 2.x (from 9 months ago). The missing package is dart:html. This package is bundled with flutter directly, or at least later versions if flutter.

Can you try upgrading flutter to the latest version (3.3.9 I think) by running flutter upgrade.

sowens-csd commented 1 year ago

Given the lack of response since December I'll assume this is closed. Please post a new issue if you're still having problems.