web_blue 0.1.0 copy "web_blue: ^0.1.0" to clipboard
web_blue: ^0.1.0 copied to clipboard

Platformweb
outdated

A starting point for Dart libraries or applications.

example/lib/main.dart

// ignore_for_file: avoid_print

import 'package:flutter/material.dart';
import 'package:web_blue/web_blue.dart';

void main() {
  runApp(const MyApp());
}

class MyApp extends StatelessWidget {
  const MyApp({Key? key}) : super(key: key);

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Flutter Demo',
      theme: ThemeData(
        primarySwatch: Colors.blue,
      ),
      home: const MyHomePage(),
    );
  }
}

class MyHomePage extends StatelessWidget {
  const MyHomePage({Key? key}) : super(key: key);

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: const Text('web_blue example'),
      ),
      body: Center(
        child: Column(
          children: [
            ElevatedButton(
              child: const Text('canUse'),
              onPressed: () {
                bool canUse = canUseBlue();
                print('canUse $canUse');
              },
            ),
            ElevatedButton(
              child: const Text('getAvailability'),
              onPressed: () async {
                bool availability = await blue.getAvailability();
                print('availability $availability');
              },
            ),
          ],
        ),
      ),
    );
  }
}
3
likes
120
pub points
31%
popularity

Publisher

verified publisherwoodemi.com

A starting point for Dart libraries or applications.

Repository (GitHub)
View/report issues

Documentation

API reference

License

BSD-3-Clause (license)

Dependencies

js

More

Packages that depend on web_blue