Apparence-io / CamerAwesome

📸 Embedding a camera experience within your own app shouldn't be that hard. A flutter plugin to integrate awesome Android / iOS camera experience.
https://ApparenceKit.dev
MIT License
959 stars 247 forks source link

1.2.1 - Types not found - `Size` and `Offset` #262

Closed tapvt closed 1 year ago

tapvt commented 1 year ago

Steps to Reproduce

Updated app to v1.2.1 of CamerAwesome so that Android 13 / API 33 will work. Used stub code, to just display the built-in interface.

Attempted build.

Expected results

App should build.

Actual results

App does not build.

Running Gradle task 'assembleDebug'...
/C:/Android/flutter/.pub-cache/hosted/pub.dartlang.org/camerawesome-1.2.1/lib/camerawesome_plugin.dart:167:22: Error: Type 'Size' not found.
  static Future<List<Size>> getSizes() async {
                     ^^^^
/C:/Android/flutter/.pub-cache/hosted/pub.dartlang.org/camerawesome-1.2.1/lib/camerawesome_plugin.dart:257:51: Error: Type 'Offset' not found.
      {required PreviewSize previewSize, required Offset position}) {
                                                  ^^^^^^
/C:/Android/flutter/.pub-cache/hosted/pub.dartlang.org/camerawesome-1.2.1/lib/camerawesome_plugin.dart:171:21: Error: Method not found: 'Size'.
        .map((e) => Size(e.width, e.height))
                    ^^^^
/C:/Android/flutter/.pub-cache/hosted/pub.dartlang.org/camerawesome-1.2.1/lib/camerawesome_plugin.dart:257:51: Error: 'Offset' isn't a type.
      {required PreviewSize previewSize, required Offset position}) {

About your device

Brand Model OS
Samsung S21 13 / 33
Emulator ANY ANY

Your flutter version

Flutter 3.0.2 • channel stable • https://github.com/flutter/flutter.git
Framework • revision cd41fdd495 (9 months ago) • 2022-06-08 09:52:13 -0700
Engine • revision f15f824b57
Tools • Dart 2.17.3 • DevTools 2.12.2

g-apparence commented 1 year ago

Could you give us a gist of your code so we can reproduce it? Do you have the same result running one of our example?

I have the feeling that you are using another package that has a conflict with flutter size type definition. Le 3 mars 2023, 20:19 +0100, Ben Weller @.***>, a écrit :

Steps to Reproduce Updated app to v1.2.1 of CamerAwesome so that Android 13 / API 33 will work. Used stub code, to just display the built-in interface. Attempted build. Expected results App should build. Actual results App does not build. Running Gradle task 'assembleDebug'...

/C:/Android/flutter/.pub-cache/hosted/pub.dartlang.org/camerawesome-1.2.1/lib/camerawesome_plugin.dart:167:22: Error: Type 'Size' not found.

static Future<List> getSizes() async {

                ^^^^

/C:/Android/flutter/.pub-cache/hosted/pub.dartlang.org/camerawesome-1.2.1/lib/camerawesome_plugin.dart:257:51: Error: Type 'Offset' not found.

 {required PreviewSize previewSize, required Offset position}) {

                                             ^^^^^^

/C:/Android/flutter/.pub-cache/hosted/pub.dartlang.org/camerawesome-1.2.1/lib/camerawesome_plugin.dart:171:21: Error: Method not found: 'Size'.

   .map((e) => Size(e.width, e.height))

               ^^^^

/C:/Android/flutter/.pub-cache/hosted/pub.dartlang.org/camerawesome-1.2.1/lib/camerawesome_plugin.dart:257:51: Error: 'Offset' isn't a type.

 {required PreviewSize previewSize, required Offset position}) {

About your device Brand Model OS Samsung S21 13 / 33 Emulator ANY ANY Your flutter version Flutter 3.0.2 • channel stable • https://github.com/flutter/flutter.git

Framework • revision cd41fdd495 (9 months ago) • 2022-06-08 09:52:13 -0700

Engine • revision f15f824b57

Tools • Dart 2.17.3 • DevTools 2.12.2

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you are subscribed to this thread.Message ID: @.***>

tapvt commented 1 year ago

@g-apparence - Thanks for the response.

I've created a new app without any of the other dependencies of the previously mentioned application. The only release dependencies are cupertino_icons, camerawesome, path_provider, and better_open_file. (Based on the example)

I continue to have the missing types / methods.

/C:/Android/flutter/.pub-cache/hosted/pub.dartlang.org/camerawesome-1.2.1/lib/camerawesome_plugin.dart:167:22: Error: Type 'Size' not found.
  static Future<List<Size>> getSizes() async {
                     ^^^^
/C:/Android/flutter/.pub-cache/hosted/pub.dartlang.org/camerawesome-1.2.1/lib/camerawesome_plugin.dart:257:51: Error: Type 'Offset' not found.
      {required PreviewSize previewSize, required Offset position}) {
                                                  ^^^^^^
/C:/Android/flutter/.pub-cache/hosted/pub.dartlang.org/camerawesome-1.2.1/lib/camerawesome_plugin.dart:171:21: Error: Method not found: 'Size'.
        .map((e) => Size(e.width, e.height))
                    ^^^^
/C:/Android/flutter/.pub-cache/hosted/pub.dartlang.org/camerawesome-1.2.1/lib/camerawesome_plugin.dart:257:51: Error: 'Offset' isn't a type.
      {required PreviewSize previewSize, required Offset position}) {
                                                  ^^^^^^

The repository is here: https://github.com/e9labs/camerawesome_only_test

Appreciate any insight you may have.

tapvt commented 1 year ago

@g-apparence - I updated to Flutter 3.7.6, and no longer have the issue. Thanks for your time. Closing.