feedback_github 1.1.1 copy "feedback_github: ^1.1.1" to clipboard
feedback_github: ^1.1.1 copied to clipboard

A Flutter package that enables users to submit feedback as GitHub issues, storing images in Firebase Storage.

example/feedback_github.dart

import 'package:feedback_github/feedback_github.dart';
import 'package:flutter/material.dart';
import 'package:flutter_dotenv/flutter_dotenv.dart';

import 'package:example/firebase_options.dart';
import 'package:firebase_core/firebase_core.dart';

void main() async {
  await dotenv.load();
  await Firebase.initializeApp(
    options: DefaultFirebaseOptions.currentPlatform,
  );
  // don't forget to wrap Material app with BetterFeedback widget :
  runApp(BetterFeedback(
    child: App(),
  ));
}

class App extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
        title: 'Demo',
        home: Scaffold(
          appBar: AppBar(title: Text("Demo")),
          body: Center(
              child: ElevatedButton.icon(
            icon: Icon(Icons.feedback),
            label: Text("Send feedback"),
            onPressed: () {
              // you can check how it will look here https://github.com/tempo-riz/dummy-repo/issues/2
              BetterFeedback.of(context).showAndUploadToGitHub(
                  repoUrl: "https://github.com/tempo-riz/dummy-repo",
                  // Save it in an environment variable :)
                  gitHubToken: dotenv.get("GITHUB_ISSUE_TOKEN"),
                  // those are optionals (default values)
                  labels: ['feedback'],
                  packageInfo: true,
                  deviceInfo: true,
                  extraData: "Some extra data you want to add in the issue",
                  // imageRef: // another firebase storage ref to store the image
                  onSucces: (issue) => print("succes !"),
                  onError: (error) => print("failed :/ $error"));
            },
          )),
        ));
  }
}
1
likes
150
pub points
53%
popularity

Publisher

verified publisherzealousfoundry.com

A Flutter package that enables users to submit feedback as GitHub issues, storing images in Firebase Storage.

Repository (GitHub)
View/report issues

Documentation

API reference

License

Apache-2.0 (license)

Dependencies

device_info_plus, feedback, firebase_storage, flutter, github, package_info_plus, uuid

More

Packages that depend on feedback_github