gst_verification 1.0.2

  • Readme
  • Changelog
  • Example
  • Installing
  • 67

gst_verification #

A new Flutter plugin to verify GST Number in your Flutter Apps.

Getting Started #

This plugin is used to get details of any gst Number. This plugin needs a key_secret provided by AppyFlow Technologies Visit the following url to get your own key_secret Get Key Secret

https://appyflow.in/verify-gst/#getAPI #

Screenshots #

WhatsApp Image 2019-08-13 at 1 27 19 PM(1)

WhatsApp Image 2019-08-13 at 1 27 19 PM

Register to get your own key_secret #

Usage #

    GstVerification.verifyGST(gstNo, key_secret).then((result) {
      JsonEncoder encoder = new JsonEncoder.withIndent('  ');
      String prettyprint = encoder.convert(result);
      print(prettyprint);

      response = "JSON Response:\n\n" + prettyprint;
      print(response);
      valueOp = 0;
      setState(() {});
    }).catchError((error) {
      print(error);
      valueOp = 0;
      setState(() {});
    }); 

Result will be in JSON Format. Then you can use it to get Details about the gstNumber. For More you can read documentation online Documentation

For any query : Mail me at mr.dishantmahajan@gmail.com

0.0.1 #

  • TODO: Describe initial release.

example/lib/main.dart

import 'dart:convert';

import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
import 'package:gst_verification/gst_verification.dart';

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

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

class _MyAppState extends State<MyApp> {
  @override
  void initState() {
    super.initState();
  }

  String gstNo, key_secret, response = '';

  double valueOp = 0;

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: Scaffold(
          appBar: AppBar(
            title: const Text('GST Verification example app'),
          ),
          body: SingleChildScrollView(
            child: Padding(
              padding: const EdgeInsets.all(10.0),
              child: Column(
                mainAxisAlignment: MainAxisAlignment.center,
                crossAxisAlignment: CrossAxisAlignment.center,
                children: <Widget>[
                  TextField(
                    textCapitalization: TextCapitalization.words,
                    style: TextStyle(fontSize: 16.0, color: Colors.black),
                    maxLines: 1,
                    onChanged: (value) {
                      gstNo = value;
                    },
                    decoration: InputDecoration(
                      labelText: "GST Number *",
                      labelStyle: TextStyle(
                        fontSize: 16.0,
                        color: Colors.grey,
                      ),
                    ),
                  ),
                  SizedBox(
                    height: 20,
                  ),
                  TextField(
                    textCapitalization: TextCapitalization.words,
                    style: TextStyle(fontSize: 16.0, color: Colors.black),
                    maxLines: 1,
                    onChanged: (value) {
                      key_secret = value;
                    },
                    decoration: InputDecoration(
                      labelText: "key_secret *",
                      labelStyle: TextStyle(
                        fontSize: 16.0,
                        color: Colors.grey,
                      ),
                    ),
                  ),
                  SizedBox(
                    height: 20,
                  ),
                  Text(response),
                  Opacity(
                    opacity: valueOp,
                    child: CircularProgressIndicator(),
                  ),
                  SizedBox(
                    height: 20,
                  ),
                  RaisedButton(
                    onPressed: verifyGSTNumber,
                    color: Colors.blue,
                    child: Padding(
                      padding: const EdgeInsets.all(10.0),
                      child: Text(
                        'Verify GST',
                        style: TextStyle(color: Colors.white),
                      ),
                    ),
                  )
                ],
              ),
            ),
          )),
    );
  }

  void verifyGSTNumber() {
    print(gstNo + " , " + key_secret);

    valueOp = 1;
    setState(() {});

    GstVerification.verifyGST(gstNo, key_secret).then((result) {
      JsonEncoder encoder = new JsonEncoder.withIndent('  ');
      String prettyprint = encoder.convert(result);

      print(prettyprint);

      response = "JSON Response:\n\n" + prettyprint;
      print(response);
      valueOp = 0;
      setState(() {});
    }).catchError((error) {
      print(error);
      valueOp = 0;
      setState(() {});
    });
  }
}

Use this package as a library

1. Depend on it

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


dependencies:
  gst_verification: ^1.0.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:gst_verification/gst_verification.dart';
  
Popularity:
Describes how popular the package is relative to other packages. [more]
52
Health:
Code health derived from static analysis. [more]
99
Maintenance:
Reflects how tidy and up-to-date the package is. [more]
60
Overall:
Weighted score of the above. [more]
67
Learn more about scoring.

We analyzed this package on Jul 2, 2020, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.8.4
  • pana: 0.13.13
  • Flutter: 1.17.5

Analysis suggestions

Package does not support Flutter platform linux

Because of import path [package:gst_verification/gst_verification.dart] that declares support for platforms: android, ios

Package does not support Flutter platform macos

Because of import path [package:gst_verification/gst_verification.dart] that declares support for platforms: android, ios

Package does not support Flutter platform web

Because of import path [package:gst_verification/gst_verification.dart] that declares support for platforms: android, ios

Package does not support Flutter platform windows

Because of import path [package:gst_verification/gst_verification.dart] that declares support for platforms: android, ios

Package not compatible with SDK dart

because of import path [gst_verification] that is in a package requiring null.

Health issues and suggestions

Document public APIs. (-1 points)

5 out of 5 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.

Fix lib/gst_verification.dart. (-0.50 points)

Analysis of lib/gst_verification.dart reported 1 hint:

line 15 col 56: Name non-constant identifiers using lowerCamelCase.

Maintenance issues and suggestions

Use constrained dependencies. (-20 points)

The pubspec.yaml contains 1 dependency without version constraints. Specify version ranges for the following dependencies: http.

Homepage URL doesn't exist. (-20 points)

At the time of the analysis the homepage field https://appyflow.in/verify-gst was unreachable.

Dependencies

Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.1.0 <3.0.0
flutter 0.0.0
http any 0.12.1
Transitive dependencies
charcode 1.1.3
collection 1.14.12 1.14.13
http_parser 3.1.4
meta 1.1.8
path 1.7.0
pedantic 1.9.0 1.9.1
sky_engine 0.0.99
source_span 1.7.0
string_scanner 1.0.5
term_glyph 1.1.0
typed_data 1.1.6 1.2.0
vector_math 2.0.8
Dev dependencies
flutter_test