nikli2009 / flutter_audio_recorder_demo

A standalone flutter project that integrated flutter_audio_recorder for demo showcase.
2 stars 11 forks source link

Example not running. #4

Closed mdalboni closed 4 years ago

mdalboni commented 4 years ago

When running the example I get the following error.

D/AndroidAudioRecorder(28001): parsing result D/AndroidAudioRecorder(28001): result-1 D/AndroidAudioRecorder(28001): result-1 D/AndroidAudioRecorder(28001): onRequestPermissionsResult -false E/flutter (28001): [ERROR:flutter/lib/ui/ui_dart_state.cc(157)] Unhandled Exception: NoSuchMethodError: The method 'current' was called on null. E/flutter (28001): Receiver: null E/flutter (28001): Tried calling: current() E/flutter (28001): #0 Object.noSuchMethod (dart:core-patch/object_patch.dart:53:5) E/flutter (28001): #1 _MyHomePageState._prepare (package:ofdbank_app/audio.dart:113:34) E/flutter (28001): E/flutter (28001): #2 _MyHomePageState.initState. (package:ofdbank_app/audio.dart:53:7) E/flutter (28001): #3 new Future.microtask. (dart:async/future.dart:202:37) E/flutter (28001): #4 _rootRun (dart:async/zone.dart:1122:38) E/flutter (28001): #5 _CustomZone.run (dart:async/zone.dart:1023:19) E/flutter (28001): #6 _CustomZone.runGuarded (dart:async/zone.dart:925:7) E/flutter (28001): #7 _CustomZone.bindCallbackGuarded. (dart:async/zone.dart:965:23) E/flutter (28001): #8 _rootRun (dart:async/zone.dart:1126:13) E/flutter (28001): #9 _CustomZone.run (dart:async/zone.dart:1023:19) E/flutter (28001): #10 _CustomZone.runGuarded (dart:async/zone.dart:925:7) E/flutter (28001): #11 _CustomZone.bindCallbackGuarded. (dart:async/zone.dart:965:23) E/flutter (28001): #12 _microtaskLoop (dart:async/schedule_microtask.dart:43:21) E/flutter (28001): #13 _startMicrotaskLoop (dart:async/schedule_microtask.dart:52:5) E/flutter (28001):

flutter doctor

Doctor summary (to see all details, run flutter doctor -v): [✓] Flutter (Channel dev, v1.13.3, on Linux, locale pt_BR.UTF-8)

[✓] Android toolchain - develop for Android devices (Android SDK version 29.0.2) [✓] Chrome - develop for the web [✓] Android Studio (version 3.5) [✓] Connected device (4 available) • No issues found!

mdalboni commented 4 years ago

Restarted the machine and cleaned all caches. Then it worked like a charm.