hash_generator 0.5.2 hash_generator: ^0.5.2 copied to clipboard
Esse pacote tem como objetivo gerar um código serial com a até 500 caracteres, optar por ter um padrão inicial e/ou final, ou escolher entre letras, numeros e simbolos.
import 'package:flutter/material.dart';
import 'package:hash_generator/hash_generator.dart';
void main() {
runApp(MyApp());
}
class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return MaterialApp(
title: "Demo Hash Generator",
home: HashApplication(),
);
}
}
class HashApplication extends StatefulWidget {
@override
_HashApplicationState createState() => _HashApplicationState();
}
class _HashApplicationState extends State<HashApplication> {
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
title: Text("Hash Generator"),
),
body: Container(
child: Text("Codigo hash: " +
HashGenerator.generate(
lenght: 20,
startWith: "BR-897",
endWith: 29.90.toString(),
withSymbol: false,
withNumber: true,
withLetter: false)),
),
);
}
}