Hello, I am new to Amity, and I have been trying to integrate the Flutter Amity SDK UI Kit on a new Flutter project. No dependencies, just amity_uikit_beta_service.
But, I can’t seem to get past these errors, possibly because of dependency issues:
My Flutter environment sdk is ‘>=3.2.3 <4.0.0’.
Errors:
../../../.pub-cache/hosted/pub.dev/extended_image-6.4.1/lib/src/gesture/page_view/gesture_page_view.dart:21:49: Error: Required named parameter 'devicePixelRatio' must be provided.
final PageMetrics _testPageMetrics = PageMetrics(
^
../../../Development/flutter/packages/flutter/lib/src/widgets/page_view.dart:258:3: Context: Found this candidate, but the arguments don't match.
PageMetrics({
^^^^^^^^^^^
../../../.pub-cache/hosted/pub.dev/extended_image-6.4.1/lib/src/gesture/page_view/widgets/scroll_position.dart:213:15: Error: The method 'ExtendedPagePosition.copyWith' doesn't have the named parameter 'devicePixelRatio' of overridden method 'ViewportOffset with ScrollMetrics.copyWith'.
PageMetrics copyWith({
^
../../../Development/flutter/packages/flutter/lib/src/widgets/scroll_position.dart:178:16: Context: This is the overridden method ('copyWith').
abstract class ScrollPosition extends ViewportOffset with ScrollMetrics {
^
../../../.pub-cache/hosted/pub.dev/extended_image-6.4.1/lib/src/gesture/page_view/widgets/scroll_position.dart:213:15: Error: The method 'ExtendedPagePosition.copyWith' has fewer named arguments than those of overridden method 'PageMetrics.copyWith'.
PageMetrics copyWith({
^
../../../Development/flutter/packages/flutter/lib/src/widgets/page_view.dart:269:15: Context: This is the overridden method ('copyWith').
PageMetrics copyWith({
^
../../../.pub-cache/hosted/pub.dev/extended_image-6.4.1/lib/src/gesture/page_view/widgets/scroll_position.dart:213:15: Error: The method 'ExtendedPagePosition.copyWith' doesn't have the named parameter 'devicePixelRatio' of overridden method 'PageMetrics.copyWith'.
PageMetrics copyWith({
^
../../../Development/flutter/packages/flutter/lib/src/widgets/page_view.dart:269:15: Context: This is the overridden method ('copyWith').
PageMetrics copyWith({
^
../../../.pub-cache/hosted/pub.dev/extended_image-6.4.1/lib/src/gesture/page_view/widgets/scroll_position.dart:221:23: Error: Required named parameter 'devicePixelRatio' must be provided.
return PageMetrics(
^
../../../Development/flutter/packages/flutter/lib/src/widgets/page_view.dart:258:3: Context: Found this candidate, but the arguments don't match.
PageMetrics({
^^^^^^^^^^^
../../../.pub-cache/hosted/pub.dev/extended_image-6.4.1/lib/src/gesture_detector/drag.dart:145:3: Error: The superclass, 'OneSequenceGestureRecognizer', has no unnamed constructor that takes no arguments.
ExtendedDragGestureRecognizer({
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
../../../.pub-cache/hosted/pub.dev/extended_image-6.4.1/lib/src/extended_image.dart:975:36: Error: The argument type 'BorderRadius?' can't be assigned to the parameter type 'BorderRadiusGeometry' because 'BorderRadius?' is nullable and 'BorderRadiusGeometry' isn't.
- 'BorderRadius' is from 'package:flutter/src/painting/border_radius.dart' ('../../../Development/flutter/packages/flutter/lib/src/painting/border_radius.dart').
- 'BorderRadiusGeometry' is from 'package:flutter/src/painting/border_radius.dart' ('../../../Development/flutter/packages/flutter/lib/src/painting/border_radius.dart').
borderRadius: widget.borderRadius,
^
../../../.pub-cache/hosted/pub.dev/amity_sdk-0.6.0/lib/src/domain/usecase/notification/unregister_device_notification_usecase.dart:20:13: Error: The method 'NullThrownError' isn't defined for the class 'UnregisterDeviceNotificationUseCase'.
- 'UnregisterDeviceNotificationUseCase' is from 'package:amity_sdk/src/domain/usecase/notification/unregister_device_notification_usecase.dart' ('../../../.pub-cache/hosted/pub.dev/amity_sdk-0.6.0/lib/src/domain/usecase/notification/unregister_device_notification_usecase.dart').
Try correcting the name to the name of an existing method, or defining a method named 'NullThrownError'.
throw NullThrownError();
^^^^^^^^^^^^^^^
../../../.pub-cache/hosted/pub.dev/amity_sdk-0.6.0/lib/src/domain/usecase/notification/register_device_notification_usecase.dart:21:13: Error: The method 'NullThrownError' isn't defined for the class 'RegisterDeviceNotificationUseCase'.
- 'RegisterDeviceNotificationUseCase' is from 'package:amity_sdk/src/domain/usecase/notification/register_device_notification_usecase.dart' ('../../../.pub-cache/hosted/pub.dev/amity_sdk-0.6.0/lib/src/domain/usecase/notification/register_device_notification_usecase.dart').
Try correcting the name to the name of an existing method, or defining a method named 'NullThrownError'.
throw NullThrownError();
^^^^^^^^^^^^^^^
../../../.pub-cache/hosted/pub.dev/amity_sdk-0.6.0/lib/src/domain/usecase/notification/register_device_notification_usecase.dart:29:13: Error: The method 'NullThrownError' isn't defined for the class 'RegisterDeviceNotificationUseCase'.
- 'RegisterDeviceNotificationUseCase' is from 'package:amity_sdk/src/domain/usecase/notification/register_device_notification_usecase.dart' ('../../../.pub-cache/hosted/pub.dev/amity_sdk-0.6.0/lib/src/domain/usecase/notification/register_device_notification_usecase.dart').
Try correcting the name to the name of an existing method, or defining a method named 'NullThrownError'.
throw NullThrownError();
^^^^^^^^^^^^^^^
../../../.pub-cache/hosted/pub.dev/optimized_cached_image-3.0.1/lib/src/image_provider/optimized_cached_image_provider.dart:87:40: Error: Type 'DecoderCallback' not found.
OptimizedCacheImageProvider key, DecoderCallback decode);
^^^^^^^^^^^^^^^
../../../.pub-cache/hosted/pub.dev/optimized_cached_image-3.0.1/lib/src/image_provider/optimized_cached_image_provider.dart:87:40: Error: 'DecoderCallback' isn't a type.
OptimizedCacheImageProvider key, DecoderCallback decode);
^^^^^^^^^^^^^^^
../../../.pub-cache/hosted/pub.dev/optimized_cached_image-3.0.1/lib/src/image_provider/_image_provider_io.dart:72:55: Error: Type 'DecoderCallback' not found.
image_provider.OptimizedCacheImageProvider key, DecoderCallback decode) {
^^^^^^^^^^^^^^^
../../../.pub-cache/hosted/pub.dev/optimized_cached_image-3.0.1/lib/src/image_provider/_image_provider_io.dart:91:5: Error: Type 'DecoderCallback' not found.
DecoderCallback decode,
^^^^^^^^^^^^^^^
../../../.pub-cache/hosted/pub.dev/optimized_cached_image-3.0.1/lib/src/image_provider/_image_provider_io.dart:72:55: Error: 'DecoderCallback' isn't a type.
image_provider.OptimizedCacheImageProvider key, DecoderCallback decode) {
^^^^^^^^^^^^^^^
../../../.pub-cache/hosted/pub.dev/optimized_cached_image-3.0.1/lib/src/image_provider/_image_provider_io.dart:91:5: Error: 'DecoderCallback' isn't a type.
DecoderCallback decode,
^^^^^^^^^^^^^^^
../../../.pub-cache/hosted/pub.dev/flutter_blurhash-0.7.0/lib/src/blurhash_image.dart:32:48: Error: Type 'DecoderCallback' not found.
ImageStreamCompleter load(BlurHashImage key, DecoderCallback decode) => OneFrameImageStreamCompleter(_loadAsync(key));
^^^^^^^^^^^^^^^
../../../.pub-cache/hosted/pub.dev/flutter_blurhash-0.7.0/lib/src/blurhash_image.dart:32:48: Error: 'DecoderCallback' isn't a type.
ImageStreamCompleter load(BlurHashImage key, DecoderCallback decode) => OneFrameImageStreamCompleter(_loadAsync(key));
^^^^^^^^^^^^^^^
../../../.pub-cache/hosted/pub.dev/flutter_blurhash-0.7.0/lib/src/blurhash_widget.dart:218:42: Error: Type 'DecoderCallback' not found.
ImageStreamCompleter load(UiImage key, DecoderCallback decode) => OneFrameImageStreamCompleter(_loadAsync(key));
^^^^^^^^^^^^^^^
../../../.pub-cache/hosted/pub.dev/flutter_blurhash-0.7.0/lib/src/blurhash_widget.dart:218:42: Error: 'DecoderCallback' isn't a type.
ImageStreamCompleter load(UiImage key, DecoderCallback decode) => OneFrameImageStreamCompleter(_loadAsync(key));
^^^^^^^^^^^^^^^
Target kernel_snapshot failed: Exception
FAILURE: Build failed with an exception.