A new Flutter plugin project.

Getting Started

This project is a starting point for a Flutter plug-in package, a specialized package that includes platform-specific implementation code for Android and/or iOS.

For help getting started with Flutter development, view the online documentation, which offers tutorials, samples, guidance on mobile development, and a full API reference.


import 'package:flutter/material.dart';
import 'package:jwtson/jwtson.dart';

void main() {
  runApp(const MyApp());

class MyApp extends StatefulWidget {
  const MyApp({Key? key}) : super(key: key);

  State<MyApp> createState() => _MyAppState();

class _MyAppState extends State<MyApp> {
  final _jwtsonPlugin = Jwtson();

  void initState() {

  Widget build(BuildContext context) {
    return MaterialApp(
      home: Scaffold(
        appBar: AppBar(
          title: const Text('Jwtson example app'),
        body: Center(
          child: ElevatedButton(
              onPressed: () async {
                // generate and sign jwt token
                var data = await _jwtsonPlugin.generateToken(key: "test", data: {"key": "value"});
                // decode jwt token
                var decode = await _jwtsonPlugin.decodeJwtToken(key: "test", data: data);
              child: const Text('click me')),