Flutter Full path to audio file

Solution for Flutter Full path to audio file
is Given Below:

Im trying to record a voice and send the resulting audiofile (aac) by email.
i have both the recording part and mailer part working but i cant seem to get the full path to the audiofile that the mailer needs to attach the file to the email.

Im using this code (example) for the recording: https://github.com/llfbandit/record/blob/master/record/example/lib/audio_player.dart
And this as mailer:

mailer() async {
    final smtpServer = SmtpServer("smtp.server.com",
        username: 'username',
        password: 'passwd',
        allowInsecure: true,
        ignoreBadCertificate: true);

    final datumOpmaak = DateFormat('dd-MM-yyyy H:mm');

    // Create our message.
    final message = Message()
      ..from = Address('[email protected]', 'Me')
      ..recipients.add('[email protected]')
      ..subject="Test Dart Mailer library :: 😀 :: ${datumOpmaak.format(DateTime.now())}"
      ..text="This is the plain text.nThis is line 2 of the text part."
      ..attachments = [
          ..location = Location.inline
          ..cid = '<[email protected]>'

    try {
      final sendReport = await send(message, smtpServer);
      print('Message sent: ' + sendReport.toString());
    } on MailerException catch (e) {
      print('Message not sent.');
      for (var p in e.problems) {
        print('Problem: ${p.code}: ${p.msg}');

Can somebody point me in the correct direction on how to obtain or (re)use a already declared variable?