alertFeedbackFunction function

void alertFeedbackFunction (
  1. BuildContext context,
  2. String feedbackText,
  3. Uint8List feedbackScreenshot
)

Shows an AlertDialog with the given feedback. This is useful for debugging purposes.

Implementation

void alertFeedbackFunction(
  BuildContext context,
  String feedbackText,
  Uint8List feedbackScreenshot,
) {
  showDialog<void>(
    context: context,
    builder: (bc) {
      return AlertDialog(
        title: Text(feedbackText),
        content: Image.memory(
          feedbackScreenshot,
          height: 600,
          width: 500,
          fit: BoxFit.contain,
        ),
        actions: <Widget>[
          FlatButton(
            child: const Text('Close'),
            onPressed: () {
              Navigator.pop(context);
            },
          )
        ],
      );
    },
  );
}