style: dart fix apply
This commit is contained in:
parent
504ee9c863
commit
c30895ab1e
|
@ -32,14 +32,19 @@ linter:
|
|||
prefer_final_locals: true
|
||||
use_super_parameters: true
|
||||
use_key_in_widget_constructors: false # waiting for auto fix: https://github.com/dart-lang/sdk/issues/50056
|
||||
avoid_print: false # TODO:
|
||||
|
||||
# TODO:
|
||||
avoid_print: false
|
||||
use_build_context_synchronously: false
|
||||
non_constant_identifier_names: false
|
||||
|
||||
analyzer:
|
||||
errors:
|
||||
todo: ignore
|
||||
fixme: ignore
|
||||
exclude:
|
||||
- "**/*.gql.dart"
|
||||
- "**/*.g.dart"
|
||||
invalid_annotation_target: ignore # https://github.com/rrousselGit/freezed#disabling-invalid_annotation_target-warning-and-warning-in-generates-files
|
||||
# TODO:
|
||||
unused_element: false
|
||||
override_on_non_overriding_member: false
|
||||
# Additional information about this file can be found at
|
||||
# https://dart.dev/guides/language/analysis-options
|
||||
|
|
|
@ -1,14 +0,0 @@
|
|||
# # Defines a default set of lint rules enforced for
|
||||
# # projects at Google. For details and rationale,
|
||||
# # see https://github.com/dart-lang/pedantic#enabled-lints.
|
||||
# include: package:pedantic/analysis_options.yaml
|
||||
|
||||
# # For lint rules and documentation, see http://dart-lang.github.io/linter/lints.
|
||||
# # Uncomment to specify additional rules.
|
||||
# # linter:
|
||||
# # rules:
|
||||
# # - camel_case_types
|
||||
|
||||
# analyzer:
|
||||
# # exclude:
|
||||
# # - path/to/excluded/files/**
|
|
@ -4,15 +4,15 @@ void main() async {
|
|||
final trending = GithubTrending();
|
||||
|
||||
// get trending repositories
|
||||
var repos = await trending.getTrendingRepositories();
|
||||
final repos = await trending.getTrendingRepositories();
|
||||
print(repos[0].name);
|
||||
|
||||
// specify time period
|
||||
var weeklyRepos = await trending.getTrendingRepositories(since: 'weekly');
|
||||
final weeklyRepos = await trending.getTrendingRepositories(since: 'weekly');
|
||||
print(weeklyRepos[0].name);
|
||||
|
||||
// specify language
|
||||
var dartRepos = await trending.getTrendingRepositories(language: 'dart');
|
||||
final dartRepos = await trending.getTrendingRepositories(language: 'dart');
|
||||
print(dartRepos[0].language); // Dart
|
||||
print(dartRepos[0].languageColor); // #00B4AB
|
||||
}
|
||||
|
|
|
@ -4,9 +4,9 @@ part 'model.g.dart';
|
|||
|
||||
@JsonSerializable()
|
||||
class GithubTrendingRepository {
|
||||
GithubTrendingRepository();
|
||||
factory GithubTrendingRepository.fromJson(Map<String, dynamic> json) =>
|
||||
_$GithubTrendingRepositoryFromJson(json);
|
||||
GithubTrendingRepository();
|
||||
String? author;
|
||||
String? name;
|
||||
String? avatar;
|
||||
|
@ -22,9 +22,9 @@ class GithubTrendingRepository {
|
|||
|
||||
@JsonSerializable()
|
||||
class GithubTrendingRepositoryBuiltBy {
|
||||
GithubTrendingRepositoryBuiltBy();
|
||||
factory GithubTrendingRepositoryBuiltBy.fromJson(Map<String, dynamic> json) =>
|
||||
_$GithubTrendingRepositoryBuiltByFromJson(json);
|
||||
GithubTrendingRepositoryBuiltBy();
|
||||
String? href;
|
||||
String? avatar;
|
||||
String? username;
|
||||
|
@ -32,9 +32,9 @@ class GithubTrendingRepositoryBuiltBy {
|
|||
|
||||
@JsonSerializable()
|
||||
class GithubTrendingDeveloper {
|
||||
GithubTrendingDeveloper();
|
||||
factory GithubTrendingDeveloper.fromJson(Map<String, dynamic> json) =>
|
||||
_$GithubTrendingDeveloperFromJson(json);
|
||||
GithubTrendingDeveloper();
|
||||
String? username;
|
||||
String? name;
|
||||
String? type;
|
||||
|
@ -45,10 +45,10 @@ class GithubTrendingDeveloper {
|
|||
|
||||
@JsonSerializable()
|
||||
class GithubTrendingDeveloperRepository {
|
||||
GithubTrendingDeveloperRepository();
|
||||
factory GithubTrendingDeveloperRepository.fromJson(
|
||||
Map<String, dynamic> json) =>
|
||||
_$GithubTrendingDeveloperRepositoryFromJson(json);
|
||||
GithubTrendingDeveloperRepository();
|
||||
String? name;
|
||||
String? description;
|
||||
String? url;
|
||||
|
|
Loading…
Reference in New Issue