Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Star rate + Comment not available at once ? #123

Open
zakblacki opened this issue May 27, 2022 · 0 comments
Open

Star rate + Comment not available at once ? #123

zakblacki opened this issue May 27, 2022 · 0 comments
Assignees
Labels
enhancement New feature or request

Comments

@zakblacki
Copy link

zakblacki commented May 27, 2022

I'm trying to display/show both star rating and comment box at once, but I'm only managing to do one or the other why ?
Also remindDays and remindLaunches are not working for me it's only showing the first time no matter how many time I restart app not sure what I'm doing wrong

image
image

 ` return RateMyAppBuilder(
    rateMyApp: RateMyApp(
        googlePlayIdentifier: '',
        appStoreIdentifier: '',
        minDays: 0,
        minLaunches: 1,
        remindDays: 0,
        remindLaunches: 1,
    ),
  onInitialized: (context, rateMyApp) {
      if(mounted) {
        setState(() => this.rateMyApp = rateMyApp);
      }
    if (rateMyApp.shouldOpenDialog) {
      rateMyApp.showStarRateDialog(
        context,
        //contentBuilder: (context, _) => buildComment(context),
        title: 'Rate this app',
        message:
        'If you like this app, please take a little bit of your time to review it !',
        actionsBuilder: actionsBuilder,
        ignoreNativeDialog: Platform.isAndroid,
        dialogStyle: const DialogStyle( // Custom dialog styles.
          titleAlign: TextAlign.center,
          messageAlign: TextAlign.center,
          messagePadding: EdgeInsets.only(bottom: 20),
        ),
        starRatingOptions: const StarRatingOptions(initialRating: 4), // Custom star bar rating options.
        onDismissed: () => rateMyApp.callEvent(RateMyAppEventType.laterButtonPressed), // Called when the user dismissed the dialog (either by taping outside or by pressing the "back" button).
      );
    }
  },
    builder: (context) => rateMyApp == null ? Center(child: CircularProgressIndicator()) : widget.builder(rateMyApp),
    );`

 Widget buildComment(BuildContext context) => TextFormField(
autofocus: true,
onFieldSubmitted: (_) => Navigator.of(context).pop(),
maxLines: 3,
decoration: InputDecoration(
    hintText: 'Write Comment...', border: OutlineInputBorder()),
 onChanged: (comment) => setState(() => this.comment = comment),
 );
@zakblacki zakblacki added the enhancement New feature or request label May 27, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants