11// ignore_for_file: prefer_const_constructors
22
33import 'package:flutter/material.dart' ;
4+ import 'package:package_info_plus/package_info_plus.dart' ;
45import 'package:store_redirect/store_redirect.dart' ;
56
67class BlockScreen extends StatefulWidget {
@@ -52,9 +53,7 @@ class BlockScreenStates extends State<BlockScreen> {
5253 ),
5354 alignment: Alignment (0.0 , 0.0 ),
5455 ),
55- Container (
56- child: widget.image
57- ),
56+ Container (child: widget.image),
5857 Container (
5958 margin: EdgeInsets .only (left: 30 , right: 30 ),
6059 child: Text (
@@ -74,13 +73,13 @@ class BlockScreenStates extends State<BlockScreen> {
7473 Padding (
7574 padding: const EdgeInsets .all (15.0 ),
7675 child: ElevatedButtonTheme (
77- data: ElevatedButtonThemeData (
78- style: widget.buttonStyle),
76+ data: ElevatedButtonThemeData (style: widget.buttonStyle),
7977 child: ElevatedButton (
80- onPressed: () {
78+ onPressed: () async {
79+ final PackageInfo _info = await PackageInfo .fromPlatform ();
8180 StoreRedirect .redirect (
82- androidAppId: "com.android.chrome" ,
83- iOSAppId: "535886823" );
81+ androidAppId: _info.packageName ,
82+ iOSAppId: _info.packageName );
8483 },
8584 child: Text (widget.buttonText),
8685 ),
0 commit comments