shake_to_report 1.0.1 copy "shake_to_report: ^1.0.1" to clipboard
shake_to_report: ^1.0.1 copied to clipboard

ShakeToReport is a Flutter plugin that allows users to report issues or feedback by simply shaking their device.

example/lib/main.dart

import 'package:flutter/material.dart';
import 'package:shake_to_report/model/report_form_model.dart';
import 'package:shake_to_report/shake_to_report.dart';
import 'package:shake_to_report/utils/global_key.dart';

void main() {
  runApp(const MyApp());
}

class MyApp extends StatelessWidget {
  const MyApp({super.key});

  @override
  Widget build(BuildContext context) {
    return ShakeToReport.wrapWithScreenshotController(
      child: MaterialApp(
        navigatorKey: navigatorKey,
        home: const HomeScreen(),
      ),
    );
  }
}

class HomeScreen extends StatefulWidget {
  const HomeScreen({super.key});

  @override
  HomeScreenState createState() => HomeScreenState();
}

class HomeScreenState extends State<HomeScreen> {
  @override
  void initState() {
    super.initState();
    ShakeToReport.initShakeListener(
      onSubmit: (ReportFormData formData) {},
    );
  }

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(title: const Text("Shake to Report")),
      body: const Center(
        child: Text("Shake the device to go to the report screen!"),
      ),
    );
  }
}
5
likes
130
points
67
downloads

Publisher

unverified uploader

Weekly Downloads

ShakeToReport is a Flutter plugin that allows users to report issues or feedback by simply shaking their device.

Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (license)

Dependencies

flutter, image_picker, path_provider, screenshot

More

Packages that depend on shake_to_report