lb_setup_ui 1.0.8 copy "lb_setup_ui: ^1.0.8" to clipboard
lb_setup_ui: ^1.0.8 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
0
pub points
0%
popularity

Publisher

verified publisherlogbot.cloud

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

License

unknown (license)

Dependencies

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

More

Packages that depend on lb_setup_ui