viam_flutter_bluetooth_provisioning_widget 1.0.0 copy "viam_flutter_bluetooth_provisioning_widget: ^1.0.0" to clipboard
viam_flutter_bluetooth_provisioning_widget: ^1.0.0 copied to clipboard

A Flutter package for provisioning Viam machines using Bluetooth connections with support for both standard provisioning and tethering flows.

example/lib/main.dart

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

import 'start_screen.dart';

Future<void> main() async {
  await dotenv.load(fileName: ".env");
  runApp(const MyApp());
}

class MyApp extends StatelessWidget {
  const MyApp({super.key});

  @override
  Widget build(BuildContext context) {
    try {
      assert(dotenv.env['API_KEY_ID']!.isNotEmpty, 'apiKeyId is empty');
      assert(dotenv.env['API_KEY']!.isNotEmpty, 'apiKey is empty');
      assert(dotenv.env['ORG_ID']!.isNotEmpty, 'organizationId is empty');
      assert(dotenv.env['LOCATION_ID']!.isNotEmpty, 'locationId is empty');
    } catch (e) {
      debugPrint('Error: $e');
      // To use this example app populate the .env file with your own api Keys.
      rethrow;
    }

    return MaterialApp(
      title: 'Bluetooth Provisioning',
      theme: ThemeData(
        colorScheme: ColorScheme.fromSeed(seedColor: Colors.deepPurple),
        useMaterial3: true,
      ),
      home: const StartScreen(),
    );
  }
}
3
likes
140
points
349
downloads

Documentation

API reference

Publisher

verified publisherviam.com

Weekly Downloads

A Flutter package for provisioning Viam machines using Bluetooth connections with support for both standard provisioning and tethering flows.

Homepage
Repository (GitHub)
View/report issues

License

Apache-2.0 (license)

Dependencies

collection, flutter, flutter_platform_widgets, provider, pub_semver, viam_flutter_provisioning, viam_sdk

More

Packages that depend on viam_flutter_bluetooth_provisioning_widget