pit_get_application 0.1.2

  • Readme
  • Changelog
  • Example
  • Installing
  • 74

pit_get_application #

A plugin for flutter that functions to get list of installed application package from the mobile devices (Android Only)

Installation #

First, add pit_get_application as a dependency in your pubspec.yaml file.

pit_get_application: ^0.1.1

Example for Get List Application Package #

     List<String> appPackage = await PitGetApplication.getAllApplication;

0.1.2 #

  • Version 0.1.2, Delete Log

0.1.1 #

  • Version 0.1.1, Fix Bug and Enchance Code

0.1.0+4 #

  • On Ios change result to result(FlutterMethodNotImplemented)

0.1.0+3 #

  • Fix Bug

0.1.0+2 #

  • Fix ReadMe

0.1.0+1 #

  • Fix ReadMe

0.1.0 #

  • version 0.1.0

0.0.1 #

example/README.md

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

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

void main() => runApp(MyApp());

class MyApp extends StatefulWidget {
  @override
  _MyAppState createState() => _MyAppState();
}

class _MyAppState extends State<MyApp> {

  List<String> appPackage = [];
  @override
  void initState() {
    super.initState();
    initPlatformState();
  }


  Future<void> initPlatformState() async {
    List<String> appPackage = [];

    try {
      appPackage = await PitGetApplication.getAllApplication;
    } on PlatformException {
      print("error");
    }

    if (!mounted) return;
    setState(() {
      this.appPackage = appPackage;
    });
  }

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: Scaffold(
        appBar: AppBar(
          title: const Text('Plugin example app'),
        ),
        body: SingleChildScrollView(
          child: Column(
            crossAxisAlignment: CrossAxisAlignment.start,
            children: <Widget>[
              Text("List App Package : "),
              _buildItemAppPackage()
            ],
          ),
        ),
      ),
    );
  }

  _buildItemAppPackage(){
    List<Widget> item = [];

    appPackage.forEach((app){
      item.add(
          Container(
            margin: EdgeInsets.only(left: 16.0, right: 16.0, bottom: 16.0),
            child: Text(app),
          ));
    });
    return Column(crossAxisAlignment: CrossAxisAlignment.start, children: item,);

  }
}


Use this package as a library

1. Depend on it

Add this to your package's pubspec.yaml file:


dependencies:
  pit_get_application: ^0.1.2

2. Install it

You can install packages from the command line:

with Flutter:


$ flutter pub get

Alternatively, your editor might support flutter pub get. Check the docs for your editor to learn more.

3. Import it

Now in your Dart code, you can use:


import 'package:pit_get_application/pit_get_application.dart';
  
Popularity:
Describes how popular the package is relative to other packages. [more]
49
Health:
Code health derived from static analysis. [more]
99
Maintenance:
Reflects how tidy and up-to-date the package is. [more]
100
Overall:
Weighted score of the above. [more]
74
Learn more about scoring.

We analyzed this package on Dec 9, 2019, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.6.1
  • pana: 0.12.21
  • Flutter: 1.9.1+hotfix.6

Health issues and suggestions

Document public APIs. (-1 points)

4 out of 4 API elements have no dartdoc comment.Providing good documentation for libraries, classes, functions, and other API elements improves code readability and helps developers find and use your API.

Format lib/pit_get_application.dart.

Run flutter format to format lib/pit_get_application.dart.

Dependencies

Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.1.0 <3.0.0
flutter 0.0.0
Transitive dependencies
collection 1.14.11 1.14.12
meta 1.1.7 1.1.8
sky_engine 0.0.99
typed_data 1.1.6
vector_math 2.0.8
Dev dependencies
flutter_test