serial 0.0.4 copy "serial: ^0.0.4" to clipboard
serial: ^0.0.4 copied to clipboard

Platformweb

Serial port for flutter. Wrapper around the `window.navigator.serial` for web platform.

example/lib/main.dart

// ignore_for_file: avoid_web_libraries_in_flutter

import 'package:flutter/material.dart';
import 'package:example/home_page.dart';

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

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

  @override
  State<MyApp> createState() => _MyAppState();
}

class _MyAppState extends State<MyApp> {
  @override
  Widget build(BuildContext context) {
    final theme = ThemeData(
      useMaterial3: true,
      colorSchemeSeed: Colors.purple,
      brightness: Brightness.dark,
      inputDecorationTheme: InputDecorationTheme(
        border: OutlineInputBorder(),
        alignLabelWithHint: true,
        isDense: true,
      ),
    );

    return MaterialApp(
      theme: theme,
      home: HomePage(),
    );
  }
}
11
likes
140
pub points
75%
popularity

Publisher

verified publisherpwa.ir

Serial port for flutter. Wrapper around the `window.navigator.serial` for web platform.

Homepage
Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (LICENSE)

Dependencies

js

More

Packages that depend on serial