danisoft_utils 1.2.1 danisoft_utils: ^1.2.1 copied to clipboard
This package helps to manage the transitions between screens in an elegant and simple way, it also helps the creation of jwt.
danisoft_utils #
This package helps to manage the transitions between screens in an elegant and simple way, it also helps the creation of jwt ...!
Example #
///manage transitions between screens in an elegant and easy way
PageRouteTransition(
context: context,
page: Page2(),
animation: AnimationType.fadeIn,
duration: Duration(milliseconds: 100),
replacement: true,
);
///generate un Jwt
final claimSet = new JwtClient(
issuer: 'danisoft_utils',
subject: 'code_ds',
audience: <String>['danisoft.com.co', 'www.danisoft.com.co'],
jwtId: _randomString(32),
otherClaims: <String, dynamic>{
"datos": {
"IdUsuario": "prueba 1",
"nombre": "My name",
"apellidos": "My Apellidos",
"direccion": "My direccion",
"tel": "My tel"
},
"Rtyp": "Rtyp",
"typ": "authnresponse",
"pld": {'k': 'v'}
},
maxAge: const Duration(minutes: 5));
// Generate a JWT from the claim set
final token = issueJwtHS256(claimSet, sharedSecret);
print('JWT: "$token"\n');