pinch 2.1.0 icon indicating copy to clipboard operation
pinch: ^2.1.0 copied to clipboard

The PinchSDK is used to collect the neccessary data for allowing you to gain actionable insights through real-time location and behavioural data.

example/lib/main.dart

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

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

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

class MyApp extends StatefulWidget {
  MyApp({Key key}) : super(key: key);

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

class _MyAppState extends State<MyApp> {
  Future<List<PinchMessage>> messages;

  @override
  void initState() {
    super.initState();
    Pinch.setAdid("ADID");
    messages = Pinch.getMessages();
  }

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Fetch Data Example',
      theme: ThemeData(
        primarySwatch: Colors.blue,
      ),
      home: Scaffold(
        appBar: AppBar(
          title: Text('Fetch Data Example'),
        ),
        body: Center(
          child: FutureBuilder<List<PinchMessage>>(
            future: messages,
            builder: (context, snapshot) {
              if (snapshot.hasData) {
                return Text(snapshot.data[0].title);
              } else if (snapshot.hasError) {
                return Text("${snapshot.error}");
              }

              // By default, show a loading spinner.
              return CircularProgressIndicator();
            },
          ),
        ),
      ),
    );
  }
}
1
likes
120
pub points
21%
popularity

Publisher

verified publisher iconfluxloop.com

The PinchSDK is used to collect the neccessary data for allowing you to gain actionable insights through real-time location and behavioural data.

Homepage

Documentation

API reference

License

Icon for licenses.unknown (LICENSE)

Dependencies

flutter, http

More

Packages that depend on pinch