tiled 0.2.1

  • Readme
  • Changelog
  • Installing
  • 78

Tiled Dart #

A Dart Tiled library.

Install from Dart Pub Repository #

Include the following in your pubspec.yaml:

  tiled: any

Usage #

Import the package like this:

import 'package:tiled/tiled.dart'

Load a TMX file into a string by any means, and then pass the string to an instance of TileMapParser.parse:

string tmxBody = /* ... */;
var parser = new TileMapParser();
TileMap map = parser.parse(tmxBody);

Credits #

TMX support is work of @radicaled and we have got his code from tmx.dart lib.

0.11.7 #

  • <object /> tags are now parsed for their type attribute

0.11.5 #

  • Added support for gzip compression

Use this package as a library

1. Depend on it

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

  tiled: ^0.2.1

2. Install it

You can install packages from the command line:

with pub:

$ pub get

with Flutter:

$ flutter pub get

Alternatively, your editor might support pub get or 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:tiled/tiled.dart';
Describes how popular the package is relative to other packages. [more]
Code health derived from static analysis. [more]
Reflects how tidy and up-to-date the package is. [more]
Weighted score of the above. [more]
Learn more about scoring.

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

  • Dart: 2.7.1
  • pana: 0.13.7

Health issues and suggestions

Document public APIs. (-0.44 points)

156 out of 159 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.

Fix lib/src/tile_map.dart. (-5.84 points)

Analysis of lib/src/tile_map.dart reported 12 hints, including:

line 7 col 28: Unnecessary new keyword.

line 8 col 24: Unnecessary new keyword.

line 11 col 3: Prefer using /// for doc comments.

line 22 col 28: Unnecessary new keyword.

line 24 col 12: Unnecessary new keyword.

Fix lib/src/tile_map_parser.dart. (-5.36 points)

Analysis of lib/src/tile_map_parser.dart reported 11 hints, including:

line 14 col 15: Unnecessary new keyword.

line 18 col 25: Prefer to use whereType on iterable.

line 25 col 28: Unnecessary new keyword.

line 28 col 26: Unnecessary new keyword.

line 31 col 32: Unnecessary new keyword.

Fix lib/src/layer.dart. (-2.96 points)

Analysis of lib/src/layer.dart reported 6 hints, including:

line 56 col 18: Unnecessary new keyword.

line 60 col 23: Unnecessary new keyword.

line 70 col 13: The value of the local variable 'flipped_horizontally' isn't used.

line 71 col 13: The value of the local variable 'flipped_vertically' isn't used.

line 72 col 13: The value of the local variable 'flipped_diagonally' isn't used.

Fix additional 6 files with analysis or formatting issues. (-6.47 points)

Additional issues in the following files:

  • lib/src/tileset.dart (5 hints)
  • lib/src/tile.dart (3 hints)
  • lib/src/object_group.dart (2 hints)
  • lib/src/tmx_object.dart (2 hints)
  • lib/src/node_dsl.dart (1 hint)
  • lib/src/image.dart (Run dartfmt to format lib/src/image.dart.)

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 (xml).

The package description is too short. (-20 points)

Add more detail to the description field of pubspec.yaml. Use 60 to 180 characters to describe the package, what it does, and its target use case.

Package is getting outdated. (-12.33 points)

The package was last published 58 weeks ago.

Maintain an example. (-10 points)

Create a short demo in the example/ directory to show how to use this package.

Common filename patterns include main.dart, example.dart, and tiled.dart. Packages with multiple examples should provide example/README.md.

For more information see the pub package layout conventions.


Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.0.0-dev.50.0 <3.0.0
archive ^2.0.5 2.0.13
convert ^2.0.1 2.1.1
crypto ^2.0.6 2.1.4
xml ^3.2.3 3.7.0 4.1.0
Transitive dependencies
args 1.6.0
charcode 1.1.3
collection 1.14.12
meta 1.1.8
path 1.6.4
petitparser 3.0.2
typed_data 1.1.6
Dev dependencies
test any