Isvisoft / flutter_screen_recording

A new Flutter plugin for record the screen.
MIT License
142 stars 138 forks source link

Screen recorder fails on Android #97

Closed alfietapping closed 6 months ago

alfietapping commented 11 months ago

I'm using a pixel 6 with Android 13, when i start recording, this error gets thrown:

E/flutter (22877): [ERROR:flutter/runtime/dart_vm_initializer.cc(41)] Unhandled Exception: 'package:flutter_foreground_task/models/android_notification_options.dart': Failed assertion: line 25 pos 16: 'channelName.isNotEmpty': is not true.
E/flutter (22877): #0      _AssertionError._doThrowNew (dart:core-patch/errors_patch.dart:51:61)
E/flutter (22877): #1      _AssertionError._throwNew (dart:core-patch/errors_patch.dart:40:5)
onstonboy commented 7 months ago

Hi @alfietapping , I faced same error. You just need to add titleNotification into function recording like this.

FlutterScreenRecording.startRecordScreen(fileName, titleNotification: title);