session_jar

Creator: coderz1093

Last updated:

0 purchases

TODO
Add to Cart

Description:

session jar

Session Jar #
A simple server side package for creating and maintaining sessions in dart.
Usage #
import 'package:session_jar/session_jar.dart';

void main() {
//create a session jar
var sessionJar = SessionJar();

//add a session to your sessionjar
var newSession =
sessionJar.create('username', expiresIn: Duration(hours: 12));

//send your session back to the client as a cookie
var cookie = newSession.cookie;
print(newSession.cookie);

//get a session from a cookie
var sessionFromRequest = sessionJar.fromCookie(cookie);

//do something with your session data
print(sessionFromRequest?.body ?? 'session not found!');
}

copied to clipboard
To do: #

❌ Every session has its own expiration timer. this is not efficient in large projects. So I will improve the automatic session deletion in the future.

Features and bugs #
Please file feature requests and bugs at the issue tracker.

License

For personal and professional use. You cannot resell or redistribute these repositories in their original state.

Files In This Product:

Customer Reviews

There are no reviews.

Related Products

More From This Creator