project_core 1.0.3

  • Readme
  • Changelog
  • Example
  • Installing
  • 64

crp_core #

Pacote Core

Getting Started #

This project is a starting point for a Dart package, a library module containing code that can be shared easily across multiple Flutter or Dart projects.

For help getting started with Flutter, view our online documentation, which offers tutorials, samples, guidance on mobile development, and a full API reference.

[0.0.1] - 03-04-2020 #

  • Projeto core versão inicial

[1.0.0] - 03-04-2020 #

  • Adicionado projeto de exemplo

[1.0.1] - 09-04-2020 #

  • Ajustado provider do graphql para aceitar o tipo da query enviada

[1.0.2] - 04-05-2020 #

  • Ajustado melhorias nas mensagens de error.

[1.0.3] - 08-05-2020 #

  • Ajustado melhorias no bloc.

example/lib/main.dart

import 'dart:io';

import 'package:project_core/env/EnvConfig.dart';
import 'package:flutter/material.dart';
import 'package:provider/provider.dart';

import 'env/env.dart';
import 'locale/AppLanguage.dart';
import 'ui/App.dart';

void main() async {
  WidgetsFlutterBinding.ensureInitialized();
  AppLanguage appLanguage = AppLanguage();
  Env.instance.setEnv(env);
  await appLanguage.fetchLocale();
  runApp(MultiProvider(
      providers: [
        ChangeNotifierProvider<AppLanguage>(create: (_) => appLanguage)
      ],
      child: Consumer<AppLanguage>(builder: (context, model, child) {
        return App(appLanguage: model);
      })));
}

Use this package as a library

1. Depend on it

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


dependencies:
  project_core: ^1.0.3

2. Install it

You can install packages from the command line:

with Flutter:


$ flutter pub get

Alternatively, your editor might support 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:project_core/project_core.dart';
  
Popularity:
Describes how popular the package is relative to other packages. [more]
33
Health:
Code health derived from static analysis. [more]
99
Maintenance:
Reflects how tidy and up-to-date the package is. [more]
90
Overall:
Weighted score of the above. [more]
64
Learn more about scoring.

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

  • Dart: 2.8.4
  • pana: 0.13.13
  • Flutter: 1.17.5

Analysis suggestions

Package not compatible with SDK dart

because of import path [project_core] that is in a package requiring null.

Health issues and suggestions

Document public APIs. (-0.46 points)

269 out of 274 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/core/provider/ApiGraphqlProvider.dart. (-0.50 points)

Analysis of lib/core/provider/ApiGraphqlProvider.dart reported 1 hint:

line 60 col 33: The exception variable 'e' isn't used, so the 'catch' clause can be removed.

Format lib/core/http/AppHttpResponse.dart.

Run flutter format to format lib/core/http/AppHttpResponse.dart.

Format lib/core/provider/RestProvider.dart.

Run flutter format to format lib/core/provider/RestProvider.dart.

Fix additional 3 files with analysis or formatting issues.

Additional issues in the following files:

  • lib/default/repository/DefaultGraphqlRepository.dart (Run flutter format to format lib/default/repository/DefaultGraphqlRepository.dart.)
  • lib/env/EnvConfig.dart (Run flutter format to format lib/env/EnvConfig.dart.)
  • lib/http/provider/DioRestProvider.dart (Run flutter format to format lib/http/provider/DioRestProvider.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 (rxdart).

Dependencies

Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.1.0 <3.0.0
connectivity ^0.4.8+2 0.4.9
dio ^3.0.8 3.0.9
flutter 0.0.0
graphql_flutter ^3.0.0 3.0.1 4.0.0-alpha.1
http ^0.12.0+4 0.12.1
provider ^4.0.4 4.2.0
rxdart ^0.23.1 0.23.1 0.24.1
shared_preferences ^0.5.6 0.5.8
Transitive dependencies
charcode 1.1.3
collection 1.14.12 1.14.13
connectivity_for_web 0.3.0
connectivity_macos 0.1.0+3
connectivity_platform_interface 1.0.6
convert 2.1.1
crypto 2.1.5
file 5.2.1
flutter_web_plugins 0.0.0
gql 0.12.3 0.12.4-alpha+1590789520945
graphql 3.0.2 4.0.0-alpha.1
http_parser 3.1.4
intl 0.16.1
js 0.6.2
matcher 0.12.8
meta 1.1.8 1.2.1
mime 0.9.6+3
nested 0.0.4
path 1.7.0
path_provider 1.6.11
path_provider_linux 0.0.1+2
path_provider_macos 0.0.4+3
path_provider_platform_interface 1.0.2
pedantic 1.9.0 1.9.1
platform 2.2.1
plugin_platform_interface 1.0.2
process 3.0.13
quiver 2.1.3
shared_preferences_linux 0.0.2+1
shared_preferences_macos 0.0.1+10
shared_preferences_platform_interface 1.0.4
shared_preferences_web 0.1.2+7
sky_engine 0.0.99
source_span 1.7.0
stack_trace 1.9.5
string_scanner 1.0.5
term_glyph 1.1.0
typed_data 1.1.6 1.2.0
uuid_enhanced 3.0.2
vector_math 2.0.8
websocket 0.0.5
xdg_directories 0.1.0
Dev dependencies
flutter_test