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

Logbot MDNS discovery service to scan and find nearby 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/discover_api_page.dart';
import 'package:example/ui/apis/discover_local_api_page.dart';
import 'package:example/ui/apis/discover_local_not_config_api_page.dart';
import 'package:example/ui/apis/discover_local_owned_api_page.dart';
import 'package:example/ui/apis/discover_not_config_api_page.dart';
import 'package:example/ui/apis/discover_owned_api_page.dart';
import 'package:example/ui/apis/discover_remote_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';

Future<void> main() async {
  // await dotenv.load(fileName: ".env");
  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 - Discovery Example',
      themeMode: ThemeMode.light,
      theme: ThemeData(
        primarySwatch: Colors.blue,
      ),
      home: const LoginPage(),
      debugShowCheckedModeBanner: false,
      initialRoute: '/login',
      routes: {
        '/home': (context) => const HomePage(),
        '/login': (context) => const LoginPage(),
        '/discovery': (context) => const DiscoverApiPage(),
        '/discovery/owned': (context) => const DiscoverOwnedApiPage(),
        '/discovery/not_config': (context) => const DiscoverNotConfigApiPage(),
        '/discovery/local': (context) => const DiscoverLocalApiPage(),
        '/discovery/local/owned': (context) =>
            const DiscoverLocalOwnedApiPage(),
        '/discovery/local/not_config': (context) =>
            const DiscoverLocalNotConfigApiPage(),
        '/discovery/remote': (context) => const DiscoverRemoteApiPage(),
      },
    );
  }
}
1
likes
50
points
91
downloads

Publisher

verified publisherlogbot.cloud

Weekly Downloads

Logbot MDNS discovery service to scan and find nearby devices

Homepage

Documentation

Documentation

License

BSD-3-Clause (license)

Dependencies

collection, connectivity_plus, http, intl, lb_auth, lb_commons, lb_core, meta, multicast_dns, mutex, nsd, plugin_platform_interface

More

Packages that depend on lb_discovery