Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

What to do with feedback #10

Closed
syonip opened this issue Mar 12, 2020 · 4 comments
Closed

What to do with feedback #10

syonip opened this issue Mar 12, 2020 · 4 comments
Labels
question Further information is requested

Comments

@syonip
Copy link

syonip commented Mar 12, 2020

Hi,
This looks like a cool plugin!
I couldn't figure out how the user should actually send the feedback.
Thanks.

@ueman
Copy link
Owner

ueman commented Mar 12, 2020

That is up to you. You just have to implement the onFeedback-callback as shown below:

import 'dart:typed_data';

import 'package:feedback/feedback.dart';
import 'package:flutter/material.dart';

void main() {
  runApp(
    BetterFeedback(
      child: MyApp(
        key: GlobalKey(debugLabel: 'app_key'),
      ),
      onFeedback: (
        BuildContext context,
        String feedbackText,
        Uint8List feedbackScreenshot,
      ) {
        // TODO: upload to your server, share via email...
      },
    ),
  );
}

And somewhere in your code you have to call BetterFeedback.of(context).show(); to show the feedback view.

@ueman ueman added the question Further information is requested label Mar 12, 2020
@syonip
Copy link
Author

syonip commented Mar 12, 2020

Great thanks!
I would be good to include this piece of code in the main readme page.
I can make a PR if you want.

@ueman
Copy link
Owner

ueman commented Mar 12, 2020

Well, it is already included in the readme albeit with a sample function. You don't need to make a PR. More and better documentation is already on my todo list.

@syonip
Copy link
Author

syonip commented Mar 12, 2020

Cool, thanks for making this :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants