pinch 2.0.1 copy "pinch: ^2.0.1" to clipboard
pinch: ^2.0.1 copied to clipboard

discontinuedreplaced by: kettle
outdated

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
0
pub points
0%
popularity

Publisher

verified publisherfluxloop.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

License

unknown (LICENSE)

Dependencies

flutter, http

More

Packages that depend on pinch