mensapluskit 0.1.0

  • README.md
  • CHANGELOG.md
  • Example
  • Installing
  • Versions
  • 58

mensapluskit

A small dart library to access the latest menus of all student canteens in Dresden.

Created from templates made available by Stagehand under a BSD-style license.

Usage

A simple usage example:

import 'package:mensapluskit/mensapluskit.dart';

main() async {
 
  var canteens = await MensaPlusKit.getCanteens();
  
  var canteen = canteens.first
  
  // Get today's menu
  var todayMenu = await canteen.getMenu(new DateTime.now());
  todayMenu.items.forEach((item) {
    if (item is Meal) {
      // the item could be a meal..
    } else {
      // the item could be an information..
    }
  });
  
}

Changelog

0.1.0

  • Added exceptions.
  • Added today and tomorrow menu parsing into functionality.

0.0.1

  • Initial version

example/mensapluskit_example.dart

import 'package:mensapluskit/mensapluskit.dart';

main() async {

  var canteens = await MensaPlusKit.getCanteens();
  var todayMenu = await canteens.first.getMenu(new DateTime.now());
  todayMenu.items.forEach((item) {
    if (item is Meal) {
      print(item);
    } else {
      print(item);
    }
  });
}

Use this package as a library

1. Depend on it

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


dependencies:
  mensapluskit: "^0.1.0"

2. Install it

You can install packages from the command line:

with pub:


$ pub get

with Flutter:


$ flutter packages get

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

3. Import it

Now in your Dart code, you can use:


      import 'package:mensapluskit/mensapluskit.dart';
  
Version Uploaded Documentation Archive
0.1.0 Apr 3, 2018 Go to the documentation of mensapluskit 0.1.0 Download mensapluskit 0.1.0 archive
0.0.1 Mar 15, 2018 Go to the documentation of mensapluskit 0.0.1 Download mensapluskit 0.0.1 archive

Analysis

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

  • Dart: 2.0.0-dev.63.0
  • pana: 0.11.3

Scores

Popularity:
Describes how popular the package is relative to other packages. [more]
20 / 100
Health:
Code health derived from static analysis. [more]
98 / 100
Maintenance:
Reflects how tidy and up-to-date the package is. [more]
95 / 100
Overall score:
Weighted score of the above. [more]
58
Learn more about scoring.

Platforms

Detected platforms: Flutter, other

Primary library: package:mensapluskit/mensapluskit.dart with components: io.

Suggestions

  • Use constrained dependencies.

    The pubspec.yaml contains 1 dependency without version constraints. Specify version ranges for the following dependencies: html.

  • Fix analysis and formatting issues.

    Analysis or formatting checks reported 12 hints.

    Run dartfmt to format lib/mensapluskit.dart.

    Run dartfmt to format lib/src/exceptions.dart.

    Similar analysis of the following files failed:

    • lib/src/models.dart (hint)
    • lib/src/parser.dart (hint)
    • lib/src/utils.dart (hint)
  • Package is pre-v1 release.

    While there is nothing inherently wrong with versions of 0.*.*, it usually means that the author is still experimenting with the general direction API.

Dependencies

Package Constraint Resolved Available
Direct dependencies
Dart SDK >=1.20.1 <2.0.0
html any 0.13.3+1
http ^0.11.3+16 0.11.3+16
intl ^0.15.2 0.15.6
path ^1.5.1 1.6.1
uuid ^0.5.3 0.5.3 1.0.0
Transitive dependencies
args 1.4.3
async 2.0.7
charcode 1.1.1
collection 1.14.10
convert 2.0.1
crypto 2.0.5
csslib 0.14.4
http_parser 3.1.2
logging 0.11.3+1
source_span 1.4.0
string_scanner 1.0.2
typed_data 1.1.5
utf 0.9.0+4
Dev dependencies
test ^0.12.0