lb_setup_ui 1.1.3 copy "lb_setup_ui: ^1.1.3" to clipboard
lb_setup_ui: ^1.1.3 copied to clipboard

Logbot Setup UI to easily implement the Logbot First Setup procedure over Bluetooth to setup a Logbot IoT easily from a mobile app

example/lib/main.dart

// Copyright 2022 Logbot SRL. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

import 'package:example/ui/apis/ble_setup_page.dart';
import 'package:example/ui/apis/wifi_setup_page.dart';
import 'package:example/ui/home_page.dart';
import 'package:example/ui/login_page.dart';
import 'package:flutter/foundation.dart';
import 'package:flutter/material.dart';
import 'package:flutter_dotenv/flutter_dotenv.dart';
// ignore: depend_on_referenced_packages
import 'package:lb_setup/lb_setup.dart';
// ignore: depend_on_referenced_packages
import 'package:lb_commons/services/logbot_common_env.dart';

Future<void> main() async {
  WidgetsFlutterBinding.ensureInitialized();
  await dotenv.load(fileName: ".env");
  await LogbotSetup.init();
  if (kDebugMode) {
    LogbotCommonEnvironment.enableDebugLogs();
  }
  runApp(const MyApp());
}

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

  // This widget is the root of your application.
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Logbot SDK - Setup Example',
      themeMode: ThemeMode.light,
      theme: ThemeData(
        primarySwatch: Colors.blue,
      ),
      home: const HomePage(),
      initialRoute: '/login',
      routes: {
        '/home': (context) => const HomePage(),
        '/login': (context) => const LoginPage(),
        '/bluetooth/setup': (context) => const BleSetupPage(),
        '/wifi/setup': (context) => const WifiSetupPage(),
      },
    );
  }
}
1
likes
140
points
66
downloads

Publisher

verified publisherlogbot.cloud

Weekly Downloads

Logbot Setup UI to easily implement the Logbot First Setup procedure over Bluetooth to setup a Logbot IoT easily from a mobile app

Homepage

Documentation

Documentation
API reference

License

BSD-3-Clause (license)

Dependencies

flutter, flutter_reactive_ble, lb_auth, lb_bluetooth, lb_commons, lb_core, lb_discovery, lb_setup, provider, qr_code_scanner

More

Packages that depend on lb_setup_ui