youtube_parser 1.1.0

  • Readme
  • Changelog
  • Installing
  • 82

Dart YouTube Parser #

Usage #

import 'package:youtube_parser/youtube_parser.dart';

String foo = getIdFromUrl('');
// returns 'CBWlfU_na-2'

String bar = getIdFromUrl('');
// returns null

1.1.0 #

  • Possibly breaking: url checking is now a bit stricter
  • Use built-in Uri class instead of RegExp
  • Add more tests

1.0.0 #

  • Breaking: url parameter with whitepaces will no longer work
  • Breaking: optional trimWhitespace parameter has been removed
  • Breaking: url parameter must not be null, otherwise an ArgumentError will be thrown
  • Fix hints
  • Add some tests

0.9.2 #

  • Fix regex
  • Add tests
  • Bump up allowed SDK version

Use this package as a library

1. Depend on it

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

  youtube_parser: ^1.1.0

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

  • Dart: 2.7.1
  • pana: 0.13.6

Health suggestions

Format lib/youtube_parser.dart.

Run dartfmt to format lib/youtube_parser.dart.

Maintenance suggestions

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 youtube_parser.dart. Packages with multiple examples should provide example/

For more information see the pub package layout conventions.


Package Constraint Resolved Available
Direct dependencies
Dart SDK >=1.12.0 <3.0.0
Dev dependencies
test ^1.6.0