Imgkl / davinci

A flutter package to convert any widget to an Image.

Home Page:https://pub.dev/packages/davinci

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Error: Undefined name 'View'.

this-kin opened this issue · comments

Using davinci and Flutter version 3.7.0 (FVM) I'm getting this error undefined name "View"

Output
Launching lib\main.dart on TECNO KD7 in debug mode...
main.dart:1
: Error: Undefined name 'View'.
davinci_capture.dart:31
pixelRatio ??= View.of(context).devicePixelRatio;
^^^^
: Error: Undefined name 'View'.
davinci_capture.dart:80
View.of(context).physicalSize / View.of(context).devicePixelRatio;

    ^^^^

: Error: Undefined name 'View'.
davinci_capture.dart:80
View.of(context).physicalSize / View.of(context).devicePixelRatio;

                                    ^^^^

: Error: Undefined name 'View'.
davinci_capture.dart:81
pixelRatio ??= View.of(context).devicePixelRatio;

               ^^^^

: Error: Undefined name 'View'.
davinci_capture.dart:84
view: View.of(context),

          ^^^^

: Error: No named parameter with the name 'view'.
davinci_capture.dart:84
view: View.of(context),
^^^^
: Context: Found this candidate, but the arguments don't match.
view.dart:68
RenderView({
^^^^^^^^^^
Target kernel_snapshot failed: Exception
2

FAILURE: Build failed with an exception.

  • Where:
    Script 'C:\Users\Dammy Richie\fvm\versions\3.7.0\packages\flutter_tools\gradle\flutter.gradle' line: 1151

  • What went wrong:
    Execution failed for task ':app:compileFlutterBuildDebug'.

Process 'command 'C:\Users\Dammy Richie\fvm\versions\3.7.0\bin\flutter.bat'' finished with non-zero exit value 1

  • Try:

Run with --stacktrace option to get the stack trace.
Run with --info or --debug option to get more log output.
Run with --scan to get full insights.

BUILD FAILED in 14s
Exception: Gradle task assembleDebug failed with exit code 1
Exited (sigterm)

@this-kin Can you share a small snippet in which I can reproduce this error?

Oh, the issue was made a long time ago, I don't think I can remember the step, I'm gonna go ahead and close the issue now.