flutter_rustore_review 1.0.0 copy "flutter_rustore_review: ^1.0.0" to clipboard
flutter_rustore_review: ^1.0.0 copied to clipboard

PlatformAndroid

Flutter RuStore Review SDK.

example/lib/main.dart

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

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

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

  @override
  State<MyApp> createState() => _MyAppState();
}

class _MyAppState extends State<MyApp> {
  @override
  void initState() {
    super.initState();
    initReview();
  }

  void initReview() {
    RustoreReviewClient.initialize();
  }

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: Scaffold(
        appBar: AppBar(
          title: const Text('Plugin example app'),
        ),
        body: Center(
            child: OutlinedButton(
          onPressed: () {
            RustoreReviewClient.request().then((value) {
              RustoreReviewClient.review().then((value) {
                print("success review");
              }, onError: (err) {
                print("on err ${err}");
              });
            });
          },
          child: Text('Review'),
        )),
      ),
    );
  }
}