flutter / samples

A collection of Flutter examples and demos

Home Page:https://flutter.github.io/samples/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

desktop_photo_search sample (material) doesn't build against Flutter master branch

cbracken opened this issue · comments

Repro steps:

  1. cd desktop_photo_search/material
  2. flutter run -d mac

Expected behaviour: app compiles and runs.

Actual behaviour: compile error:

% flutter run -d mac
Running "flutter pub get" in material...                           10,2s
Launching lib/main.dart on macOS in debug mode...
Running pod install...                                           1 634ms
lib/src/widgets/unsplash_notice.dart:30:20: Warning: Operand of null-aware operation '!' has type 'WidgetsBinding' which excludes null.
 - 'WidgetsBinding' is from 'package:flutter/src/widgets/binding.dart' ('../../../flutter/packages/flutter/lib/src/widgets/binding.dart').
    WidgetsBinding.instance!.addPostFrameCallback((timeStamp) {
                   ^
../../../../../.pub-cache/git/flutter-desktop-embedding-5c51870ced62a00e809ba4b81a846a052d241c9f/plugins/menubar/lib/src/menu_channel.dart:19:1: Error: 'MenuItem' is imported from both 'package:flutter/src/widgets/platform_menu_bar.dart' and 'package:menubar/src/menu_item.dart'.
import 'menu_item.dart';
^^^^^^^^

Command PhaseScriptExecution failed with a nonzero exit code
** BUILD FAILED **

Doctor:

Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel master, 2.13.0-0.0.pre.696, on macOS 12.3.1 21E258 darwin-x64, locale fr-CA)
[!] Android toolchain - develop for Android devices (Android SDK version 30.0.2)
    ✗ cmdline-tools component is missing
      Run `path/to/sdkmanager --install "cmdline-tools;latest"`
      See https://developer.android.com/studio/command-line for more details.
    ✗ Android license status unknown.
      Run `flutter doctor --android-licenses` to accept the SDK licenses.
      See https://flutter.dev/docs/get-started/install/macos#android-setup for more details.
[✓] Xcode - develop for iOS and macOS (Xcode 13.3.1)
[✓] Chrome - develop for the web
[✓] Android Studio (version 4.2)
[✓] VS Code (version 1.66.2)
[✓] Connected device (2 available)
[✓] HTTP Host Availability

! Doctor found issues in 1 category.