onestudio-co / flutter_ninepatch_image

MIT License
10 stars 4 forks source link

Running the example application is giving me this error and build is not successfully built #2

Closed AhmadIzaz closed 1 month ago

AhmadIzaz commented 1 month ago

Warning: Mapping new ns http://schemas.android.com/repository/android/common/02 to old ns http://schemas.android.com/repository/android/common/01 Warning: Mapping new ns http://schemas.android.com/repository/android/generic/02 to old ns http://schemas.android.com/repository/android/generic/01 Warning: Mapping new ns http://schemas.android.com/sdk/android/repo/addon2/02 to old ns http://schemas.android.com/sdk/android/repo/addon2/01 Warning: Mapping new ns http://schemas.android.com/sdk/android/repo/addon2/03 to old ns http://schemas.android.com/sdk/android/repo/addon2/01 Warning: Mapping new ns http://schemas.android.com/sdk/android/repo/repository2/02 to old ns http://schemas.android.com/sdk/android/repo/repository2/01 Warning: Mapping new ns http://schemas.android.com/sdk/android/repo/repository2/03 to old ns http://schemas.android.com/sdk/android/repo/repository2/01 Warning: Mapping new ns http://schemas.android.com/sdk/android/repo/sys-img2/04 to old ns http://schemas.android.com/sdk/android/repo/sys-img2/01 Warning: Mapping new ns http://schemas.android.com/sdk/android/repo/sys-img2/03 to old ns http://schemas.android.com/sdk/android/repo/sys-img2/01 Warning: Mapping new ns http://schemas.android.com/sdk/android/repo/sys-img2/02 to old ns http://schemas.android.com/sdk/android/repo/sys-img2/01 ../../../../.pub-cache/hosted/pub.dev/image_pixels-2.0.2/lib/src/image_pixels.dart:273:27: Error: The method 'load' isn't defined for the class 'ImageProvider'.

  • 'ImageProvider' is from 'package:flutter/src/painting/image_provider.dart' ('../../../../flutter/packages/flutter/lib/src/painting/image_provider.dart').
  • 'Object' is from 'dart:core'. Try correcting the name to the name of an existing method, or defining a method named 'load'. () => imageProvider.load(key, _decoder), // loader ^^^^ ../../../../.pub-cache/hosted/pub.dev/image_pixels-2.0.2/lib/src/image_pixels.dart:305:12: Error: The method 'instantiateImageCodec' isn't defined for the class 'PaintingBinding'.
  • 'PaintingBinding' is from 'package:flutter/src/painting/binding.dart' ('../../../../flutter/packages/flutter/lib/src/painting/binding.dart'). Try correcting the name to the name of an existing method, or defining a method named 'instantiateImageCodec'. .instantiateImageCodec(bytes, cacheWidth: cacheWidth, cacheHeight: cacheHeight); ^^^^^^^^^^^^^^^^^^^^^ Target kernel_snapshot failed: Exception

FAILURE: Build failed with an exception.

MohammedAlimoor commented 1 month ago

thanks to report this issue

it's fixed :)

please update to latest version

dependencies:
  ninepatch_image: ^0.0.4