quick_feedback 0.1.0

  • Readme
  • Changelog
  • Example
  • Installing
  • new60

Quick Feedback #

Quick feedback lets your android and ios app to collect feedback from yours with ease of implementation and with customizations options.

Quick feedback works for both Android and IOS.

Here how it looks #

Android Quick Feedback

iOS Quick Feedback

Android Quick Feedback GIF

Usage #

Add the dependency to your pubspec.yaml file.

  dependencies:
    flutter:
      sdk: flutter
    quick_feedback:

Example: Use within your application. #

  QuickFeedback(
    title: 'Leave a feedback', // Title of dialog
    showTextBox: true, // default false
    textBoxHint:
        'Share your feedback', // Feedback text field hint text default: Tell us more
    submitText: 'SUBMIT', // submit button text default: SUBMIT
    onSubmitCallback: (feedback) {
      print('$feedback'); // map { rating: 2, feedback: 'some feedback' }
      Navigator.of(context).pop();
    },
    askLaterText: 'ASK LATER',
    onAskLaterCallback: () {
      print('Do something on ask later click');
    },
  );

QuickFeedback #

The widget expects title and onSubmitCallback to be provided explicitly.

Options #

  1. title

    Required and must be a string. see example.

  2. showTextBox

    Optional, default is false.

  3. textBoxHint

    Placeholder text or hint text within the feedback text box.

  4. submitText

    Optional, default is SUBMIT.

  5. onSubmitCallback

    Required, must be a function, with one parameter which gets a map of { rating: Int, feedback: String } see example.

  6. askLaterText

    Optional, default: ASK ME LATER

  7. onAskLaterCallback

    Optional, function. gets invoked if provided on Ask me later button press and also closes the dialogue or take to previous page if used on a screen.

License #

Copyright 2018 @Sapidlabs

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

[0.1.0] - 18 March 2020 #

  • Initial release

example/main.dart

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

void main() => runApp(MyApp());

class MyApp extends StatelessWidget {
  void _showFeedback(context) {
    showDialog(
      context: context,
      builder: (context) {
        return QuickFeedback(
          title: 'Leave a feedback', // Title of dialog
          showTextBox: true, // default false
          textBoxHint:
              'Share your feedback', // Feedback text field hint text default: Tell us more
          submitText: 'SUBMIT', // submit button text default: SUBMIT
          onSubmitCallback: (feedback) {
            print('$feedback'); // map { rating: 2, feedback: 'some feedback' }
            Navigator.of(context).pop();
          },
          askLaterText: 'ASK LATER',
          onAskLaterCallback: () {
            print('Do something on ask later click');
          },
        );
      },
    );
  }

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Example App',
      debugShowCheckedModeBanner: false,
      home: Scaffold(
        appBar: AppBar(
          title: Text('Quick Feedback'),
        ),
        body: SingleChildScrollView(
          child: Container(
            child: Center(
              child: FlatButton(
                onPressed: () => _showFeedback(context),
                child: Text('Feedback'),
              ),
            ),
          ),
        ),
      ),
    );
  }
}

Use this package as a library

1. Depend on it

Add this to your package's pubspec.yaml file:


dependencies:
  quick_feedback: ^0.1.0

2. Install it

You can install packages from the command line:

with Flutter:


$ flutter pub get

Alternatively, your editor might support flutter pub get. Check the docs for your editor to learn more.

3. Import it

Now in your Dart code, you can use:


import 'package:quick_feedback/quick_feedback.dart';
  
Popularity:
Describes how popular the package is relative to other packages. [more]
20
Health:
Code health derived from static analysis. [more]
100
Maintenance:
Reflects how tidy and up-to-date the package is. [more]
100
Overall:
Weighted score of the above. [more]
60
Learn more about scoring.

We analyzed this package on Mar 31, 2020, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.7.1
  • pana: 0.13.6
  • Flutter: 1.12.13+hotfix.8

Dependencies

Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.1.0 <3.0.0
flutter 0.0.0
font_awesome_flutter ^8.7.0 8.8.1
Transitive dependencies
collection 1.14.11 1.14.12
meta 1.1.8
sky_engine 0.0.99
typed_data 1.1.6
vector_math 2.0.8
Dev dependencies
flutter_test