Skip to content

Commit

Permalink
Merge pull request #66 from mobiplus-opensource/feature/get_packagena…
Browse files Browse the repository at this point in the history
…me_dynamically

catching package name dinamically
  • Loading branch information
Dev-Well-92 authored Dec 23, 2021
2 parents b9e30a0 + 16684d1 commit 2ca2ed2
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 66 deletions.
15 changes: 7 additions & 8 deletions lib/block.screen.dart
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
// ignore_for_file: prefer_const_constructors

import 'package:flutter/material.dart';
import 'package:package_info_plus/package_info_plus.dart';
import 'package:store_redirect/store_redirect.dart';

class BlockScreen extends StatefulWidget {
Expand Down Expand Up @@ -52,9 +53,7 @@ class BlockScreenStates extends State<BlockScreen> {
),
alignment: Alignment(0.0, 0.0),
),
Container(
child: widget.image
),
Container(child: widget.image),
Container(
margin: EdgeInsets.only(left: 30, right: 30),
child: Text(
Expand All @@ -74,13 +73,13 @@ class BlockScreenStates extends State<BlockScreen> {
Padding(
padding: const EdgeInsets.all(15.0),
child: ElevatedButtonTheme(
data: ElevatedButtonThemeData(
style: widget.buttonStyle),
data: ElevatedButtonThemeData(style: widget.buttonStyle),
child: ElevatedButton(
onPressed: () {
onPressed: () async {
final PackageInfo _info = await PackageInfo.fromPlatform();
StoreRedirect.redirect(
androidAppId: "com.android.chrome",
iOSAppId: "535886823");
androidAppId: _info.packageName,
iOSAppId: _info.packageName);
},
child: Text(widget.buttonText),
),
Expand Down
58 changes: 0 additions & 58 deletions sample/lib/screens/version_blocker/version.blocker.functions.dart

This file was deleted.

0 comments on commit 2ca2ed2

Please sign in to comment.