bangla_utilities 0.1.1

  • Readme
  • Changelog
  • Example
  • Installing
  • 53

bangla_utilities #

This plugin provides all necessary functionality to get weekday, day, month, monthName, year and season from current date or from a provided date. It also provides leap-year checker and English to Bangla number converter as well. All APIs are provided as static-method of the BanglaUtility class.

Example

Github

Prohelika

Getting Started #

  • Install by adding the package to your pubspec.yaml under dependency.

  • Import

  • var date = BanglaUtility.getBanglaDate(day: day, month: month, year: year)

0.1.1 #

  • Added API documentations

0.0.1 #

initial release:
  • added English to Bangla number converter
  • added leap year checker
  • added Bangla weekday, day, month, monthName, year and season

example/lib/main.dart

import 'package:bangla_utilities/bangla_utilities.dart';
import 'package:flutter/material.dart';
import 'package:flutter/widgets.dart';

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

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

class _MyAppState extends State<MyApp> {
  @override
  void initState() {
    super.initState();
  }

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: Scaffold(
        appBar: AppBar(
          title: const Text('Bangla Utilities Plugin example app'),
        ),
        body: Column(
          mainAxisAlignment: MainAxisAlignment.center,
          children: [
            Padding(
              padding: EdgeInsets.all(8.0),
              child: Row(
                mainAxisAlignment: MainAxisAlignment.center,
                children: [
                  Text('Bangla date of 31st May 2020: '),
                  //
                  //
                  //day, month and year is optional parameter! Uses provide values or current date if not provided!
                  Text(
                      '${BanglaUtility.getBanglaDate(day: 31, month: 05, year: 2020)}'),
                ],
              ),
            ),
            Padding(
              padding: EdgeInsets.all(8.0),
              child: Row(
                mainAxisAlignment: MainAxisAlignment.center,
                children: [
                  Text('Bangla Month Name: '),
                  Text(
                      '${BanglaUtility.getBanglaMonthName(day: 31, month: 05, year: 2020)}'),
                ],
              ),
            ),
            Padding(
              padding: EdgeInsets.all(8.0),
              child: Row(
                mainAxisAlignment: MainAxisAlignment.center,
                children: [
                  Text('Bangla Weekday: '),
                  Text(
                      '${BanglaUtility.getBanglaWeekday(day: 31, month: 05, year: 2020)}'),
                ],
              ),
            ),
            Padding(
              padding: EdgeInsets.all(8.0),
              child: Row(
                mainAxisAlignment: MainAxisAlignment.center,
                children: [
                  Text('Bangla Season: '),
                  Text(
                      '${BanglaUtility.getBanglaSeason(day: 31, month: 05, year: 2020)}'),
                ],
              ),
            ),
            Padding(
              padding: EdgeInsets.all(8.0),
              child: Row(
                mainAxisAlignment: MainAxisAlignment.center,
                children: [
                  Text('1234 in Bangla: '),
                  //
                  //
                  //englishDigit is a Required parameter or else returns null
                  Text(
                      '${BanglaUtility.englishToBanglaDigit(englishDigit: 1234)}'),
                ],
              ),
            ),
          ],
        ),
      ),
    );
  }
}

Use this package as a library

1. Depend on it

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


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

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

  • Dart: 2.8.4
  • pana: 0.13.15
  • Flutter: 1.17.5

Analysis suggestions

Package does not support Flutter platform Web

Because:

  • package:bangla_utilities/bangla_utilities.dart that declares support for platforms: Android, iOS, Linux

Package does not support Flutter platform Windows

Because:

  • package:bangla_utilities/bangla_utilities.dart that declares support for platforms: Android, iOS, Linux

Package does not support Flutter platform macOS

Because:

  • package:bangla_utilities/bangla_utilities.dart that declares support for platforms: Android, iOS, Linux

Package not compatible with SDK dart

Because:

  • bangla_utilities that is a package requiring null.

Health issues and suggestions

Document public APIs. (-1 points)

21 out of 21 API elements have no dartdoc comment.Providing good documentation for libraries, classes, functions, and other API elements improves code readability and helps developers find and use your API.

Dependencies

Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.7.0 <3.0.0
flutter 0.0.0
Transitive dependencies
collection 1.14.12 1.14.13
meta 1.1.8 1.2.2
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