Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error: Getter not found: 'kMinInteractiveSize' #138

Closed
henaffhenaff opened this issue Aug 13, 2019 · 6 comments
Closed

Error: Getter not found: 'kMinInteractiveSize' #138

henaffhenaff opened this issue Aug 13, 2019 · 6 comments

Comments

@henaffhenaff
Copy link

Steps to Reproduce

Just install zefyr package and setup the minimal required to use the editor.

zefyr: ^0.6.0
import 'package:flutter/material.dart';
import 'package:zefyr/zefyr.dart';

class ZefyrScreen extends StatefulWidget {
  @override
  MyWidgetState createState() => MyWidgetState();
}

class MyWidgetState extends State<ZefyrScreen> {
  ZefyrController _controller;
  FocusNode _focusNode;

  @override
  void initState() {
    super.initState();
    // Create an empty document or load existing if you have one.
    // Here we create an empty document:
    final document = new NotusDocument();
    _controller = new ZefyrController(document);
    _focusNode = new FocusNode();
  }

  @override
  Widget build(BuildContext context) {
    return ZefyrScaffold(
      child: ZefyrEditor(
        controller: _controller,
        focusNode: _focusNode,
      ),
    );
  }
}

Logs

Launching lib\main.dart on Android SDK built for x86 in debug mode...
registerResGeneratingTask is deprecated, use registerGeneratedResFolders(FileCollection)
registerResGeneratingTask is deprecated, use registerGeneratedResFolders(FileCollection)
registerResGeneratingTask is deprecated, use registerGeneratedResFolders(FileCollection)

Compiler message:
/C:/flutter/.pub-cache/hosted/pub.dartlang.org/zefyr-0.6.0/lib/src/widgets/selection.dart:425:46: Error: Getter not found: 'kMinInteractiveSize'.
          center: handleRect.center, radius: kMinInteractiveSize / 2),
                                             ^^^^^^^^^^^^^^^^^^^
/C:/flutter/.pub-cache/hosted/pub.dartlang.org/zefyr-0.6.0/lib/src/widgets/selection.dart:425:46: Error: The getter 'kMinInteractiveSize' isn't defined for the class '_SelectionHandleDriverState'.
 - '_SelectionHandleDriverState' is from 'package:zefyr/src/widgets/selection.dart' ('/C:/flutter/.pub-cache/hosted/pub.dartlang.org/zefyr-0.6.0/lib/src/widgets/selection.dart').
Try correcting the name to the name of an existing getter, or defining a getter or field named 'kMinInteractiveSize'.
          center: handleRect.center, radius: kMinInteractiveSize / 2),
                                             ^^^^^^^^^^^^^^^^^^^
Compiler failed on D:\Documents\flutter\issou\fixr_v1\lib\main.dart

FAILURE: Build failed with an exception.

* Where:
Script 'C:\flutter\packages\flutter_tools\gradle\flutter.gradle' line: 765

* What went wrong:
Execution failed for task ':app:compileFlutterBuildDebugX86'.
> Process 'command 'C:\flutter\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.
[√] Flutter (Channel master, v1.8.5-pre.130, on Microsoft Windows [version 10.0.17134.885], locale fr-FR)
    • Flutter version 1.8.5-pre.130 at C:\flutter
    • Framework revision ca5411e3aa (3 hours ago), 2019-08-12 15:21:28 -0700
    • Engine revision ff49ca1c6e
    • Dart version 2.5.0 (build 2.5.0-dev.1.0 f29f41f1a5)


[√] Android toolchain - develop for Android devices (Android SDK version 28.0.3)
    • Android SDK at C:\Users\henaff-desktop\AppData\Local\Android\sdk
    • Android NDK location not configured (optional; useful for native profiling support)
    • Platform android-28, build-tools 28.0.3
    • Java binary at: C:\Program Files\Android\Android Studio\jre\bin\java
    • Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1343-b01)
    • All Android licenses accepted.

[√] Android Studio (version 3.4)
    • Android Studio at C:\Program Files\Android\Android Studio
    • Flutter plugin version 38.1.1
    • Dart plugin version 183.6270
    • Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1343-b01)

[√] VS Code (version 1.37.0)
    • VS Code at C:\Users\henaff-desktop\AppData\Local\Programs\Microsoft VS Code
    • Flutter extension version 3.3.0

[√] Connected device (1 available)
    • Android SDK built for x86 • emulator-5554 • android-x86 • Android 9 (API 28) (emulator)

• No issues found!
@Torrunt
Copy link

Torrunt commented Aug 21, 2019

It seems the const kMinInteractiveSize was changed to kMinInteractiveDimension.

Simply need to update this line:

center: handleRect.center, radius: kMinInteractiveSize / 2),

@namiwang
Copy link

related vendor issue flutter/flutter#36964

@jolancornevin
Copy link
Contributor

@Torrunt is right. Should I (or someone else) open a PR to fix this?

@18337112725
Copy link

@Torrunt is right.

@pulyaevskiy
Copy link
Contributor

Hey everyone. I see this is a breaking change in master channel of Flutter SDK. I'm a bit constrained on amount of time I have to work on Zefyr so I'm considering to only provide support for stable channel of Flutter SDK for now. This will help me to focus on important changes I already have planned for Zefyr.

You are of course free to fork the repo and fix the issues you encounter on master branch.

@pulyaevskiy
Copy link
Contributor

This has been released as 0.8.0 and requires Flutter 1.9.0 or greater.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants