adgydeplugin 4.2.4

  • Readme
  • Changelog
  • Example
  • Installing
  • 46

adgydeplugin #

A new flutter plugin project.

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.

Release #

  • AdGyde Flutter Plugin is used for interacting with AdGyde SDK

example/lib/main.dart

import 'dart:collection';
import 'package:flutter/material.dart';
import 'dart:async';
//import 'package:flutter/services.dart';
import 'package:adgydeplugin/adgydeplugin.dart';
import 'package:adgydeplugin_example/countingevent.dart';
import 'package:adgydeplugin_example/uniqueevent.dart';
import 'package:adgydeplugin_example/UserDetails.dart';
import 'package:adgydeplugin_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> {
  Adgydeplugin adgydesinstance= new Adgydeplugin();

  @override
  void initState() {
    adgydesinstance.init("GB01443549308701","Organic");
    adgydesinstance.setCurrentScreen("HomePage");
    print("initDart");
    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"),
                ),
              ],
            )
        )
    );
  }


  void _simpleButtonClick(){
    adgydesinstance.simpleEvent("registration");

  }

  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);

  }

  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:
  adgydeplugin: ^4.2.4

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:adgydeplugin/adgydeplugin.dart';
  
Popularity:
Describes how popular the package is relative to other packages. [more]
0
Health:
Code health derived from static analysis. [more]
99
Maintenance:
Reflects how tidy and up-to-date the package is. [more]
80
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:adgydeplugin/adgydeplugin.dart that declares support for platforms: android, ios

Package does not support Flutter platform macos

Because:

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

Package does not support Flutter platform web

Because:

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

Package does not support Flutter platform windows

Because:

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

Package not compatible with SDK dart

Because:

  • adgydeplugin that is a package requiring null.

Health issues and suggestions

Document public APIs. (-1 points)

20 out of 20 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/adgydeplugin.dart. (-0.50 points)

Analysis of lib/adgydeplugin.dart reported 1 hint:

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

Maintenance issues and suggestions

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

At the time of the analysis the homepage field https://github.com/Sanstack/flutteradyde was unreachable.

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