sample_remote_data 1.0.1

  • Readme
  • Example
  • Installing
  • new43

sample_remote_data #

A sample Dart package for fetching remote data.

example/main.dart

import 'package:sample_remote_data/sample_remote_data.dart';

void main() async {

  // User class is exported from `main.dart` file
  Iterable<User> users = await getUsers();

  // for each item in users, print full name
  users.forEach( ( user ) {
    print( "User ${ user.id } is ${ user.getFullName() }" );
  } );
}

Use this package as a library

1. Depend on it

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


dependencies:
  sample_remote_data: ^1.0.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:sample_remote_data/sample_remote_data.dart';
  
Popularity:
Describes how popular the package is relative to other packages. [more]
0
Health:
Code health derived from static analysis. [more]
99
Maintenance:
Reflects how tidy and up-to-date the package is. [more]
67
Overall:
Weighted score of the above. [more]
43
Learn more about scoring.

We analyzed this package on Oct 9, 2019, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.5.1
  • pana: 0.12.21

Platforms

Detected platforms: Flutter, web, other

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

Health suggestions

Fix lib/sample_remote_data.dart. (-0.50 points)

Analysis of lib/sample_remote_data.dart reported 1 hint:

line 14 col 1: Prefer using /// for doc comments.

Fix lib/src/classes.dart. (-0.50 points)

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

line 1 col 1: Prefer using /// for doc comments.

Fix lib/src/functions.dart. (-0.50 points)

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

line 12 col 1: Prefer using /// for doc comments.

Maintenance issues and suggestions

Provide a file named CHANGELOG.md. (-20 points)

Changelog entries help developers follow the progress of your package. See the example generated by stagehand.

The package description is too short. (-13 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.

Dependencies

Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.0.0 <3.0.0
http ^0.12.0+2 0.12.0+2
Transitive dependencies
async 2.4.0
charcode 1.1.2
collection 1.14.12
http_parser 3.1.3
meta 1.1.7
path 1.6.4
pedantic 1.8.0+1
source_span 1.5.5
string_scanner 1.0.5
term_glyph 1.1.0
typed_data 1.1.6