lb_setup 1.2.3 copy "lb_setup: ^1.2.3" to clipboard
lb_setup: ^1.2.3 copied to clipboard

Logbot Setup client to be used for API requests to Logbot Setup APIs to: * Setup and gather informations about the device * Retrieves and personalize configurations about the device and its network sy [...]

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/device_info_api_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';
import 'package:lb_setup/lb_setup.dart';
import 'package:lb_commons/services/logbot_common_env.dart';

Future<void> main() async {
  WidgetsFlutterBinding.ensureInitialized();
  await dotenv.load(fileName: ".env");
  if (kDebugMode) {
    LogbotCommonEnvironment.enableDebugLogs();
  }
  await LogbotSetup.init();
  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 LoginPage(),
      initialRoute: '/login',
      routes: {
        '/home': (context) => const HomePage(),
        '/login': (context) => const LoginPage(),
        '/device/info': (context) => const DeviceInfoApiPage(),
      },
    );
  }
}
0
likes
40
pub points
25%
popularity

Publisher

verified publisherlogbot.cloud

Logbot Setup client to be used for API requests to Logbot Setup APIs to: * Setup and gather informations about the device * Retrieves and personalize configurations about the device and its network system * Setup and gather informations about associated services like vpn, firewall and supervisor * Exposing a web interface in order to visualize and interact with all the previous points

Homepage

Documentation

Documentation

License

BSD-3-Clause (LICENSE)

Dependencies

collection, http, intl, lb_auth, lb_bluetooth, lb_commons, lb_discovery, lb_state_manager, meta

More

Packages that depend on lb_setup