compiler message: ../hosted/pub.dartlang.org/preferences-1.1.0/lib/preference_service.dart:10:10: Error: 'Future' expects 0 type arguments.
compiler message: static Future<bool> init({String prefix = ''}) async {
compiler message: ^
compiler message: ../hosted/pub.dartlang.org/preferences-1.1.0/lib/preference_page.dart:15:27: Error: The argument type 'invalid-type' can't be assigned to the parameter type 'dart.async::Future<dynamic>'.
compiler message: Try changing the type of the parameter, or casting the argument to 'dart.async::Future<dynamic>'.
compiler message: future: PrefService.init(),
compiler message: ^
compiler message: ../hosted/pub.dartlang.org/preferences-1.1.0/lib/preference_service.dart:12:43: Error: A value of type 'dart.core::bool' can't be assigned to a variable of type 'dart.async::FutureOr<invalid-type>'.
compiler message: Try changing the type of the left hand side, or casting the right hand side to 'dart.async::FutureOr<invalid-type>'.
compiler message: if (sharedPreferences != null) return false;
compiler message: ^
compiler message: ../hosted/pub.dartlang.org/preferences-1.1.0/lib/preference_service.dart:14:12: Error: A value of type 'dart.core::bool' can't be assigned to a variable of type 'dart.async::FutureOr<invalid-type>'.
compiler message: Try changing the type of the left hand side, or casting the right hand side to 'dart.async::FutureOr<invalid-type>'.
compiler message: return true;
compiler message: ^
compiler message: ../hosted/pub.dartlang.org/preferences-1.1.0/lib/preference_service.dart:10:23: Error: Functions marked 'async' must have a return type assignable to 'Future'.
compiler message: static Future<bool> init({String prefix = ''}) async {
Oh wow, I had no ideas I wasn't on the latest, thank you very much!
Here is flutter doctor:
[✓] Flutter (Channel beta, v0.8.2, on Mac OS X 10.14.3 18D39a, locale en-US) • Flutter version 0.8.2 at /Users/nickmowen/Library/Android/flutter • Framework revision 5ab9e70727 (5 months ago), 2018-09-07 12:33:05 -0700 • Engine revision 58a1894a1c • Dart version 2.1.0-dev.3.1.flutter-760a9690c2
[!] Android toolchain - develop for Android devices (Android SDK 28.0.3) • Android SDK at /Users/nickmowen/Library/Android/sdk • Android NDK location not configured (optional; useful for native profiling support) • Platform android-28, build-tools 28.0.3 • Java binary at: /Applications/Android Studio 3.3 Preview.app/Contents/jre/jdk/Contents/Home/bin/java • Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1248-b01) ! Some Android licenses not accepted. To resolve this, run: flutter doctor --android-licenses
[✓] iOS toolchain - develop for iOS devices (Xcode 10.1) • Xcode at /Applications/Xcode.app/Contents/Developer • Xcode 10.1, Build version 10B61 • ios-deploy 1.9.2 • CocoaPods version 1.5.3
[✓] Android Studio (version 3.3) • Android Studio at /Applications/Android Studio 3.3 Preview.app/Contents • Flutter plugin version 31.3.3 • Dart plugin version 182.5124 • Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1248-b01)
[!] Connected devices ! No devices available
! Doctor found issues in 2 categories.
compiler message: ../hosted/pub.dartlang.org/preferences-1.1.0/lib/preference_service.dart:10:10: Error: 'Future' expects 0 type arguments.
compiler message: static Future<bool> init({String prefix = ''}) async {
compiler message: ^
compiler message: ../hosted/pub.dartlang.org/preferences-1.1.0/lib/preference_page.dart:15:27: Error: The argument type 'invalid-type' can't be assigned to the parameter type 'dart.async::Future<dynamic>'.
compiler message: Try changing the type of the parameter, or casting the argument to 'dart.async::Future<dynamic>'.
compiler message: future: PrefService.init(),
compiler message: ^
compiler message: ../hosted/pub.dartlang.org/preferences-1.1.0/lib/preference_service.dart:12:43: Error: A value of type 'dart.core::bool' can't be assigned to a variable of type 'dart.async::FutureOr<invalid-type>'.
compiler message: Try changing the type of the left hand side, or casting the right hand side to 'dart.async::FutureOr<invalid-type>'.
compiler message: if (sharedPreferences != null) return false;
compiler message: ^
compiler message: ../hosted/pub.dartlang.org/preferences-1.1.0/lib/preference_service.dart:14:12: Error: A value of type 'dart.core::bool' can't be assigned to a variable of type 'dart.async::FutureOr<invalid-type>'.
compiler message: Try changing the type of the left hand side, or casting the right hand side to 'dart.async::FutureOr<invalid-type>'.
compiler message: return true;
compiler message: ^
compiler message: ../hosted/pub.dartlang.org/preferences-1.1.0/lib/preference_service.dart:10:23: Error: Functions marked 'async' must have a return type assignable to 'Future'.
compiler message: static Future<bool> init({String prefix = ''}) async {
call this method from FloatingActionButton:
Future _getPicture() async {
var image = await ImagePicker.pickImage(source: ImageSource.camera);
if (image != null) {
_path = image.path;
setState(() {
_hasPicture = true;
});
}
}
[VERBOSE-2:shell.cc(181)] Dart Error: Unhandled exception:
PlatformException(multiple_request, Cancelled by a second request, null)
#0 StandardMethodCodec.decodeEnvelope (package:flutter/src/services/message_codecs.dart:551:7)
#1 MethodChannel.invokeMethod (package:flutter/src/services/platform_channel.dart:279:18)
<asynchronous suspension>
#2 ImagePicker.pickImage (package:image_picker/image_picker.dart:47:40)
<asynchronous suspension>
#3 CreateScreenLayoutState.build._getPicture (package:receipt_code_manager/ui/create.dart:35:37)
<asynchronous suspension>
#4 _InkResponseState._handleTap (package:flutter/src/material/ink_well.dart:503:14)
#5 _InkResponseState.build.<anonymous closure> (package:flutter/src/material/ink_well.dart:558:30)
#6 GestureRecognizer.invokeCallback (package:flutter/src/gestures/recognizer.dart:102:24)
#7 TapGestureRecognizer._checkUp (package:flutter/src/gestures/tap.dart:242:9)
#8 TapGestureRecognizer.handlePrimaryPointer (package:<…>