lb_writer 1.2.0 copy "lb_writer: ^1.2.0" to clipboard
lb_writer: ^1.2.0 copied to clipboard

Logbot writer client API client to be user to read and write into devices

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_stats_api_page.dart';
import 'package:example/ui/apis/list_all_connectons_page.dart';
import 'package:example/ui/apis/read_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_commons/services/logbot_common_env.dart';
import 'package:lb_auth/src/logbot_env.dart';

Future<void> main() async {
  await dotenv.load(fileName: ".env");
  if (kDebugMode) {
    LogbotCommonEnvironment.enableDebugLogs();
  }
  LogbotEnvironment.set(Environment.stage);
  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 - Writer Example',
      themeMode: ThemeMode.light,
      theme: ThemeData(
        primarySwatch: Colors.blue,
      ),
      home: const LoginPage(),
      initialRoute: '/login',
      routes: {
        '/home': (context) => const HomePage(),
        '/login': (context) => const LoginPage(),
        '/writer/connection/read': (context) => const ReadApiPage(),
        '/writer/device/stats': (context) => const DeviceStatsApiPage(),
        '/writer/connection/': (context) => const ListConnectionsApiPage(),
      },
    );
  }
}
2
likes
120
points
60
downloads

Publisher

verified publisherlogbot.cloud

Weekly Downloads

Logbot writer client API client to be user to read and write into devices

Homepage

Documentation

Documentation
API reference

License

BSD-3-Clause (license)

Dependencies

collection, copywriter, flutter_dotenv, flutter_lints, http, intl, lb_auth, lb_commons, lb_discovery, lb_state_manager, meta, test

More

Packages that depend on lb_writer