Closed emmanuelochem closed 1 year ago
The error message says Error: Method 'addPostFrameCallback' cannot be called on 'WidgetsBinding?' because it is potentially null.
This was changed with Flutter 3 and that means probably that you project is not using Flutter 3, yet. You have to use a previous version of the plugin if you don't plan to update your project.
Okay thanks for the early reply. I am using flutter 2.10.4. I'll consider updating...
BUILD FAILED Xcode's output: ↳ Writing result bundle at path: /var/folders/s0/3q2wzgbs7n5dt04jqv0s197h0000gn/T/flutter_tools.Fp0YMN/flutter_ios_build_temp_dirakL8Jt/temporary_xcresult_bundle : Error: Method 'addPostFrameCallback' cannot be called on 'WidgetsBinding?' because it is potentially null.
'WidgetsBinding' is from 'package:flutter/src/widgets/binding.dart' ('../../flutter/packages/flutter/lib/src/widgets/binding.dart'). package:flutter/…/widgets/binding.dart:1 Try calling using ?. instead. (value) => WidgetsBinding.instance.addPostFrameCallback((_) { ^^^^^^^^^^^^^^^^^^^^ Failed to package /Users/mac/workspace/Projects/mysocial_app. Command PhaseScriptExecution failed with a nonzero exit code
note: Using new build system note: Planning note: Build preparation complete note: Building targets in dependency order Result bundle written to path: /var/folders/s0/3q2wzgbs7n5dt04jqv0s197h0000gn/T/flutter_tools.Fp0YMN/flutter_ios_build_temp_dirakL8Jt/temporary_xcresult_bundle
Could not build the application for the simulator. Error launching application on iPhone 12 Pro Max. Exited (sigterm)