lb_setup 1.0.3 lb_setup: ^1.0.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 [...]
// 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/material.dart';
import 'package:flutter_dotenv/flutter_dotenv.dart';
import 'package:lb_setup/lb_setup.dart';
Future<void> main() async {
WidgetsFlutterBinding.ensureInitialized();
await dotenv.load(fileName: ".env");
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(),
},
);
}
}