vivanta_connect_flutter 0.4.0+5 copy "vivanta_connect_flutter: ^0.4.0+5" to clipboard
vivanta_connect_flutter: ^0.4.0+5 copied to clipboard

Vivanta Connect for Flutter

Vivanta Connect for Flutter #

Plugin to integrate Vivanta Connect in Flutter Projects

How to use #

  1. Add the import of Vivanta Connect
import 'package:vivanta_connect_flutter/views/start_vivanta_connect.dart';
  1. Create a route to open Vivanta Connect. For example:
 Navigator.of(context).push(
  MaterialPageRoute(
    builder: (context) => StartVivantaConnect(
      apiKey: apiKey,     // Required
      customerId: customerId,     // Required
      externalUserId: externalUserId,     // Required
      companyId: companyId,     // Optional
    ),
  ),
);
  1. Vivanta Connect will start and automatically set the language based on the configuration of the device.

  2. Only for Apple Health integrations, you must add this code at the start of your user's session.

  import 'package:vivanta_connect_flutter/helpers/vivanta_sync.dart';

  final vivantaSyncData = VivantaSync(
    apiKey: apiKey,     // Required
    customerId: customerId,     // Required
    externalUserId: externalUserId,     // Required
  );
  vivantaSyncData.executeAll();       // This process gets data from HealthKit and uploads to Vivanta
);

Note: Vivanta Connect requires a valid API Key and the associated Customer ID to fully function.