adgydeflutterplugins 0.0.6

  • Readme
  • Changelog
  • Example
  • Installing
  • 46

adgydeflutterplugin #

A new Flutter plugin.

Getting Started #

This project is a starting point for a Flutter plug-in package, a specialized package that includes platform-specific implementation code for Android and/or iOS.

For help getting started with Flutter, view our online documentation, which offers tutorials, samples, guidance on mobile development, and a full API reference.

0.0.1 #

  • TODO: Describe initial release.

example/lib/main.dart

import 'package:flutter/material.dart';
import 'dart:async';
import 'package:flutter/services.dart';
import 'package:adgydeflutterplugin/adgydeflutterplugin.dart';
import 'package:adgydeflutterplugin_example/countingevent.dart';
import 'package:adgydeflutterplugin_example/uniqueevent.dart';
import 'package:adgydeflutterplugin_example/UserDetails.dart';
import 'package:adgydeflutterplugin_example/UserProfile.dart';

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

class MyApp extends StatelessWidget {

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Flutter Demo',
      theme: ThemeData(
        primarySwatch: Colors.red,
      ),
      home: MyHomePage(title: 'Flutter Demo Home Page'),
    );
  }
}

class MyHomePage extends StatefulWidget {

  MyHomePage({Key key, this.title}) : super(key: key);

  final String title;

  @override
  _MyHomePageState createState() => _MyHomePageState();
}

class _MyHomePageState extends State<MyHomePage> {
  Adgydeflutterplugin adgydesinstance= new Adgydeflutterplugin();

  @override
  void initState() {

    // AdGyde Initialise
    // Initialize AdGyde SDK with appkey & default channel id "Organic".
    // When applictaion is installed from Google Play Store without any campaign the Channel will be Organic as specified in Init Function
    // In case the applictaion is installed through a campaign link then the Default channel will be overriden and value from the campaign link will be passed.
    // By Calling the below "adgydesinstance.setCurrentScreen("HomePage");" you can able to add user flow and this user flow will reflect on AdGyde Dashboard.
    adgydesinstance.init("Your_App_key","Organic");
    // Custom User Flow
    adgydesinstance.setCurrentScreen("HomePage");
    //Permission for Colllecting IMEI
    adgydesinstance.setImeiPermission(true);
    super.initState();

  }
  @override
  Widget build(BuildContext context) {

    int number=0;
    return new Scaffold(
        appBar: new AppBar(
          title: new Text("AdGyde Sdk Example"),
        ),
        body:
        new Center(
            child: new Column(
              children: <Widget>[
                new RaisedButton(
                  textColor: Colors.white,
                  color: Colors.blue,
                  onPressed: _simpleButtonClick,
                  child: new Text("SimpleEvent"),
                ),
                new RaisedButton(
                  textColor: Colors.white,
                  color: Colors.blue,
                  //padding: const EdgeInsets.all(8.0),
                  onPressed:(){Navigator.push(context, MaterialPageRoute(builder: (context) => CountingEvent()),);
                  print("onPressCounting");},
                  child: new Text("CountingEvent"),
                ),
                new RaisedButton(
                  textColor: Colors.white,
                  color: Colors.blue,
                  //padding: const EdgeInsets.all(8.0),
                  onPressed:_computingButtonClick,
                  child: new Text("ComputingEvent"),
                ),
                new RaisedButton(
                  textColor: Colors.white,
                  color: Colors.blue,
                  //padding: const EdgeInsets.all(8.0),
                  onPressed:() {Navigator.push(context, MaterialPageRoute(builder: (context) => UniqueEvent()),);
                  print("onPressUnique");},
                  child: new Text("Unique Event"),
                ),
                new RaisedButton(
                  textColor: Colors.white,
                  color: Colors.blue,
                  onPressed:_revenueButtonClick,
                  child: new Text("Revenue"),
                ),
                new RaisedButton(
                  textColor: Colors.white,
                  color: Colors.blue,
                  onPressed:_AddScreen1,
                  child: new Text("AddScreen1"),
                ),
                new RaisedButton(
                  textColor: Colors.white,
                  color: Colors.blue,
                  onPressed:_removeScreen1,
                  child: new Text("RemoveScreen1"),
                ),
                new RaisedButton(
                  textColor: Colors.white,
                  color: Colors.blue,
                  onPressed:(){Navigator.push(context, MaterialPageRoute(builder: (context) => UserDetails()),);},
                  child: new Text("UserDetail"),
                ),
                new RaisedButton(
                  textColor: Colors.white,
                  color: Colors.blue,
                  onPressed:(){Navigator.push(context, MaterialPageRoute(builder: (context) => UserProfile()),);},
                  child: new Text("UserProfile"),
                ),
              ],
            )
        )
    );
  }

/*
 * Simple Event
 * =============
 * The below code is the example to pass a simple event to the AdGyde SDK.
 * This event requires only 1 Parameter which is the Event ID.
 *
 * NOTE : Creating the Simple Event on Console with Event ID is Compulsory
 *
 */
  void _simpleButtonClick(){
    adgydesinstance.simpleEvent("registration");

  }

  /*
 * Computing Event
 * =============
 * The below code is the example to pass a Computing event to the AdGyde SDK.
 * This event is used to get Sub-Category counting as per weightage of the Sub-Category
 * Multiple values Can be passed for getting the computed values
 * When user passes multiple values, the console shows the computed values of each value relatively
 *
 * NOTE : Creating the Computing Event on Console with Event ID, Parameter is Compulsory
 *
 */
  void _computingButtonClick(){
    Map map =Map<String, dynamic>();
// First parameter is event name and second is value name which will be accumulated.
    map={"offerlist":"50%Off"};
// Second parameter is the value for its value name. Value must be integer type.
    map={"50%off":"1000rs"};
// Trigger event where first parameter is event_id
    adgydesinstance.computingEvent("computing_event", map);

  }


  /*
 * Revenue Event
 * =============
 * The below code is the example to pass a Revenue event to the AdGyde SDK.
 * This event is useful to track revenue generated by the user in-app.
 * Unit of the currency need not be passed, by default revenue is calculated in INR (Indian Rupees)
 *
 * NOTE : There is no Need to create the Revenue Event on Console
 *
 */

  void _revenueButtonClick(){
    adgydesinstance.revenueEvent(70);
  }

  void _AddScreen1() {
    adgydesinstance.setCurrentScreen("AddScreen1");
  }

  void _removeScreen1(){
    adgydesinstance.removeCurrentScreen("AddScreen1");
  }



}

Use this package as a library

1. Depend on it

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


dependencies:
  adgydeflutterplugins: ^0.0.6

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:adgydeflutterplugins/adgydeflutterplugin.dart';
  
Popularity:
Describes how popular the package is relative to other packages. [more]
5
Health:
Code health derived from static analysis. [more]
98
Maintenance:
Reflects how tidy and up-to-date the package is. [more]
70
Overall:
Weighted score of the above. [more]
46
Learn more about scoring.

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

  • Dart: 2.8.4
  • pana: 0.13.14
  • Flutter: 1.17.5

Analysis suggestions

Package does not support Flutter platform linux

Because:

  • package:adgydeflutterplugins/adgydeflutterplugin.dart that declares support for platforms: android, ios

Package does not support Flutter platform macos

Because:

  • package:adgydeflutterplugins/adgydeflutterplugin.dart that declares support for platforms: android, ios

Package does not support Flutter platform web

Because:

  • package:adgydeflutterplugins/adgydeflutterplugin.dart that declares support for platforms: android, ios

Package does not support Flutter platform windows

Because:

  • package:adgydeflutterplugins/adgydeflutterplugin.dart that declares support for platforms: android, ios

Package not compatible with SDK dart

Because:

  • adgydeflutterplugins that is a package requiring null.

Health issues and suggestions

Document public APIs. (-1 points)

21 out of 21 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/adgydeflutterplugin.dart. (-1 points)

Analysis of lib/adgydeflutterplugin.dart reported 2 hints:

line 1 col 8: Unused import: 'dart:async'.

line 71 col 8: This function has a return type of 'bool', but doesn't end with a return statement.

Maintenance suggestions

The package description is too short. (-20 points)

Add more detail to the description field of pubspec.yaml. Use 60 to 180 characters to describe the package, what it does, and its target use case.

Package is pre-v0.1 release. (-10 points)

While nothing is inherently wrong with versions of 0.0.*, it might mean that the author is still experimenting with the general direction of the API.

Dependencies

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