not_paid 1.0.0

  • Readme
  • Changelog
  • Example
  • Installing
  • 65

not_paid #

Worried about your payment? Using this package you can provide a non paid version of your app to the client that consistently starts fading out the app/sections after the due date, and fades it out completly when the deadline is exceeded.

Supported Dart Versions #

Dart SDK version >= 2.1.0

Demo #

Before due date demo After due date(mid deadline) demo Deadline exceeded demo

Installation #

Pub

Add the Package

dependencies:
  not_paid: ^1.0.0

How to use #

Import the package in your dart file

import 'package:not_paid/not_paid.dart';

Wrap the widget which ever you want to fade out under the NotPaid widget. To fade out the whole app just wrap your material app inside the NotPaid widget.

class MyApp extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return NotPaid(
      // Due date after which the app fading starts.
      dueDate: DateTime(2020, 6, 1),
      // As this deadline day reaches the app completely fades away.
      deadlineDays: 10,
      child: MaterialApp(
        title: 'Not-Paid Demo',
        debugShowCheckedModeBanner: false,
        theme: ThemeData(
          primarySwatch: Colors.blue,
        ),
        home: DemoPage(title: 'Not Paid Demo Page'),
      ),
    );
  }
}

Required params #

These are the basic params required by NotPaid widget.

ParamsType
dueDateDateTime
deadlineDaysint
childWidget

Inspire from #

not-paid by @kleampa

Created & Maintained By #

Harpreet Singh

Damanpreet Singh

License #

Copyright 2020 Harpreet Singh & Damanpreet Singh

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

[1.0.0] - Release #

  • Section/App fade starts after due date
  • Section/App completely fades when deadline exceeds

example/lib/main.dart

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

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

class MyApp extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return NotPaid(
      // Due date after which the app fading starts.
      dueDate: DateTime(2020, 6, 1),
      // As this deadline day reaches the app completely fades away.
      deadlineDays: 10,
      child: MaterialApp(
        title: 'Not-Paid Demo',
        debugShowCheckedModeBanner: false,
        theme: ThemeData(
          primarySwatch: Colors.blue,
        ),
        home: DemoPage(title: 'Not Paid Demo Page'),
      ),
    );
  }
}

class DemoPage extends StatefulWidget {
  DemoPage({Key key, this.title}) : super(key: key);

  final String title;

  @override
  _DemoPageState createState() => _DemoPageState();
}

class _DemoPageState extends State<DemoPage> {
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: Text(widget.title),
      ),
      body: Center(
        child: Column(
          mainAxisAlignment: MainAxisAlignment.center,
          children: <Widget>[
            Padding(
              padding: const EdgeInsets.all(32.0),
              child: Text(
                "Your App content",
                style: TextStyle(
                    fontSize: 24,
                    color: Colors.green,
                    fontWeight: FontWeight.bold),
              ),
            )
          ],
        ),
      ),
    );
  }
}

Use this package as a library

1. Depend on it

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


dependencies:
  not_paid: ^1.0.0

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:not_paid/not_paid.dart';
  
Popularity:
Describes how popular the package is relative to other packages. [more]
30
Health:
Code health derived from static analysis. [more]
100
Maintenance:
Reflects how tidy and up-to-date the package is. [more]
100
Overall:
Weighted score of the above. [more]
65
Learn more about scoring.

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

  • Dart: 2.8.4
  • pana: 0.13.14
  • Flutter: 1.17.5

Analysis suggestions

Package not compatible with SDK dart

Because:

  • not_paid that is a package requiring null.

Dependencies

Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.1.0 <3.0.0
flutter 0.0.0
Transitive dependencies
collection 1.14.12 1.14.13
meta 1.1.8 1.2.1
sky_engine 0.0.99
typed_data 1.1.6 1.2.0
vector_math 2.0.8 2.1.0-nullsafety
Dev dependencies
flutter_test