bytezx_store_review 0.0.1
bytezx_store_review: ^0.0.1 copied to clipboard
StoreReview
example/lib/main.dart
import 'package:flutter/material.dart';
import 'dart:async';
import 'package:store_review/store_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> {
String _platformVersion = 'Unknown';
final _storeReviewPlugin = StoreReview();
@override
void initState() {
super.initState();
}
// Platform messages are asynchronous, so we initialize in an async method.
Future<void> initPlatformState() async {
var result = await _storeReviewPlugin.jumpToAppStore(iosAppId: "1142110895");
setState(() {
_platformVersion = result.toString();
});
}
@override
Widget build(BuildContext context) {
return MaterialApp(
home: Scaffold(
appBar: AppBar(
title: const Text('Plugin example app'),
),
body: Column(
children: [
Center(
child: Text('Running on: $_platformVersion\n'),
),
MaterialButton(onPressed: (){
initPlatformState();
},child: Text("çšć"),)
],
),
),
);
}
}