persian_flutter 0.1.3

persian_flutter #

Persian date picker, time picker and localization for flutter.

Getting Started #

A simple example on how to display a Persian datepicker.

Import the package

import 'package:persian_flutter/persian_flutter.dart';

Call the picker

RaisedButton(onPressed: () async {
    final date = await showPersianDatePicker(
      context: context,
      initialDate: DateTime.now(),
      firstDate: DateTime.now().add(
      Duration(days: -1),
      ),
      lastDate: DateTime.now().add(
      Duration(days: 90),
      ),
    );
    
    if(date != null)
    {
      // Do simething.
    }
  },
  child: Text('Show date picker'),
);

[0.0.1] - 2019/12/28: Initial release.

[0.0.2] - 2019/12/30: Added PersianMaterialLocalization.

[0.0.3] - 2019/12/31: Added PersianLocalizationDelegate.

[0.0.4] - 2020/01/02: Added a simple documentation and usage example.

[0.1.0] - 2020/01/18: Example project.

[0.1.3] - 2020/01/21: Update license.

example/README.md

persian_flutter #

Persian date picker, time picker and localization for flutter.

Getting Started #

A simple example on how to display a Persian datepicker.

Import the package

import 'package:persian_flutter/persian_flutter.dart';

Call the picker

RaisedButton(onPressed: () async {
    final date = await showPersianDatePicker(
      context: context,
      initialDate: DateTime.now(),
      firstDate: DateTime.now().add(
      Duration(days: -1),
      ),
      lastDate: DateTime.now().add(
      Duration(days: 90),
      ),
    );
    
    if(date != null)
    {
      // Do simething.
    }
  },
  child: Text('Show date picker'),
);

Use this package as a library

1. Depend on it

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


dependencies:
  persian_flutter: ^0.1.3

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

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

  • Dart: 2.7.1
  • pana: 0.13.5
  • Flutter: 1.12.13+hotfix.7

Maintenance issues and suggestions

Support latest dependencies. (-10 points)

The version constraint in pubspec.yaml does not support the latest published versions for 1 dependency (shamsi_date).

Dependencies

Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.6.0 <3.0.0
flutter 0.0.0
persian ^0.1.1 0.1.4
shamsi_date ^0.7.1 0.7.1 0.8.1
Transitive dependencies
collection 1.14.11 1.14.12
meta 1.1.8
sky_engine 0.0.99
typed_data 1.1.6
vector_math 2.0.8
Dev dependencies
flutter_test