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

Flutter implementation of the Glyph-Developer-Kit by Nothing Technologies Ltd.

example/lib/main.dart

import 'package:flutter/material.dart';

import 'package:flutter_glyph_kit/flutter_glyph_kit.dart';

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

class MyApp extends StatefulWidget {
  const MyApp({super.key});

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

class _MyAppState extends State<MyApp> {

  @override
  void initState() {
    super.initState();
  }

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: Scaffold(
        appBar: AppBar(
          title: const Text('Plugin example app'),
        ),
        body: Center(
          child: Column(
            children: [
              ElevatedButton(
                onPressed: () async {
                  final phone2Glyph = Phone2Glyph();
                  await phone2Glyph.toggle(channels: [Phone2Led.a1, Phone2Led.a2, Phone2Led.c1_1]);
                }, 
                child: const Text('Toggle')
              ),
              ElevatedButton(
                onPressed: () async {
                  final phone2Glyph = Phone2Glyph();
                  await phone2Glyph.animate(
                    channels: [Phone2Led.a1, Phone2Led.a2, Phone2Led.c1_1],
                    duration: const Duration(seconds: 5),
                    cycles: 5,
                    intervalDuration: 10,
                  );
                }, 
                child: const Text('Animate')
              ),
              ElevatedButton(
                onPressed: () async {
                  final phone2Glyph = Phone2Glyph();
                  await phone2Glyph.animate(
                    channels: [Phone2Led.a2, Phone2Led.c2, Phone2Led.c3],
                    duration: const Duration(milliseconds: 500),
                    cycles: 5,
                    intervalDuration: 1,
                  );
                }, 
                child: const Text('Complex Animation')
              )
            ],
          ),
        ),
      ),
    );
  }
}
3
likes
0
pub points
14%
popularity

Publisher

verified publisherfrancescovll.com

Flutter implementation of the Glyph-Developer-Kit by Nothing Technologies Ltd.

Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

flutter, plugin_platform_interface

More

Packages that depend on flutter_glyph_kit