style: single quotes and package imports
This commit is contained in:
parent
8eda3e36c8
commit
5b7b465b09
|
@ -22,8 +22,8 @@ linter:
|
||||||
# `// ignore_for_file: name_of_lint` syntax on the line or in the file
|
# `// ignore_for_file: name_of_lint` syntax on the line or in the file
|
||||||
# producing the lint.
|
# producing the lint.
|
||||||
rules:
|
rules:
|
||||||
# avoid_print: false # Uncomment to disable the `avoid_print` rule
|
prefer_single_quotes: true
|
||||||
# prefer_single_quotes: true # Uncomment to enable the `prefer_single_quotes` rule
|
always_use_package_imports: true
|
||||||
|
|
||||||
analyzer:
|
analyzer:
|
||||||
exclude:
|
exclude:
|
||||||
|
|
|
@ -18,10 +18,10 @@ import 'package:uni_links/uni_links.dart';
|
||||||
import 'package:universal_io/io.dart';
|
import 'package:universal_io/io.dart';
|
||||||
import 'package:url_launcher/url_launcher.dart';
|
import 'package:url_launcher/url_launcher.dart';
|
||||||
|
|
||||||
import '../utils/utils.dart';
|
import 'package:git_touch/utils/utils.dart';
|
||||||
import 'account.dart';
|
import 'package:git_touch/models/account.dart';
|
||||||
import 'gitlab.dart';
|
import 'package:git_touch/models/gitlab.dart';
|
||||||
import 'gogs.dart';
|
import 'package:git_touch/models/gogs.dart';
|
||||||
|
|
||||||
const clientId = 'df930d7d2e219f26142a';
|
const clientId = 'df930d7d2e219f26142a';
|
||||||
|
|
||||||
|
|
|
@ -2,7 +2,7 @@ import 'package:flutter/widgets.dart';
|
||||||
import 'package:git_touch/models/github.dart';
|
import 'package:git_touch/models/github.dart';
|
||||||
import 'package:tuple/tuple.dart';
|
import 'package:tuple/tuple.dart';
|
||||||
|
|
||||||
import '../utils/utils.dart';
|
import 'package:git_touch/utils/utils.dart';
|
||||||
|
|
||||||
class NotificationGroup {
|
class NotificationGroup {
|
||||||
String? fullName;
|
String? fullName;
|
||||||
|
|
|
@ -3,9 +3,9 @@ import 'package:git_touch/models/theme.dart';
|
||||||
import 'package:git_touch/utils/utils.dart';
|
import 'package:git_touch/utils/utils.dart';
|
||||||
import 'package:provider/provider.dart';
|
import 'package:provider/provider.dart';
|
||||||
|
|
||||||
import '../widgets/error_reload.dart';
|
import 'package:git_touch/widgets/error_reload.dart';
|
||||||
import '../widgets/link.dart';
|
import 'package:git_touch/widgets/link.dart';
|
||||||
import '../widgets/loading.dart';
|
import 'package:git_touch/widgets/loading.dart';
|
||||||
|
|
||||||
class LongListPayload<T, K> {
|
class LongListPayload<T, K> {
|
||||||
T header;
|
T header;
|
||||||
|
|
|
@ -3,7 +3,6 @@ import 'package:flutter_gen/gen_l10n/S.dart';
|
||||||
import 'package:git_touch/models/auth.dart';
|
import 'package:git_touch/models/auth.dart';
|
||||||
import 'package:git_touch/models/bitbucket.dart';
|
import 'package:git_touch/models/bitbucket.dart';
|
||||||
import 'package:git_touch/scaffolds/list_stateful.dart';
|
import 'package:git_touch/scaffolds/list_stateful.dart';
|
||||||
import 'package:git_touch/utils/utils.dart';
|
|
||||||
import 'package:git_touch/widgets/app_bar_title.dart';
|
import 'package:git_touch/widgets/app_bar_title.dart';
|
||||||
import 'package:git_touch/widgets/commit_item.dart';
|
import 'package:git_touch/widgets/commit_item.dart';
|
||||||
import 'package:provider/provider.dart';
|
import 'package:provider/provider.dart';
|
||||||
|
|
|
@ -3,7 +3,6 @@ import 'package:flutter_gen/gen_l10n/S.dart';
|
||||||
import 'package:git_touch/models/auth.dart';
|
import 'package:git_touch/models/auth.dart';
|
||||||
import 'package:git_touch/models/bitbucket.dart';
|
import 'package:git_touch/models/bitbucket.dart';
|
||||||
import 'package:git_touch/scaffolds/list_stateful.dart';
|
import 'package:git_touch/scaffolds/list_stateful.dart';
|
||||||
import 'package:git_touch/utils/utils.dart';
|
|
||||||
import 'package:git_touch/widgets/app_bar_title.dart';
|
import 'package:git_touch/widgets/app_bar_title.dart';
|
||||||
import 'package:git_touch/widgets/repository_item.dart';
|
import 'package:git_touch/widgets/repository_item.dart';
|
||||||
import 'package:provider/provider.dart';
|
import 'package:provider/provider.dart';
|
||||||
|
|
|
@ -23,7 +23,7 @@ class BbIssueScreen extends StatelessWidget {
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return RefreshStatefulScaffold<Tuple2<BbIssues, Iterable<BbComment>>>(
|
return RefreshStatefulScaffold<Tuple2<BbIssues, Iterable<BbComment>>>(
|
||||||
title: Text("Issue: #$number"),
|
title: Text('Issue: #$number'),
|
||||||
fetch: () async {
|
fetch: () async {
|
||||||
final auth = context.read<AuthModel>();
|
final auth = context.read<AuthModel>();
|
||||||
final res = await Future.wait([
|
final res = await Future.wait([
|
||||||
|
|
|
@ -3,7 +3,6 @@ import 'package:flutter_gen/gen_l10n/S.dart';
|
||||||
import 'package:git_touch/models/auth.dart';
|
import 'package:git_touch/models/auth.dart';
|
||||||
import 'package:git_touch/models/bitbucket.dart';
|
import 'package:git_touch/models/bitbucket.dart';
|
||||||
import 'package:git_touch/scaffolds/list_stateful.dart';
|
import 'package:git_touch/scaffolds/list_stateful.dart';
|
||||||
import 'package:git_touch/utils/utils.dart';
|
|
||||||
import 'package:git_touch/widgets/action_entry.dart';
|
import 'package:git_touch/widgets/action_entry.dart';
|
||||||
import 'package:git_touch/widgets/app_bar_title.dart';
|
import 'package:git_touch/widgets/app_bar_title.dart';
|
||||||
import 'package:git_touch/widgets/issue_item.dart';
|
import 'package:git_touch/widgets/issue_item.dart';
|
||||||
|
|
|
@ -4,7 +4,6 @@ import 'package:flutter/widgets.dart';
|
||||||
import 'package:git_touch/models/auth.dart';
|
import 'package:git_touch/models/auth.dart';
|
||||||
import 'package:git_touch/models/bitbucket.dart';
|
import 'package:git_touch/models/bitbucket.dart';
|
||||||
import 'package:git_touch/scaffolds/list_stateful.dart';
|
import 'package:git_touch/scaffolds/list_stateful.dart';
|
||||||
import 'package:git_touch/utils/utils.dart';
|
|
||||||
import 'package:git_touch/widgets/action_entry.dart';
|
import 'package:git_touch/widgets/action_entry.dart';
|
||||||
import 'package:git_touch/widgets/app_bar_title.dart';
|
import 'package:git_touch/widgets/app_bar_title.dart';
|
||||||
import 'package:git_touch/widgets/blob_view.dart';
|
import 'package:git_touch/widgets/blob_view.dart';
|
||||||
|
|
|
@ -3,7 +3,6 @@ import 'package:flutter_gen/gen_l10n/S.dart';
|
||||||
import 'package:git_touch/models/auth.dart';
|
import 'package:git_touch/models/auth.dart';
|
||||||
import 'package:git_touch/models/bitbucket.dart';
|
import 'package:git_touch/models/bitbucket.dart';
|
||||||
import 'package:git_touch/scaffolds/list_stateful.dart';
|
import 'package:git_touch/scaffolds/list_stateful.dart';
|
||||||
import 'package:git_touch/utils/utils.dart';
|
|
||||||
import 'package:git_touch/widgets/app_bar_title.dart';
|
import 'package:git_touch/widgets/app_bar_title.dart';
|
||||||
import 'package:git_touch/widgets/issue_item.dart';
|
import 'package:git_touch/widgets/issue_item.dart';
|
||||||
import 'package:provider/provider.dart';
|
import 'package:provider/provider.dart';
|
||||||
|
|
|
@ -3,7 +3,6 @@ import 'package:flutter_gen/gen_l10n/S.dart';
|
||||||
import 'package:git_touch/models/auth.dart';
|
import 'package:git_touch/models/auth.dart';
|
||||||
import 'package:git_touch/models/bitbucket.dart';
|
import 'package:git_touch/models/bitbucket.dart';
|
||||||
import 'package:git_touch/scaffolds/list_stateful.dart';
|
import 'package:git_touch/scaffolds/list_stateful.dart';
|
||||||
import 'package:git_touch/utils/utils.dart';
|
|
||||||
import 'package:git_touch/widgets/app_bar_title.dart';
|
import 'package:git_touch/widgets/app_bar_title.dart';
|
||||||
import 'package:git_touch/widgets/user_item.dart';
|
import 'package:git_touch/widgets/user_item.dart';
|
||||||
import 'package:provider/provider.dart';
|
import 'package:provider/provider.dart';
|
||||||
|
|
|
@ -20,7 +20,7 @@ class GeCommitScreen extends StatelessWidget {
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
final theme = context.watch<ThemeModel>();
|
final theme = context.watch<ThemeModel>();
|
||||||
return RefreshStatefulScaffold<GiteeCommit>(
|
return RefreshStatefulScaffold<GiteeCommit>(
|
||||||
title: Text("Commit: ${sha.substring(0, 7)}"),
|
title: Text('Commit: ${sha.substring(0, 7)}'),
|
||||||
fetch: () async {
|
fetch: () async {
|
||||||
final auth = context.read<AuthModel>();
|
final auth = context.read<AuthModel>();
|
||||||
final items = await auth.fetchGitee('/repos/$owner/$name/commits/$sha');
|
final items = await auth.fetchGitee('/repos/$owner/$name/commits/$sha');
|
||||||
|
|
|
@ -3,7 +3,6 @@ import 'package:flutter_gen/gen_l10n/S.dart';
|
||||||
import 'package:git_touch/models/auth.dart';
|
import 'package:git_touch/models/auth.dart';
|
||||||
import 'package:git_touch/models/gitee.dart';
|
import 'package:git_touch/models/gitee.dart';
|
||||||
import 'package:git_touch/scaffolds/list_stateful.dart';
|
import 'package:git_touch/scaffolds/list_stateful.dart';
|
||||||
import 'package:git_touch/utils/utils.dart';
|
|
||||||
import 'package:git_touch/widgets/app_bar_title.dart';
|
import 'package:git_touch/widgets/app_bar_title.dart';
|
||||||
import 'package:git_touch/widgets/commit_item.dart';
|
import 'package:git_touch/widgets/commit_item.dart';
|
||||||
import 'package:provider/provider.dart';
|
import 'package:provider/provider.dart';
|
||||||
|
|
|
@ -5,7 +5,6 @@ import 'package:git_touch/models/auth.dart';
|
||||||
import 'package:git_touch/models/gitee.dart';
|
import 'package:git_touch/models/gitee.dart';
|
||||||
import 'package:git_touch/models/theme.dart';
|
import 'package:git_touch/models/theme.dart';
|
||||||
import 'package:git_touch/scaffolds/list_stateful.dart';
|
import 'package:git_touch/scaffolds/list_stateful.dart';
|
||||||
import 'package:git_touch/utils/utils.dart';
|
|
||||||
import 'package:git_touch/widgets/app_bar_title.dart';
|
import 'package:git_touch/widgets/app_bar_title.dart';
|
||||||
import 'package:provider/provider.dart';
|
import 'package:provider/provider.dart';
|
||||||
|
|
||||||
|
@ -66,7 +65,7 @@ class GeContributorsScreen extends StatelessWidget {
|
||||||
color: theme.palette.secondaryText,
|
color: theme.palette.secondaryText,
|
||||||
fontSize: 16,
|
fontSize: 16,
|
||||||
),
|
),
|
||||||
child: Text("Contributions: ${v.contributions}"),
|
child: Text('Contributions: ${v.contributions}'),
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
|
|
|
@ -4,7 +4,6 @@ import 'package:flutter_gen/gen_l10n/S.dart';
|
||||||
import 'package:git_touch/models/auth.dart';
|
import 'package:git_touch/models/auth.dart';
|
||||||
import 'package:git_touch/models/gitee.dart';
|
import 'package:git_touch/models/gitee.dart';
|
||||||
import 'package:git_touch/scaffolds/list_stateful.dart';
|
import 'package:git_touch/scaffolds/list_stateful.dart';
|
||||||
import 'package:git_touch/utils/utils.dart';
|
|
||||||
import 'package:git_touch/widgets/action_button.dart';
|
import 'package:git_touch/widgets/action_button.dart';
|
||||||
import 'package:git_touch/widgets/app_bar_title.dart';
|
import 'package:git_touch/widgets/app_bar_title.dart';
|
||||||
import 'package:git_touch/widgets/files_item.dart';
|
import 'package:git_touch/widgets/files_item.dart';
|
||||||
|
|
|
@ -55,7 +55,7 @@ class GeIssueScreen extends StatelessWidget {
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return RefreshStatefulScaffold<Tuple2<GiteeIssue, List<GiteeComment>>>(
|
return RefreshStatefulScaffold<Tuple2<GiteeIssue, List<GiteeComment>>>(
|
||||||
title: Text("Issue: #$number"),
|
title: Text('Issue: #$number'),
|
||||||
fetch: () async {
|
fetch: () async {
|
||||||
final auth = context.read<AuthModel>();
|
final auth = context.read<AuthModel>();
|
||||||
final items = await Future.wait([
|
final items = await Future.wait([
|
||||||
|
|
|
@ -2,7 +2,6 @@ import 'package:flutter/widgets.dart';
|
||||||
import 'package:git_touch/models/auth.dart';
|
import 'package:git_touch/models/auth.dart';
|
||||||
import 'package:git_touch/models/gitee.dart';
|
import 'package:git_touch/models/gitee.dart';
|
||||||
import 'package:git_touch/scaffolds/list_stateful.dart';
|
import 'package:git_touch/scaffolds/list_stateful.dart';
|
||||||
import 'package:git_touch/utils/utils.dart';
|
|
||||||
import 'package:git_touch/widgets/action_entry.dart';
|
import 'package:git_touch/widgets/action_entry.dart';
|
||||||
import 'package:git_touch/widgets/app_bar_title.dart';
|
import 'package:git_touch/widgets/app_bar_title.dart';
|
||||||
import 'package:git_touch/widgets/hex_color_tag.dart';
|
import 'package:git_touch/widgets/hex_color_tag.dart';
|
||||||
|
|
|
@ -57,7 +57,7 @@ class GePullScreen extends StatelessWidget {
|
||||||
return RefreshStatefulScaffold<
|
return RefreshStatefulScaffold<
|
||||||
Tuple4<GiteePull, List<GiteeComment>, List<GiteePullFile>,
|
Tuple4<GiteePull, List<GiteeComment>, List<GiteePullFile>,
|
||||||
List<GiteeCommit>>>(
|
List<GiteeCommit>>>(
|
||||||
title: Text("Pull Request: #$number"),
|
title: Text('Pull Request: #$number'),
|
||||||
fetch: () async {
|
fetch: () async {
|
||||||
final auth = context.read<AuthModel>();
|
final auth = context.read<AuthModel>();
|
||||||
final items = await Future.wait([
|
final items = await Future.wait([
|
||||||
|
|
|
@ -2,7 +2,6 @@ import 'package:flutter/widgets.dart';
|
||||||
import 'package:git_touch/models/auth.dart';
|
import 'package:git_touch/models/auth.dart';
|
||||||
import 'package:git_touch/models/gitee.dart';
|
import 'package:git_touch/models/gitee.dart';
|
||||||
import 'package:git_touch/scaffolds/list_stateful.dart';
|
import 'package:git_touch/scaffolds/list_stateful.dart';
|
||||||
import 'package:git_touch/utils/utils.dart';
|
|
||||||
import 'package:git_touch/widgets/app_bar_title.dart';
|
import 'package:git_touch/widgets/app_bar_title.dart';
|
||||||
import 'package:git_touch/widgets/hex_color_tag.dart';
|
import 'package:git_touch/widgets/hex_color_tag.dart';
|
||||||
import 'package:git_touch/widgets/issue_item.dart';
|
import 'package:git_touch/widgets/issue_item.dart';
|
||||||
|
|
|
@ -2,7 +2,6 @@ import 'package:flutter/widgets.dart';
|
||||||
import 'package:git_touch/models/auth.dart';
|
import 'package:git_touch/models/auth.dart';
|
||||||
import 'package:git_touch/models/gitee.dart';
|
import 'package:git_touch/models/gitee.dart';
|
||||||
import 'package:git_touch/scaffolds/list_stateful.dart';
|
import 'package:git_touch/scaffolds/list_stateful.dart';
|
||||||
import 'package:git_touch/utils/utils.dart';
|
|
||||||
import 'package:git_touch/widgets/app_bar_title.dart';
|
import 'package:git_touch/widgets/app_bar_title.dart';
|
||||||
import 'package:git_touch/widgets/repository_item.dart';
|
import 'package:git_touch/widgets/repository_item.dart';
|
||||||
import 'package:provider/provider.dart';
|
import 'package:provider/provider.dart';
|
||||||
|
|
|
@ -15,7 +15,7 @@ class GeUsersScreen extends StatelessWidget {
|
||||||
title = 'Followers';
|
title = 'Followers';
|
||||||
const GeUsersScreen.following(String login)
|
const GeUsersScreen.following(String login)
|
||||||
: api = '/users/$login/following',
|
: api = '/users/$login/following',
|
||||||
title = "Following";
|
title = 'Following';
|
||||||
// GeUsersScreen.member(String login)
|
// GeUsersScreen.member(String login)
|
||||||
// : api = '/orgs/$login/members',
|
// : api = '/orgs/$login/members',
|
||||||
// title = "Members";
|
// title = "Members";
|
||||||
|
|
|
@ -43,7 +43,7 @@ class GhComparisonScreen extends StatelessWidget {
|
||||||
additions: vs.additions,
|
additions: vs.additions,
|
||||||
deletions: vs.deletions,
|
deletions: vs.deletions,
|
||||||
status: vs.status,
|
status: vs.status,
|
||||||
patch: vs.patch ?? "No text to be shown here",
|
patch: vs.patch ?? 'No text to be shown here',
|
||||||
))
|
))
|
||||||
.toList(),
|
.toList(),
|
||||||
);
|
);
|
||||||
|
|
|
@ -14,8 +14,8 @@ import 'package:github/github.dart' as github;
|
||||||
import 'package:primer/primer.dart';
|
import 'package:primer/primer.dart';
|
||||||
import 'package:provider/provider.dart';
|
import 'package:provider/provider.dart';
|
||||||
|
|
||||||
import '../scaffolds/long_list.dart';
|
import 'package:git_touch/scaffolds/long_list.dart';
|
||||||
import '../widgets/comment_item.dart';
|
import 'package:git_touch/widgets/comment_item.dart';
|
||||||
|
|
||||||
class GhIssueScreen extends StatelessWidget {
|
class GhIssueScreen extends StatelessWidget {
|
||||||
final String owner;
|
final String owner;
|
||||||
|
|
|
@ -10,10 +10,10 @@ import 'package:git_touch/widgets/app_bar_title.dart';
|
||||||
import 'package:github/github.dart';
|
import 'package:github/github.dart';
|
||||||
import 'package:provider/provider.dart';
|
import 'package:provider/provider.dart';
|
||||||
|
|
||||||
import '../utils/utils.dart';
|
import 'package:git_touch/utils/utils.dart';
|
||||||
import '../widgets/empty.dart';
|
import 'package:git_touch/widgets/empty.dart';
|
||||||
import '../widgets/list_group.dart';
|
import 'package:git_touch/widgets/list_group.dart';
|
||||||
import '../widgets/notification_item.dart';
|
import 'package:git_touch/widgets/notification_item.dart';
|
||||||
|
|
||||||
class GhNotificationScreen extends StatefulWidget {
|
class GhNotificationScreen extends StatefulWidget {
|
||||||
@override
|
@override
|
||||||
|
|
|
@ -19,7 +19,7 @@ class GhReleasesScreen extends StatelessWidget {
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return ListStatefulScaffold<GReleasesData_repository_releases_nodes,
|
return ListStatefulScaffold<GReleasesData_repository_releases_nodes,
|
||||||
String?>(
|
String?>(
|
||||||
title: const AppBarTitle("Releases"),
|
title: const AppBarTitle('Releases'),
|
||||||
fetch: (page) async {
|
fetch: (page) async {
|
||||||
final req = GReleasesReq((b) => b
|
final req = GReleasesReq((b) => b
|
||||||
..vars.owner = owner
|
..vars.owner = owner
|
||||||
|
|
|
@ -15,7 +15,7 @@ class GoUsersScreen extends StatelessWidget {
|
||||||
title = 'Followers';
|
title = 'Followers';
|
||||||
const GoUsersScreen.following(String login)
|
const GoUsersScreen.following(String login)
|
||||||
: api = '/users/$login/following',
|
: api = '/users/$login/following',
|
||||||
title = "Following";
|
title = 'Following';
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
|
|
|
@ -55,7 +55,7 @@ class GtIssueScreen extends StatelessWidget {
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return RefreshStatefulScaffold<Tuple2<GiteaIssue, List<GiteaComment>>>(
|
return RefreshStatefulScaffold<Tuple2<GiteaIssue, List<GiteaComment>>>(
|
||||||
title: Text("Issue: #$number"),
|
title: Text('Issue: #$number'),
|
||||||
fetch: () async {
|
fetch: () async {
|
||||||
final auth = context.read<AuthModel>();
|
final auth = context.read<AuthModel>();
|
||||||
final items = await Future.wait([
|
final items = await Future.wait([
|
||||||
|
|
|
@ -16,10 +16,10 @@ class GtUsersScreen extends StatelessWidget {
|
||||||
title = 'Followers';
|
title = 'Followers';
|
||||||
const GtUsersScreen.following(String login)
|
const GtUsersScreen.following(String login)
|
||||||
: api = '/users/$login/following',
|
: api = '/users/$login/following',
|
||||||
title = "Following";
|
title = 'Following';
|
||||||
const GtUsersScreen.member(String login)
|
const GtUsersScreen.member(String login)
|
||||||
: api = '/orgs/$login/members',
|
: api = '/orgs/$login/members',
|
||||||
title = "Members";
|
title = 'Members';
|
||||||
const GtUsersScreen.stargazers(String owner, String repo)
|
const GtUsersScreen.stargazers(String owner, String repo)
|
||||||
: api = '/repos/$owner/$repo/stargazers',
|
: api = '/repos/$owner/$repo/stargazers',
|
||||||
title = 'Stargazers';
|
title = 'Stargazers';
|
||||||
|
|
|
@ -11,9 +11,9 @@ import 'package:git_touch/widgets/app_bar_title.dart';
|
||||||
import 'package:git_touch/widgets/text_field.dart';
|
import 'package:git_touch/widgets/text_field.dart';
|
||||||
import 'package:provider/provider.dart';
|
import 'package:provider/provider.dart';
|
||||||
|
|
||||||
import '../widgets/avatar.dart';
|
import 'package:git_touch/widgets/avatar.dart';
|
||||||
import '../widgets/link.dart';
|
import 'package:git_touch/widgets/link.dart';
|
||||||
import '../widgets/loading.dart';
|
import 'package:git_touch/widgets/loading.dart';
|
||||||
|
|
||||||
class LoginScreen extends StatefulWidget {
|
class LoginScreen extends StatefulWidget {
|
||||||
@override
|
@override
|
||||||
|
|
|
@ -24,5 +24,5 @@ class DateTimeSerializer implements PrimitiveSerializer<DateTime> {
|
||||||
Iterable<Type> get types => [DateTime];
|
Iterable<Type> get types => [DateTime];
|
||||||
|
|
||||||
@override
|
@override
|
||||||
String get wireName => "DateTime";
|
String get wireName => 'DateTime';
|
||||||
}
|
}
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -1,7 +1,6 @@
|
||||||
import 'dart:convert';
|
import 'dart:convert';
|
||||||
|
|
||||||
import 'package:flutter/cupertino.dart';
|
import 'package:flutter/cupertino.dart';
|
||||||
import 'package:flutter/widgets.dart';
|
|
||||||
import 'package:flutter_highlight/flutter_highlight.dart';
|
import 'package:flutter_highlight/flutter_highlight.dart';
|
||||||
import 'package:flutter_highlight/theme_map.dart';
|
import 'package:flutter_highlight/theme_map.dart';
|
||||||
import 'package:git_touch/models/code.dart';
|
import 'package:git_touch/models/code.dart';
|
||||||
|
|
|
@ -9,10 +9,10 @@ import 'package:primer/primer.dart';
|
||||||
import 'package:provider/provider.dart';
|
import 'package:provider/provider.dart';
|
||||||
import 'package:timeago/timeago.dart' as timeago;
|
import 'package:timeago/timeago.dart' as timeago;
|
||||||
|
|
||||||
import '../utils/utils.dart';
|
import 'package:git_touch/utils/utils.dart';
|
||||||
import 'avatar.dart';
|
import 'package:git_touch/widgets/avatar.dart';
|
||||||
import 'link.dart';
|
import 'package:git_touch/widgets/link.dart';
|
||||||
import 'user_name.dart';
|
import 'package:git_touch/widgets/user_name.dart';
|
||||||
|
|
||||||
class EmojiPayload {
|
class EmojiPayload {
|
||||||
GReactionContent key;
|
GReactionContent key;
|
||||||
|
|
|
@ -53,7 +53,7 @@ class ContributorItem extends StatelessWidget {
|
||||||
color: theme.palette.secondaryText,
|
color: theme.palette.secondaryText,
|
||||||
fontSize: 16,
|
fontSize: 16,
|
||||||
),
|
),
|
||||||
child: Text("Commits: $commits"),
|
child: Text('Commits: $commits'),
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
|
|
|
@ -2,7 +2,7 @@ import 'package:flutter/cupertino.dart';
|
||||||
import 'package:git_touch/models/theme.dart';
|
import 'package:git_touch/models/theme.dart';
|
||||||
import 'package:git_touch/utils/utils.dart';
|
import 'package:git_touch/utils/utils.dart';
|
||||||
import 'package:provider/provider.dart';
|
import 'package:provider/provider.dart';
|
||||||
import 'link.dart';
|
import 'package:git_touch/widgets/link.dart';
|
||||||
|
|
||||||
class EntryItem extends StatelessWidget {
|
class EntryItem extends StatelessWidget {
|
||||||
final int? count;
|
final int? count;
|
||||||
|
|
|
@ -8,9 +8,9 @@ import 'package:git_touch/widgets/issue_icon.dart';
|
||||||
import 'package:provider/provider.dart';
|
import 'package:provider/provider.dart';
|
||||||
import 'package:timeago/timeago.dart' as timeago;
|
import 'package:timeago/timeago.dart' as timeago;
|
||||||
|
|
||||||
import '../utils/utils.dart';
|
import 'package:git_touch/utils/utils.dart';
|
||||||
import '../widgets/link.dart';
|
import 'package:git_touch/widgets/link.dart';
|
||||||
import 'avatar.dart';
|
import 'package:git_touch/widgets/avatar.dart';
|
||||||
|
|
||||||
class EventItem extends StatelessWidget {
|
class EventItem extends StatelessWidget {
|
||||||
final GithubEvent e;
|
final GithubEvent e;
|
||||||
|
@ -309,7 +309,7 @@ class EventItem extends StatelessWidget {
|
||||||
]);
|
]);
|
||||||
case 'CheckSuiteEvent':
|
case 'CheckSuiteEvent':
|
||||||
// Needs checks permission
|
// Needs checks permission
|
||||||
String conclusion = "";
|
String conclusion = '';
|
||||||
switch (e.payload!.checkSuite!.conclusion) {
|
switch (e.payload!.checkSuite!.conclusion) {
|
||||||
case 'success':
|
case 'success':
|
||||||
case 'failure':
|
case 'failure':
|
||||||
|
@ -388,22 +388,22 @@ class EventItem extends StatelessWidget {
|
||||||
],
|
],
|
||||||
);
|
);
|
||||||
case 'GollumEvent':
|
case 'GollumEvent':
|
||||||
String pageNamesCreated = "";
|
String pageNamesCreated = '';
|
||||||
String pageNamesEdited = "";
|
String pageNamesEdited = '';
|
||||||
for (GithubPagesItem page in e.payload!.pages!) {
|
for (GithubPagesItem page in e.payload!.pages!) {
|
||||||
if (page.action == "edited") {
|
if (page.action == 'edited') {
|
||||||
pageNamesEdited += ", ${page.pageName!}";
|
pageNamesEdited += ', ${page.pageName!}';
|
||||||
} else {
|
} else {
|
||||||
pageNamesCreated += ", ${page.pageName!}";
|
pageNamesCreated += ', ${page.pageName!}';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (pageNamesCreated.isNotEmpty) {
|
if (pageNamesCreated.isNotEmpty) {
|
||||||
pageNamesCreated =
|
pageNamesCreated =
|
||||||
" ${AppLocalizations.of(context)!.createdPages(pageNamesCreated)}";
|
' ${AppLocalizations.of(context)!.createdPages(pageNamesCreated)}';
|
||||||
}
|
}
|
||||||
if (pageNamesEdited.isNotEmpty) {
|
if (pageNamesEdited.isNotEmpty) {
|
||||||
pageNamesEdited =
|
pageNamesEdited =
|
||||||
" ${AppLocalizations.of(context)!.editedPages(pageNamesEdited)}";
|
' ${AppLocalizations.of(context)!.editedPages(pageNamesEdited)}';
|
||||||
}
|
}
|
||||||
|
|
||||||
return _buildItem(
|
return _buildItem(
|
||||||
|
@ -427,22 +427,22 @@ class EventItem extends StatelessWidget {
|
||||||
e.payload!.installation!.repositoriesAdded!;
|
e.payload!.installation!.repositoriesAdded!;
|
||||||
List<GithubNotificationItemRepo> repositoriesRemoved =
|
List<GithubNotificationItemRepo> repositoriesRemoved =
|
||||||
e.payload!.installation!.repositoriesRemoved!;
|
e.payload!.installation!.repositoriesRemoved!;
|
||||||
String addedRepos = "";
|
String addedRepos = '';
|
||||||
String removedRepos = "";
|
String removedRepos = '';
|
||||||
for (GithubNotificationItemRepo repo in repositoriesAdded) {
|
for (GithubNotificationItemRepo repo in repositoriesAdded) {
|
||||||
addedRepos += "${repo.fullName!}, ";
|
addedRepos += '${repo.fullName!}, ';
|
||||||
}
|
}
|
||||||
for (GithubNotificationItemRepo repo in repositoriesRemoved) {
|
for (GithubNotificationItemRepo repo in repositoriesRemoved) {
|
||||||
removedRepos += "${repo.fullName!}, ";
|
removedRepos += '${repo.fullName!}, ';
|
||||||
}
|
}
|
||||||
String finalListOfRepos = "";
|
String finalListOfRepos = '';
|
||||||
if (addedRepos != "") {
|
if (addedRepos != '') {
|
||||||
finalListOfRepos +=
|
finalListOfRepos +=
|
||||||
"${AppLocalizations.of(context)!.wereAddedTo(addedRepos, e.payload!.installation!.id.toString())}\n ";
|
'${AppLocalizations.of(context)!.wereAddedTo(addedRepos, e.payload!.installation!.id.toString())}\n ';
|
||||||
}
|
}
|
||||||
if (removedRepos != "") {
|
if (removedRepos != '') {
|
||||||
finalListOfRepos +=
|
finalListOfRepos +=
|
||||||
"$removedRepos ${AppLocalizations.of(context)!.wereRemovedFrom(removedRepos, e.payload!.installation!.id.toString())}";
|
'$removedRepos ${AppLocalizations.of(context)!.wereRemovedFrom(removedRepos, e.payload!.installation!.id.toString())}';
|
||||||
}
|
}
|
||||||
return _buildItem(
|
return _buildItem(
|
||||||
context: context,
|
context: context,
|
||||||
|
@ -490,23 +490,23 @@ class EventItem extends StatelessWidget {
|
||||||
final action = e.payload!.action;
|
final action = e.payload!.action;
|
||||||
var messageToDisplay;
|
var messageToDisplay;
|
||||||
switch (action) {
|
switch (action) {
|
||||||
case "purchased":
|
case 'purchased':
|
||||||
messageToDisplay =
|
messageToDisplay =
|
||||||
AppLocalizations.of(context)!.purchasedMarketplacePlan;
|
AppLocalizations.of(context)!.purchasedMarketplacePlan;
|
||||||
break;
|
break;
|
||||||
case "cancelled":
|
case 'cancelled':
|
||||||
messageToDisplay =
|
messageToDisplay =
|
||||||
AppLocalizations.of(context)!.cancelledMarketplacePlan;
|
AppLocalizations.of(context)!.cancelledMarketplacePlan;
|
||||||
break;
|
break;
|
||||||
case "pending_change":
|
case 'pending_change':
|
||||||
messageToDisplay =
|
messageToDisplay =
|
||||||
AppLocalizations.of(context)!.pendingMarketplacePlan;
|
AppLocalizations.of(context)!.pendingMarketplacePlan;
|
||||||
break;
|
break;
|
||||||
case "pending_change_cancelled":
|
case 'pending_change_cancelled':
|
||||||
messageToDisplay =
|
messageToDisplay =
|
||||||
AppLocalizations.of(context)!.pendingChangeCancelled;
|
AppLocalizations.of(context)!.pendingChangeCancelled;
|
||||||
break;
|
break;
|
||||||
case "changed":
|
case 'changed':
|
||||||
messageToDisplay =
|
messageToDisplay =
|
||||||
AppLocalizations.of(context)!.changedMarketplacePlan;
|
AppLocalizations.of(context)!.changedMarketplacePlan;
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -23,7 +23,7 @@ class _HtmlViewState extends State<HtmlView> {
|
||||||
|
|
||||||
updateHeight() async {
|
updateHeight() async {
|
||||||
final value = await controller
|
final value = await controller
|
||||||
.runJavascriptReturningResult("document.documentElement.scrollHeight;");
|
.runJavascriptReturningResult('document.documentElement.scrollHeight;');
|
||||||
// print(value);
|
// print(value);
|
||||||
if (mounted) {
|
if (mounted) {
|
||||||
setState(() {
|
setState(() {
|
||||||
|
|
|
@ -4,8 +4,8 @@ import 'package:git_touch/widgets/avatar.dart';
|
||||||
import 'package:provider/provider.dart';
|
import 'package:provider/provider.dart';
|
||||||
import 'package:timeago/timeago.dart' as timeago;
|
import 'package:timeago/timeago.dart' as timeago;
|
||||||
|
|
||||||
import '../utils/utils.dart';
|
import 'package:git_touch/utils/utils.dart';
|
||||||
import '../widgets/link.dart';
|
import 'package:git_touch/widgets/link.dart';
|
||||||
|
|
||||||
const issueGqlChunk = '''
|
const issueGqlChunk = '''
|
||||||
url
|
url
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
import 'package:flutter/widgets.dart';
|
import 'package:flutter/widgets.dart';
|
||||||
import 'package:provider/provider.dart';
|
import 'package:provider/provider.dart';
|
||||||
|
|
||||||
import '../models/theme.dart';
|
import 'package:git_touch/models/theme.dart';
|
||||||
import '../widgets/empty.dart';
|
import 'package:git_touch/widgets/empty.dart';
|
||||||
|
|
||||||
class ListGroup<T> extends StatelessWidget {
|
class ListGroup<T> extends StatelessWidget {
|
||||||
final Widget title;
|
final Widget title;
|
||||||
|
|
|
@ -6,7 +6,7 @@ import 'package:git_touch/widgets/issue_icon.dart';
|
||||||
import 'package:git_touch/widgets/link.dart';
|
import 'package:git_touch/widgets/link.dart';
|
||||||
import 'package:provider/provider.dart';
|
import 'package:provider/provider.dart';
|
||||||
|
|
||||||
import '../models/theme.dart';
|
import 'package:git_touch/models/theme.dart';
|
||||||
|
|
||||||
class NotificationItem extends StatefulWidget {
|
class NotificationItem extends StatefulWidget {
|
||||||
final GithubNotificationItem payload;
|
final GithubNotificationItem payload;
|
||||||
|
|
|
@ -62,7 +62,7 @@ class ReleaseItem extends StatelessWidget {
|
||||||
fontSize: 16,
|
fontSize: 16,
|
||||||
),
|
),
|
||||||
child: Text(
|
child: Text(
|
||||||
"${login!} ${AppLocalizations.of(context)!.released} ${timeago.format(publishedAt!)}"),
|
'${login!} ${AppLocalizations.of(context)!.released} ${timeago.format(publishedAt!)}'),
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
|
|
|
@ -8,8 +8,8 @@ import 'package:git_touch/models/theme.dart';
|
||||||
import 'package:git_touch/widgets/hex_color_tag.dart';
|
import 'package:git_touch/widgets/hex_color_tag.dart';
|
||||||
import 'package:provider/provider.dart';
|
import 'package:provider/provider.dart';
|
||||||
|
|
||||||
import '../utils/utils.dart';
|
import 'package:git_touch/utils/utils.dart';
|
||||||
import 'comment_item.dart';
|
import 'package:git_touch/widgets/comment_item.dart';
|
||||||
|
|
||||||
TextSpan createUserSpan(BuildContext context, String? login) {
|
TextSpan createUserSpan(BuildContext context, String? login) {
|
||||||
return createLinkSpan(context, login, '/github/$login');
|
return createLinkSpan(context, login, '/github/$login');
|
||||||
|
|
Loading…
Reference in New Issue