android_signature 0.0.1 android_signature: ^0.0.1 copied to clipboard
Android signature provider for Flutter.
import 'package:flutter/material.dart';
import 'dart:async';
import 'package:flutter/services.dart';
import 'package:android_signature/android_signature.dart';
void main() {
runApp(MyApp());
}
class MyApp extends StatefulWidget {
@override
_MyAppState createState() => _MyAppState();
}
class _MyAppState extends State<MyApp> {
Future<String>? signature;
@override
void initState() {
super.initState();
Future.delayed(Duration.zero, () async {
setState(() {
signature = AndroidSignature.signature();
});
});
}
@override
Widget build(BuildContext context) {
return MaterialApp(
home: Scaffold(
appBar: AppBar(
title: const Text('Plugin example app'),
),
body: Center(
child: FutureBuilder(
future: signature,
builder: (context, snapshot) {
print("${snapshot.data}");
return Text("${snapshot.data}");
}
),
),
),
);
}
}