file_type 1.0.6

  • Readme
  • Changelog
  • Example
  • Installing
  • 46

file_type #

Checks the type(s) of a file. For example, .circleci.yml is either .yml, or .circleci.yml.


  • Update README.


  • Update link to repo.

v1.0.4 #

  • Deprecated project

v1.0.2 #

  • Fixed documentation

v1.0.1 #

  • Fixed documentation

v1.0.0 #

  • First release


import 'dart:io';

import 'package:file_type/file_type.dart';

main() => Directory.current.list(recursive: true).listen((entity) {
      if (entity is File && getLastFileType(entity.path) == '.dart') {
        print('Dart file found! ${entity.path}');

Use this package as a library

1. Depend on it

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

  file_type: ^1.0.6

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:file_type/file_type.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 Mar 30, 2020, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.7.1
  • pana: 0.13.6

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.


Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.0.0-dev.65.0 <3.0.0
Dev dependencies
link_checker ^1.1.0
test ^1.3.0