Skip to content

web app, import amplify_storage_s3.dart cause drift-2.14.1/lib/src/web/wasm_setup/shared.dart The argument type 'LegacySyncFileHandle' can't be assigned to the parameter type 'Object' because 'LegacySyncFileHandle' is nullable and 'Object' isn't. #4874

@minganp

Description

@minganp

Description

After import 'package:amplify_storage_s3/amplify_storage_s3.dart' for a flutter web project, When run it , it cause an error: Waiting for connection from debug service on Chrome...
../../../AppData/Local/Pub/Cache/hosted/pub.dev/drift-2.14.1/lib/src/web/wasm_setup/shared.dart:40:47: Error: The argument type 'LegacySyncFileHandle' can't be assigned to the parameter type 'Object' because 'LegacySyncFileHandle' is nullable and 'Object' isn't.

  • 'Object' is from 'dart:core'.
    final getSizeResult = callMethod<Object?>(openedFile, 'getSize', []);

Categories

  • Analytics
  • API (REST)
  • API (GraphQL)
  • Auth
  • Authenticator
  • DataStore
  • Notifications (Push)
  • Storage

Steps to Reproduce

  1. yaml add: amplify_flutter: 2.0.0 amplify_storage_s3: 2.0.0 aws_common: ^0.7.0 or 1.8.0 or 1.6.0,
  2. import 'package:amplify_storage_s3/amplify_storage_s3.dart'; in dart file
  3. run with chrome

Screenshots

Screenshot 2024-05-11 214848

Platforms

  • iOS
  • Android
  • Web
  • macOS
  • Windows
  • Linux

Flutter Version

3.19.3

Amplify Flutter Version

1.6.0, 1.8.0, or 2.0.0

Deployment Method

Amplify CLI

Schema

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething is not working; the issue has reproducible steps and has been reproducedcoreIssues related to the Amplify Core Pluginpending-community-responsePending response from the issue opener or other community members

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions