tiled 0.2.1

  • Readme
  • Changelog
  • Installing
  • 79

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 Nov 9, 2019, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.6.0
  • pana: 0.12.21


Detected platforms: Flutter, web, other

No platform restriction found in primary library package:tiled/tiled.dart.

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. (-1.99 points)

Analysis of lib/src/tile_map.dart reported 4 hints:

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

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

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

line 60 col 7: 'onError' is deprecated and shouldn't be used.

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

Analysis of lib/src/layer.dart reported 3 hints:

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 lib/src/tileset.dart. (-0.50 points)

Analysis of lib/src/tileset.dart reported 1 hint:

line 69 col 9: Use isNotEmpty instead of length

Fix additional 5 files with analysis or formatting issues. (-0.50 points)

Additional issues in the following files:

  • lib/src/tmx_object.dart (1 hint)
  • lib/src/image.dart (Run dartfmt to format lib/src/image.dart.)
  • lib/src/node_dsl.dart (Run dartfmt to format lib/src/node_dsl.dart.)
  • lib/src/object_group.dart (Run dartfmt to format lib/src/object_group.dart.)
  • lib/src/tile_map_parser.dart (Run dartfmt to format lib/src/tile_map_parser.dart.)

Maintenance suggestions

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.

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.11
convert ^2.0.1 2.1.1
crypto ^2.0.6 2.1.3
xml ^3.2.3 3.5.0
Transitive dependencies
args 1.5.2
charcode 1.1.2
collection 1.14.12
meta 1.1.8
path 1.6.4
petitparser 2.4.0
typed_data 1.1.6
Dev dependencies
test any