appstore_info

Last updated:

0 purchases

appstore_info Image
appstore_info Images
Add to Cart

Description:

appstore info

appstore_info #
A Flutter plugin for retrieving information about apps on the App Store with in the app.




Features #

Retrieve app information such as name, description, developer, version, and more.
Check for app updates by comparing the version on the App Store with the installed version.
View app details directly from the App Store using SKStoreProductViewController.

Installation #
Add appstore_info to your pubspec.yaml file:
dependencies:
appstore_info: ^1.0.0
copied to clipboard
Caution: This code will only execute on a real iOS device. It will not work on the iOS simulator.
Usage #
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'dart:async';

import 'package:flutter/services.dart';
import 'package:appstore_info/appstore_info.dart';

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

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

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

class _MyAppState extends State<MyApp> {
bool isLoading = false;

set loadingState(bool value) {
setState(() {
isLoading = value;
});
}

final _appstoreInfoPlugin = AppstoreInfo();

// Function to open the App Store inside the app
Future<void> openAppStoreInside() async {
try {
loadingState = true; // Set the loading state to true
// Open the App Store with the specified app ID
// Example: Instagram app ID is 389801252
// URL: https://apps.apple.com/in/app/instagram/id389801252
await _appstoreInfoPlugin.presentAppStore(appID: '389801252');
loadingState = false; // Set the loading state back to false
} on PlatformException {
loadingState = false; // Set the loading state back to false in case of an exception
}
}

@override
Widget build(BuildContext context) {
return MaterialApp(
home: Scaffold(
appBar: AppBar(
title: const Text('App Store Info Example'),
),
body: Center(
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: [
if (isLoading)
const CupertinoActivityIndicator()
else
CupertinoButton(
color: CupertinoColors.activeBlue,
onPressed: openAppStoreInside,
child: const Text("Open App Store"),
),
],
),
),
),
);
}
}

copied to clipboard
License #
This project is licensed under the MIT License - see the LICENSE file for details.

License:

For personal and professional use. You cannot resell or redistribute these repositories in their original state.

Files In This Product:

Customer Reviews

There are no reviews.