proxity_flutter 0.0.4 copy "proxity_flutter: ^0.0.4" to clipboard
proxity_flutter: ^0.0.4 copied to clipboard

Proxity flutter plugin for iOS and Android

example/lib/main.dart

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

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

void main() {
  runApp(const MyApp());
}

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

  @override
  State<MyApp> createState() => _MyAppState();
}

class _MyAppState extends State<MyApp> {

  @override
  void initState() {
    super.initState();
    initPlatformState();
  }

  // Platform messages are asynchronous, so we initialize in an async method.
  Future<void> initPlatformState() async {
    final ok = await ProxityFlutter.initialize(
      apiKey: "76C3A87B-6628-4460-BFE9-EED00A45B1FF",
      deviceId: "1E85E16A-5F22-4B32-8941-CE70AD7544BA",
    );
    if (ok == null || !ok) {
      print('Failed to initialize Proxity client');
    }

    ProxityFlutter.start();
    //print(await ProxityFlutter.location);

    final messsages = const EventChannel("eu.proxity.messages")
      .receiveBroadcastStream();
    messsages.listen((ids) => print(ids));
  }

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: Scaffold(
        appBar: AppBar(
          title: const Text('Plugin example app'),
        ),
        body: const Center(
          child: Text('abahaba'),
        ),
      ),
    );
  }
}
0
likes
120
pub points
0%
popularity

Publisher

verified publisherproxity.eu

Proxity flutter plugin for iOS and Android

Repository (GitHub)
View/report issues

Documentation

API reference

License

BSD-3-Clause (LICENSE)

Dependencies

flutter

More

Packages that depend on proxity_flutter