mirror of
https://github.com/git-touch/git-touch
synced 2025-01-26 13:54:53 +01:00
fix: add missing files, remove legacy imports
This commit is contained in:
parent
7fe5575d25
commit
c4399a9a72
@ -16,7 +16,7 @@ targets:
|
||||
# create_to_json: true
|
||||
# disallow_unrecognized_keys: false
|
||||
# explicit_to_json: false
|
||||
field_rename: snake
|
||||
# field_rename: snake
|
||||
# generate_to_json_function: true
|
||||
# include_if_null: true
|
||||
# nullable: true
|
||||
|
@ -7,7 +7,6 @@ import 'screens/notifications.dart';
|
||||
import 'screens/search.dart';
|
||||
import 'screens/me.dart';
|
||||
import 'screens/login.dart';
|
||||
import 'screens/pull_request.dart';
|
||||
import 'screens/issue.dart';
|
||||
import 'screens/repos.dart';
|
||||
|
||||
|
22
lib/models/account.dart
Normal file
22
lib/models/account.dart
Normal file
@ -0,0 +1,22 @@
|
||||
import 'package:json_annotation/json_annotation.dart';
|
||||
import 'package:meta/meta.dart';
|
||||
|
||||
part 'account.g.dart';
|
||||
|
||||
@JsonSerializable()
|
||||
class AccountModel {
|
||||
String avatarUrl;
|
||||
String token;
|
||||
String domain;
|
||||
|
||||
AccountModel({
|
||||
@required this.avatarUrl,
|
||||
@required this.token,
|
||||
this.domain,
|
||||
});
|
||||
|
||||
factory AccountModel.fromJson(Map<String, dynamic> json) =>
|
||||
_$AccountModelFromJson(json);
|
||||
|
||||
Map<String, dynamic> toJson() => _$AccountModelToJson(this);
|
||||
}
|
21
lib/models/account.g.dart
Normal file
21
lib/models/account.g.dart
Normal file
@ -0,0 +1,21 @@
|
||||
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||
|
||||
part of 'account.dart';
|
||||
|
||||
// **************************************************************************
|
||||
// JsonSerializableGenerator
|
||||
// **************************************************************************
|
||||
|
||||
AccountModel _$AccountModelFromJson(Map<String, dynamic> json) {
|
||||
return AccountModel(
|
||||
avatarUrl: json['avatarUrl'] as String,
|
||||
token: json['token'] as String,
|
||||
domain: json['domain'] as String);
|
||||
}
|
||||
|
||||
Map<String, dynamic> _$AccountModelToJson(AccountModel instance) =>
|
||||
<String, dynamic>{
|
||||
'avatarUrl': instance.avatarUrl,
|
||||
'token': instance.token,
|
||||
'domain': instance.domain
|
||||
};
|
@ -9,18 +9,18 @@ part of 'user.dart';
|
||||
User _$UserFromJson(Map<String, dynamic> json) {
|
||||
return User(
|
||||
json['login'] as String,
|
||||
json['avatar_url'] as String,
|
||||
json['avatarUrl'] as String,
|
||||
json['name'] as String,
|
||||
json['public_repos'] as int,
|
||||
json['publicRepos'] as int,
|
||||
json['followers'] as int,
|
||||
json['following'] as int);
|
||||
}
|
||||
|
||||
Map<String, dynamic> _$UserToJson(User instance) => <String, dynamic>{
|
||||
'login': instance.login,
|
||||
'avatar_url': instance.avatarUrl,
|
||||
'avatarUrl': instance.avatarUrl,
|
||||
'name': instance.name,
|
||||
'public_repos': instance.publicRepos,
|
||||
'publicRepos': instance.publicRepos,
|
||||
'followers': instance.followers,
|
||||
'following': instance.following
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user