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

Secure unique 128, 192, 256 bit key generator for Flutter iOS & Android.

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> {
  void genUniqueKey() async {
    try {
      final key = await FlutterKeyGenerator.generateSymmetricKey(256);
      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: genUniqueKey,
          tooltip: 'Increment',
          child: const Icon(Icons.add),
        ), // This trailing comma makes auto-formatting nicer for build methods.
      ),
    );
  }
}
0
likes
160
pub points
0%
popularity

Publisher

unverified uploader

Secure unique 128, 192, 256 bit key generator for Flutter iOS & Android.

Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (license)

Dependencies

flutter

More

Packages that depend on flutter_key_generator