Giter Site home page Giter Site logo

app_review_helper's Introduction

App Review Helper

This plugin will make it easier for you to use in-app review with minimal conditions.

Introduction

The dialogs is shown before requesting a review Alt Text

Usage

This method will do nothing if the current platform is other than Android and iOS.

final appReviewHelper = AppReviewHelper.instance;
appReviewHelper.initial(
    /// Show a dialog to ask the user about their feeling before the review.
    /// If the user does not satisfy with the first dialog, the second dialog
    /// will be shown (if `whatCanWeDo` is set) to ask user's opinion to make
    /// the app better. 
    reviewDialogConfig: ReviewDialogConfig(
        context: context,
        whatCanWeDo: (opinion) {
            print(opinion);
        },
    ),

    /// Min days
    minDays: 3,

    /// If you add this line in your main(), it's same as app opening count
    minCallThisFunction: 3,

    /// If the current version is satisfied with this than not showing the request
    /// this value use plugin `satisfied_version` to compare.
    noRequestVersions: ['<=1.0.0', '3.0.0', '>4.0.0'],

    /// Control which versions allow reminding if `keepRemind` is false
    remindedVersions: ['2.0.0', '3.0.0'],

    /// If true, it'll keep asking for the review on each new version (and satisfy with all the above conditions).
    /// If false, it only requests for the first time the conditions are satisfied.
    keepRemind: true,

    /// Request with delayed duaration
    duration: const Duration(seconds: 1),
    
    /// Print debug log
    isDebug: false,
);

Return values:

/// This platform is not supported
ReviewState.unSupportedPlatform

/// Cannot request an in app review at this time
ReviewState.unavailable

///The review has been requested and the `keepRemind` was disabled
ReviewState.keepRemindDisabled

/// This version is satisfied with `noRequestVersions` => Don't request
ReviewState.noRequestVersion

/// Completed request review
ReviewState.completed

/// AppReview.requestReview is called but in debug mode!
ReviewState.compeletedInDebugMode

/// Don\'t satisfy with minCalls and minDays condition
ReviewState.dontSatisfyWithMinCallsAndDays

/// Don't satisfy with minCalls condition
ReviewState.dontSatisfyWithMinCalls

/// Don't satisfy with minDays condition
ReviewState.dontSatisfyWithMinDays

Use this function if you want to open the store. This function will try to open the fallbackUrl if the current platform is not Android or iOS.

appReviewHelper.openStore();

app_review_helper's People

Contributors

lamnhan066 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.