passwordlezz 0.0.1+1

  • Readme
  • Changelog
  • Example
  • Installing
  • new50

Passwordlezz #

Note that this package is still in development and documentation will be added later

A new way to let user login to the apps they love.

Easy to use no password login. Users can log in via a qr-code or filling out their email and clicking the correct number on a trusted device.

Getting Started #

For now, you can get an appId by emailing me. This wil later be replaced by a panel.

Opening the auth ui.

PasswordlezzButton(
    callback: (r) => _result(r),
    appId: 'appId',
),

Handeling result.

There are two states the result can have. With the token, or rejected.

  _result(AuthResult result) {
    setState(() {
      if(result.getToken() != null) {
        this.token = result.getToken();
        this.message = 'You are verified!';
      } else if(result.rejected) {
        this.token = null;
        this.message = 'You were rejected!';
      } else {
        this.token = null;
        this.message = null;
      }
    });
  }

0.0.1+1 #

  • Updated description
  • Formatted files

0.0.1 #

  • Created the basic app.
  • Created Example
  • Made the authentication stable.

example/lib/main.dart

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

void main() => runApp(MyApp());

class MyApp extends StatefulWidget {
  @override
  _MyAppState createState() => _MyAppState();
}

class _MyAppState extends State<MyApp> {

  String message;

  String token;
  bool isDark = false;

  _dark(bool dark) {
    setState(() {
      isDark = dark;
    });
  }
  _result(AuthResult result) {
    setState(() {
      if(result.getToken() != null) {
        this.token = result.getToken();
        this.message = 'You are verified!';
      } else if(result.rejected) {
        this.token = null;
        this.message = 'You were rejected!';
      } else {
        this.token = null;
        this.message = null;
      }
    });
  }

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      debugShowCheckedModeBanner: false,
      theme: isDark ? ThemeData.dark() : ThemeData.light(),
      home: Scaffold(
        body: SizedBox.expand(
          child: Column(
            mainAxisAlignment: MainAxisAlignment.center,
            children: <Widget>[

              if(message != null) Padding(
                padding: const EdgeInsets.all(8.0),
                  child: Text(
                    message,
                    style: Theme.of(context).textTheme.display1.copyWith(
                        color: isDark ? Colors.white : Colors.grey[700]),
                  ),
                ),

              if(token != null || message != null) SizedBox(height: 30,),

              PasswordlezzButton(
                callback: (r) => _result(r),
                appId: 'rxjfXzFUwpUBkT1oPJV4',
              ),
              SizedBox(height: 20,),
              Switch(
                value: isDark,
                onChanged: _dark,
              ),
            ],
          ),
        ),
      ),
    );
  }
}

Use this package as a library

1. Depend on it

Add this to your package's pubspec.yaml file:


dependencies:
  passwordlezz: ^0.0.1+1

2. Install it

You can install packages from the command line:

with Flutter:


$ flutter pub get

Alternatively, your editor might support flutter pub get. Check the docs for your editor to learn more.

3. Import it

Now in your Dart code, you can use:


import 'package:passwordlezz/passwordlezz.dart';
  
Popularity:
Describes how popular the package is relative to other packages. [more]
8
Health:
Code health derived from static analysis. [more]
100
Maintenance:
Reflects how tidy and up-to-date the package is. [more]
80
Overall:
Weighted score of the above. [more]
50
Learn more about scoring.

We analyzed this package on Mar 27, 2020, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.7.1
  • pana: 0.13.6
  • Flutter: 1.12.13+hotfix.8

Health suggestions

Format lib/src/passwordlezz/data.dart.

Run flutter format to format lib/src/passwordlezz/data.dart.

Format lib/src/passwordlezz/widgets.dart.

Run flutter format to format lib/src/passwordlezz/widgets.dart.

Maintenance suggestions

Package is pre-v0.1 release. (-10 points)

While nothing is inherently wrong with versions of 0.0.*, it might mean that the author is still experimenting with the general direction of the API.

The description is too long. (-10 points)

Search engines display only the first part of the description. Try to keep the value of the description field in your package's pubspec.yaml file between 60 and 180 characters.

Dependencies

Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.7.0 <3.0.0
email_validator ^1.0.4 1.0.4
flare_dart ^2.3.3 2.3.3
flare_flutter ^2.0.1 2.0.1
flutter 0.0.0
http ^0.12.0+4 0.12.0+4
percent_indicator ^2.1.1+1 2.1.1+1
provider ^4.0.4 4.0.4 4.1.0-dev+2
qr_flutter ^3.2.0 3.2.0
Transitive dependencies
async 2.4.1
charcode 1.1.3
collection 1.14.11 1.14.12
http_parser 3.1.4
meta 1.1.8
nested 0.0.4
path 1.6.4
pedantic 1.9.0
qr 1.2.0
sky_engine 0.0.99
source_span 1.7.0
string_scanner 1.0.5
term_glyph 1.1.0
typed_data 1.1.6
vector_math 2.0.8
Dev dependencies
flutter_test