style: import sort format

This commit is contained in:
Rongjian Zhang 2022-10-03 18:21:22 +08:00
parent e45b8fa134
commit df946c514a
26 changed files with 13 additions and 37 deletions

View File

@ -3,7 +3,8 @@ import 'package:json_annotation/json_annotation.dart';
part 'account.g.dart';
@JsonSerializable(includeIfNull: false)
class Account { // For Bitbucket
class Account {
// For Bitbucket
// equals(Account a) {
// final uri = Uri.parse(domain);

View File

@ -1,4 +1,5 @@
import 'package:json_annotation/json_annotation.dart';
part 'bitbucket.g.dart';
@JsonSerializable(fieldRename: FieldRename.snake)

View File

@ -6,7 +6,6 @@ part 'github.g.dart';
@JsonSerializable(fieldRename: FieldRename.snake)
class GithubEvent {
GithubEvent();
factory GithubEvent.fromJson(Map<String, dynamic> json) =>
@ -31,7 +30,6 @@ class GithubEvent {
@JsonSerializable(fieldRename: FieldRename.snake)
class GithubEventUser {
GithubEventUser();
factory GithubEventUser.fromJson(Map<String, dynamic> json) =>
@ -42,7 +40,6 @@ class GithubEventUser {
@JsonSerializable(fieldRename: FieldRename.snake)
class GithubEventRepo {
GithubEventRepo();
factory GithubEventRepo.fromJson(Map<String, dynamic> json) =>
@ -80,7 +77,6 @@ class GithubEventPayload {
@JsonSerializable(fieldRename: FieldRename.snake)
class GithubEventIssue {
GithubEventIssue();
factory GithubEventIssue.fromJson(Map<String, dynamic> json) =>
@ -100,7 +96,6 @@ class GithubEventIssue {
@JsonSerializable(fieldRename: FieldRename.snake)
class GithubEventComment {
GithubEventComment();
factory GithubEventComment.fromJson(Map<String, dynamic> json) =>
@ -113,7 +108,6 @@ class GithubEventComment {
@JsonSerializable(fieldRename: FieldRename.snake)
class GithubEventCommit {
GithubEventCommit();
factory GithubEventCommit.fromJson(Map<String, dynamic> json) =>
@ -124,7 +118,6 @@ class GithubEventCommit {
@JsonSerializable(fieldRename: FieldRename.snake)
class GithubEventRelease {
GithubEventRelease();
factory GithubEventRelease.fromJson(Map<String, dynamic> json) =>
@ -136,7 +129,6 @@ class GithubEventRelease {
// Notification
@JsonSerializable(fieldRename: FieldRename.snake)
class GithubNotificationItem {
GithubNotificationItem();
factory GithubNotificationItem.fromJson(Map<String, dynamic> json) =>
@ -155,7 +147,6 @@ class GithubNotificationItem {
@JsonSerializable(fieldRename: FieldRename.snake)
class GithubNotificationItemSubject {
GithubNotificationItemSubject();
factory GithubNotificationItemSubject.fromJson(Map<String, dynamic> json) =>
@ -173,7 +164,6 @@ class GithubNotificationItemSubject {
@JsonSerializable(fieldRename: FieldRename.snake)
class GithubNotificationItemRepo {
GithubNotificationItemRepo();
factory GithubNotificationItemRepo.fromJson(Map<String, dynamic> json) =>
@ -343,7 +333,6 @@ class GistFiles {
@JsonSerializable(fieldRename: FieldRename.snake)
class GithubGistsItem {
GithubGistsItem();
factory GithubGistsItem.fromJson(Map<String, dynamic> json) =>
_$GithubGistsItemFromJson(json);

View File

@ -1,11 +1,9 @@
import 'package:flutter/widgets.dart';
import 'package:git_touch/models/github.dart';
import 'package:git_touch/utils/utils.dart';
import 'package:tuple/tuple.dart';
import 'package:git_touch/utils/utils.dart';
class NotificationGroup {
NotificationGroup(this.fullName);
String? fullName;
List<GithubNotificationItem> items = [];

View File

@ -3,7 +3,6 @@ import 'package:git_touch/models/theme.dart';
import 'package:provider/provider.dart';
class CommonScaffold extends StatelessWidget {
const CommonScaffold({
required this.title,
required this.body,

View File

@ -4,7 +4,6 @@ import 'package:git_touch/scaffolds/common.dart';
import 'package:git_touch/scaffolds/utils.dart';
class RefreshStatefulScaffold<T> extends StatefulWidget {
const RefreshStatefulScaffold({
required this.title,
required this.bodyBuilder,

View File

@ -2,7 +2,6 @@ import 'package:flutter/cupertino.dart';
import 'package:git_touch/scaffolds/common.dart';
class SingleScaffold extends StatelessWidget {
const SingleScaffold({
required this.title,
required this.body,

View File

@ -3,7 +3,6 @@ import 'package:git_touch/scaffolds/common.dart';
import 'package:git_touch/scaffolds/utils.dart';
class TabScaffold extends StatelessWidget {
const TabScaffold({
required this.title,
required this.body,

View File

@ -4,7 +4,6 @@ import 'package:git_touch/scaffolds/tab.dart';
import 'package:git_touch/scaffolds/utils.dart';
class TabStatefulScaffold<T> extends StatefulWidget {
const TabStatefulScaffold({
required this.title,
required this.bodyBuilder,

View File

@ -3,7 +3,6 @@ import 'package:git_touch/widgets/error_reload.dart';
import 'package:git_touch/widgets/loading.dart';
class RefreshWrapper extends StatelessWidget {
const RefreshWrapper({
required this.onRefresh,
required this.body,
@ -26,7 +25,6 @@ class RefreshWrapper extends StatelessWidget {
}
class ErrorLoadingWrapper extends StatelessWidget {
const ErrorLoadingWrapper({
required this.error,
required this.loading,

View File

@ -1,5 +1,6 @@
import 'package:antd_mobile/antd_mobile.dart';import 'dart:convert';
import 'dart:convert';
import 'package:antd_mobile/antd_mobile.dart';
import 'package:filesize/filesize.dart';
import 'package:flutter/widgets.dart';
import 'package:flutter_gen/gen_l10n/S.dart';

View File

@ -1,6 +1,7 @@
import 'package:antd_mobile/antd_mobile.dart';import 'dart:convert';
import 'dart:convert';
import 'dart:io';
import 'package:antd_mobile/antd_mobile.dart';
import 'package:flutter/widgets.dart';
import 'package:flutter_gen/gen_l10n/S.dart';
import 'package:git_touch/models/auth.dart';

View File

@ -7,7 +7,6 @@ import 'package:git_touch/widgets/user_item.dart';
import 'package:provider/provider.dart';
class GeUsersScreen extends StatelessWidget {
const GeUsersScreen.followers(String login)
: api = '/users/$login/followers',
title = 'Followers';

View File

@ -6,7 +6,6 @@ import 'package:git_touch/widgets/app_bar_title.dart';
import 'package:git_touch/widgets/blob_view.dart';
class GistObjectScreen extends StatelessWidget {
const GistObjectScreen(this.login, this.id, this.file,
{this.raw, this.content});
final String login;

View File

@ -10,7 +10,6 @@ import 'package:provider/provider.dart';
import 'package:tuple/tuple.dart';
class GlIssueScreen extends StatelessWidget {
const GlIssueScreen(this.projectId, this.iid, {this.isMr = false});
final int projectId;
final int iid;

View File

@ -1,5 +1,6 @@
import 'package:antd_mobile/antd_mobile.dart';import 'dart:convert';
import 'dart:convert';
import 'package:antd_mobile/antd_mobile.dart';
import 'package:flutter/widgets.dart';
import 'package:flutter_gen/gen_l10n/S.dart';
import 'package:git_touch/models/auth.dart';

View File

@ -7,7 +7,6 @@ import 'package:git_touch/widgets/user_item.dart';
import 'package:provider/provider.dart';
class GoUsersScreen extends StatelessWidget {
const GoUsersScreen.followers(String login)
: api = '/users/$login/followers',
title = 'Followers';

View File

@ -1,5 +1,6 @@
import 'package:antd_mobile/antd_mobile.dart';import 'dart:convert';
import 'dart:convert';
import 'package:antd_mobile/antd_mobile.dart';
import 'package:filesize/filesize.dart';
import 'package:flutter/widgets.dart';
import 'package:flutter_gen/gen_l10n/S.dart';

View File

@ -8,7 +8,6 @@ import 'package:provider/provider.dart';
import 'package:timeago/timeago.dart' as timeago;
class GtUsersScreen extends StatelessWidget {
const GtUsersScreen.followers(String login)
: api = '/users/$login/followers',
title = 'Followers';

View File

@ -1,4 +1,5 @@
import 'dart:convert';
import 'package:path/path.dart' as p;
extension MyString<T extends String> on String {

View File

@ -1,7 +1,6 @@
import 'package:flutter/widgets.dart';
class AppBarTitle extends StatelessWidget {
const AppBarTitle(this.text);
final String? text;

View File

@ -30,7 +30,6 @@ class ContributionDay {
}
class ContributionWidget extends StatelessWidget {
ContributionWidget({required this.weeks}) {
int? maxCount;
for (final week in weeks!) {

View File

@ -2,7 +2,6 @@ import 'package:flutter/widgets.dart';
import 'package:git_touch/utils/utils.dart';
class ErrorReload extends StatelessWidget {
const ErrorReload({required this.text, required this.onTap});
final String text;
final Function onTap;

View File

@ -10,7 +10,6 @@ enum IssueIconState {
}
class IssueIcon extends StatelessWidget {
const IssueIcon(this.state, {this.size});
final IssueIconState state;
final double? size;

View File

@ -1,7 +1,6 @@
import 'package:flutter/cupertino.dart';
class Loading extends StatelessWidget {
const Loading({this.more = false});
final bool more;

View File

@ -2,7 +2,6 @@ import 'package:flutter/widgets.dart';
import 'package:git_touch/utils/utils.dart';
class TextWithAt extends StatelessWidget {
const TextWithAt({
required this.text,
required this.linkFactory,