flutter_key_generator 0.0.1 copy "flutter_key_generator: ^0.0.1" to clipboard
flutter_key_generator: ^0.0.1 copied to clipboard

Secure unique key generator for Flutter.

example/lib/main.dart

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

import 'package:flutter/services.dart';
import 'package:flutter_key_generator/flutter_key_generator.dart';

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

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

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

class _MyAppState extends State<MyApp> {
  final _flutterKeyGeneratorPlugin = FlutterKeyGenerator();


  void _incrementCounter() async {try {
      final key =
          await _flutterKeyGeneratorPlugin.generateSymmetricKey(256); // 128, 192 or 256 (bit key)
      print(key);
    } catch (e) {
       print(e);
    }
  }

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: Scaffold(
        appBar: AppBar(
          title: const Text('Plugin example app'),
        ),
        body: Center(
          child: Text('Running on:'),
        ),
        floatingActionButton: FloatingActionButton(
          onPressed: _incrementCounter,
          tooltip: 'Increment',
          child: const Icon(Icons.add),
        ), // This trailing comma makes auto-formatting nicer for build methods.
      ),
    );
  }
}
0
likes
0
points
25
downloads

Publisher

unverified uploader

Weekly Downloads

Secure unique key generator for Flutter.

Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

flutter, plugin_platform_interface

More

Packages that depend on flutter_key_generator