title: Flutter pass String with callback
body: <p>this is simple code to show widget with overlay support and in <code>onReplay</code> of that i want to get string as message to show that with for example <code>toast</code></p>
  
  <pre><code>showOverlayNotification((context) {
    return MessageNotification(
      message: messages[3],
      onReplay: (message) {
        OverlaySupportEntry.of(context).dismiss();
        toast(message);
      },
    );
  }, duration: Duration(milliseconds: 4000));
  </code></pre>
  
  <p>my implemented code to pass message as string is not correct and i get </p>
  
  <blockquote>
    <p>error: The final variable 'onReply' must be initialized.</p>
  </blockquote>
  
  <p>how can i resolve this problem?</p>
  
  <pre><code>typedef StringToVoidFunc = void Function(String);
  const messages = [
    ...
  ];
  
  class MessageNotification extends StatelessWidget {
    //final VoidCallback onReplay;
    final StringToVoidFunc onReply;
    final String message;
  
    const MessageNotification({
      Key key,
      this.onReplay,
      @required this.message,
    }) : super(key: key);
  
    @override
    Widget build(BuildContext context) {
      return SafeArea(
        child: InkWell(
          onTap: (){
            if (onReplay != null) onReplay("sample pass message");
          },
          child: Center(
            child: Text(
              'ssss',
              style: TextStyle(
                fontSize: 26.0,
              ),
            ),
          ),
        ),
      );
    }
  }
  </code></pre>