flutter_lyra 0.3.1 copy "flutter_lyra: ^0.3.1" to clipboard
flutter_lyra: ^0.3.1 copied to clipboard

This package allows you to use the methods from the lyra android and ios native sdks in Flutter

example/example.md


void main() => runApp(const MyExampleApp());

class MyExampleApp extends StatelessWidget {
  const MyExampleApp({super.key});

  @override
  Widget build(BuildContext context) {
    return FutureBuilder<ReachFive>(
      future: LyraManager().initialize(
        publicKey: "publicKey",
        options: LyraInitializeOptions(
          apiServerName: "apiServerName",
          nfcEnabled: true,
          cardScanningEnabled: false,
        ),
      ),
      builder: (context, snapshot) {
        final lyra = snapshot.data;
        if (lyra != null) {
          // You can use your lyra method here
          // Here is an example with getFormTokenVersion
          // Check the others methods in the doc or in the example repo
          return Column(
            children: [
              ElevatedButton(
                onPressed: () async => lyra.getFormTokenVersion(),
                child: const Text('Get Form Token Version'),
              )
            ],
          );
        }

        if (snapshot.hasError) {
          return const Text('handle your initialization error here');
        }

        return const Text('Loading');
      },
    );
  }
}
3
likes
140
pub points
43%
popularity

Publisher

verified publisherbam.tech

This package allows you to use the methods from the lyra android and ios native sdks in Flutter

Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (LICENSE)

Dependencies

equatable, flutter, flutter_lyra_android, flutter_lyra_ios, flutter_lyra_platform_interface

More

Packages that depend on flutter_lyra