Skip to content
New issue

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

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

Already on GitHub? # to your account

🐛 Fluent UI 4.6.2 breaks under Flutter 3.12.0-8.0.pre.21 #865

Closed
domesticmouse opened this issue Jun 22, 2023 · 4 comments · Fixed by #915
Closed

🐛 Fluent UI 4.6.2 breaks under Flutter 3.12.0-8.0.pre.21 #865

domesticmouse opened this issue Jun 22, 2023 · 4 comments · Fixed by #915
Labels
blocked Issue blocked by another issue or pull-request bug Something isn't working

Comments

@domesticmouse
Copy link

Describe the bug
Fluent UI 4.6.2 breaks under Flutter master channel

To Reproduce
Steps to reproduce the behavior:

  1. Check out https://github.com/flutter/samples/tree/main/desktop_photo_search/fluent_ui
  2. Compile and attempt to run with flutter run -d macos
  3. See error log
$ flutter run -d macos
Launching lib/main.dart on macOS in debug mode...
Running pod install...                                             765ms
2023-06-22 12:54:05.048 xcodebuild[80822:17651848] DVTCoreDeviceEnabledState: DVTCoreDeviceEnabledState_Disabled set via user default (DVTEnableCoreDevice=disabled)
--- xcodebuild: WARNING: Using the first of multiple matching destinations:
{ platform:macOS, arch:arm64, id:00006000-001250C00C38801E }
{ platform:macOS, arch:x86_64, id:00006000-001250C00C38801E }
../../../../../.pub-cache/hosted/pub.dev/fluent_ui-4.6.2/lib/src/controls/form/selection_controls.dart:120:30: Error: The parameter 'clipboardStatus' of the method '_FluentTextSelectionControls.buildToolbar' has type 'ClipboardStatusNotifier?', which does not match the corresponding type, 'ValueListenable<ClipboardStatus>?', in the overridden method, 'TextSelectionControls.buildToolbar'.
 - 'ClipboardStatusNotifier' is from 'package:flutter/src/widgets/text_selection.dart' ('../../../../../flutter/packages/flutter/lib/src/widgets/text_selection.dart').
 - 'ValueListenable' is from 'package:flutter/src/foundation/change_notifier.dart' ('../../../../../flutter/packages/flutter/lib/src/foundation/change_notifier.dart').
 - 'ClipboardStatus' is from 'package:flutter/src/widgets/text_selection.dart' ('../../../../../flutter/packages/flutter/lib/src/widgets/text_selection.dart').
Change to a supertype of 'ValueListenable<ClipboardStatus>?', or, for a covariant parameter, a subtype.
    ClipboardStatusNotifier? clipboardStatus,
                             ^
../../../../../flutter/packages/flutter/lib/src/widgets/text_selection.dart:121:10: Context: This is the overridden method ('buildToolbar').
  Widget buildToolbar(
         ^
../../../../../.pub-cache/hosted/pub.dev/fluent_ui-4.6.2/lib/src/controls/form/selection_controls.dart:91:33: Error: The argument type 'void Function()?' can't be assigned to the parameter type 'void Function()' because 'void Function()?' is nullable and 'void Function()' isn't.
                onPressed: item.onPressed,
                                ^
../../../../../.pub-cache/hosted/pub.dev/fluent_ui-4.6.2/lib/src/controls/form/selection_controls.dart:128:45: Error: Too many positional arguments: 1 allowed, but 2 found.
Try removing the extra positional arguments.
          canCut(delegate) ? () => handleCut(delegate, clipboardStatus) : null,
                                            ^
../../../../../.pub-cache/hosted/pub.dev/fluent_ui-4.6.2/lib/src/controls/form/selection_controls.dart:130:29: Error: Too many positional arguments: 1 allowed, but 2 found.
Try removing the extra positional arguments.
          ? () => handleCopy(delegate, clipboardStatus)
                            ^
../../../../../.pub-cache/hosted/pub.dev/fluent_ui-4.6.2/lib/src/controls/form/selection_controls.dart:253:56: Error: The getter 'disposed' isn't defined for the class 'ClipboardStatusNotifier'.
 - 'ClipboardStatusNotifier' is from 'package:flutter/src/widgets/text_selection.dart' ('../../../../../flutter/packages/flutter/lib/src/widgets/text_selection.dart').
Try correcting the name to the name of an existing getter, or defining a getter or field named 'disposed'.
    if (_clipboardStatus != null && !_clipboardStatus!.disposed) {
                                                       ^^^^^^^^
Target kernel_snapshot failed: Exception

Command PhaseScriptExecution failed with a nonzero exit code
warning: Run script build phase 'Run Script' will be run during every build because it does not specify any outputs. To address this warning, either add output dependencies to the script phase, or configure it to run in every build by unchecking "Based on dependency analysis" in the script phase. (in target 'Flutter Assemble' from project 'Runner')
** BUILD FAILED **

Building macOS application...                                           
Exception: Build process failed

Expected behavior
Flutter run should just work.

Additional context

$ flutter doctor -v
[✓] Flutter (Channel master, 3.12.0-8.0.pre.21, on macOS 13.4 22F66 darwin-arm64, locale en)
    • Flutter version 3.12.0-8.0.pre.21 on channel master at /Users/brettmorgan/flutter
    • Upstream repository https://github.com/flutter/flutter
    • Framework revision a2739c09a7 (59 minutes ago), 2023-06-22 06:01:18 -0400
    • Engine revision 8cc6d6d5ef
    • Dart version 3.1.0 (build 3.1.0-236.0.dev)
    • DevTools version 2.24.0

[✓] Android toolchain - develop for Android devices (Android SDK version 33.0.0)
    • Android SDK at /Users/brettmorgan/Library/Android/sdk
    • Platform android-33, build-tools 33.0.0
    • Java binary at: /Applications/Android Studio.app/Contents/jre/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 11.0.12+0-b1504.28-7817840)
    • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 14.3.1)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Build 14E300c
    • CocoaPods version 1.12.1

[✓] Chrome - develop for the web
    • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome

[✓] Android Studio (version 2021.2)
    • Android Studio at /Applications/Android Studio.app/Contents
    • Flutter plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/6351-dart
    • Java version OpenJDK Runtime Environment (build 11.0.12+0-b1504.28-7817840)

[✓] IntelliJ IDEA Community Edition (version 2022.2.2)
    • IntelliJ at /Applications/IntelliJ IDEA CE.app
    • Flutter plugin version 70.0.5
    • Dart plugin version 222.4167.21

[✓] VS Code (version 1.79.2)
    • VS Code at /Applications/Visual Studio Code.app/Contents
    • Flutter extension version 3.66.0

[✓] Connected device (2 available)
    • macOS (desktop) • macos  • darwin-arm64   • macOS 13.4 22F66 darwin-arm64
    • Chrome (web)    • chrome • web-javascript • Google Chrome 114.0.5735.133

[✓] Network resources
    • All expected network resources are available.

• No issues found!
@domesticmouse domesticmouse changed the title 🐛 🐛 Fluent UI 4.6.2 breaks under Flutter 3.12.0-8.0.pre.21 Jun 23, 2023
@anaisbetts
Copy link

This also applies to the current beta channel (3.12.0-1.1.pre)

@WinXaito
Copy link
Collaborator

WinXaito commented Jul 3, 2023

It has always been said that Fluent_ui was applicable to the stable branch of Flutter.

The various fixes will be applied when the above-mentioned branches become stable.


The various fixes could break the current stable version of flutter, and we do not wish to maintain several versions of fluent_ui to meet the needs of the beta/master branches of flutter.

@bdlukaa bdlukaa added bug Something isn't working blocked Issue blocked by another issue or pull-request labels Jul 5, 2023
@h3x4d3c1m4l
Copy link
Contributor

h3x4d3c1m4l commented Aug 16, 2023

Flutter 3.13.0 is just released to the stable channel. As expected there are some compile errors. Taking a look now :)

EDIT: Rudimental fix available in this PR #915

@ghigh
Copy link

ghigh commented Aug 17, 2023

Thanks--4.7.3 fixed it!

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
blocked Issue blocked by another issue or pull-request bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants