build: update icons

This commit is contained in:
Rongjian Zhang 2022-09-17 22:35:45 +08:00
parent a512e41121
commit d250f1c95c
6 changed files with 21 additions and 27 deletions

View File

@ -153,10 +153,11 @@ class _HomeState extends State<Home> {
children: <Widget>[
Icon(iconData),
Positioned(
right: -2,
top: -2,
child: Icon(Octicons.primitive_dot,
color: theme.palette.primary, size: 14))
right: -2,
top: -2,
child:
Icon(Octicons.dot_fill, color: theme.palette.primary, size: 14),
)
],
);
}

View File

@ -60,14 +60,14 @@ class _NotificationItemState extends State<NotificationItem> {
case 'CheckSuite':
return _buildIcon(Octicons.x, GithubPalette.closed);
default:
return _buildIcon(Octicons.octoface);
return _buildIcon(Octicons.bell);
}
}
Widget _buildCheckIcon() {
final theme = Provider.of<ThemeModel>(context);
return Icon(
payload.unread! ? Ionicons.checkmark : Octicons.primitive_dot,
payload.unread! ? Ionicons.checkmark : Octicons.dot_fill,
color:
loading ? theme.palette.grayBackground : theme.palette.tertiaryText,
size: 24,

View File

@ -1,30 +1,22 @@
import 'package:antd_mobile/antd_mobile.dart';
import 'package:file_icon/file_icon.dart';
import 'package:filesize/filesize.dart';
import 'package:flutter/widgets.dart';
import 'package:git_touch/utils/utils.dart';
import 'package:git_touch/widgets/table_view.dart';
import 'package:primer/primer.dart';
Widget _buildIcon(String type, String name) {
switch (type) {
case 'blob': // github gql, gitlab
case 'file': // github rest, gitea
case 'commit_file': // bitbucket
return FileIcon(name, size: 36);
return FileIcon(name, size: 26); // TODO: size
case 'tree': // github gql, gitlab
case 'dir': // github rest, gitea
case 'commit_directory': // bitbucket
return const Icon(
Octicons.file_directory,
color: PrimerColors.blue300,
size: 24,
);
return const Icon(AntIcons.folderOutline);
case 'commit':
return const Icon(
Octicons.file_submodule,
color: PrimerColors.blue300,
size: 24,
);
return const Icon(AntIcons.fileOutline);
default:
throw 'object type error';
}

View File

@ -23,7 +23,7 @@ class TimelineEventItem extends StatelessWidget {
const TimelineEventItem({
this.actor,
this.iconData = Octicons.octoface,
this.iconData = Octicons.diamond,
this.iconColor = Colors.grey,
this.textSpan,
});
@ -62,7 +62,7 @@ class TimelineItem extends StatelessWidget {
Widget _buildFallback(String? type, BuildContext context) {
return TimelineEventItem(
actor: '',
iconData: Octicons.octoface,
iconData: Octicons.diamond,
textSpan: TextSpan(children: [
TextSpan(
text:
@ -99,7 +99,7 @@ class TimelineItem extends StatelessWidget {
final prefix = p.source.G__typename == 'Issue' ? 'issues' : 'pull';
return TimelineEventItem(
actor: p.actor!.login,
iconData: Octicons.primitive_dot,
iconData: Octicons.dot_fill,
iconColor: GithubPalette.open,
textSpan: TextSpan(children: [
TextSpan(
@ -123,7 +123,7 @@ class TimelineItem extends StatelessWidget {
final p = node as GReopenedEventParts;
return TimelineEventItem(
actor: p.actor!.login,
iconData: Octicons.primitive_dot,
iconData: Octicons.dot_fill,
iconColor: GithubPalette.open,
textSpan: TextSpan(
text: ' ${AppLocalizations.of(context)!.reopenedEventMessage} '),
@ -393,7 +393,7 @@ class TimelineItem extends StatelessWidget {
case 'HeadRefForcePushedEvent':
final p = node as GHeadRefForcePushedEventParts;
return TimelineEventItem(
iconData: Octicons.repo_force_push,
iconData: Octicons.repo_push,
actor: p.actor!.login,
textSpan: TextSpan(
children: [
@ -419,7 +419,7 @@ class TimelineItem extends StatelessWidget {
case 'BaseRefForcePushedEvent':
final p = node as GBaseRefForcePushedEventParts;
return TimelineEventItem(
iconData: Octicons.repo_force_push,
iconData: Octicons.repo_push,
actor: p.actor!.login,
textSpan: TextSpan(
children: [

View File

@ -313,9 +313,9 @@ packages:
flutter_vector_icons:
dependency: "direct main"
description:
name: flutter_vector_icons
url: "https://pub.dartlang.org"
source: hosted
path: "../flutter-vector-icons"
relative: true
source: path
version: "1.0.0"
flutter_web_plugins:
dependency: transitive

View File

@ -41,6 +41,7 @@ dependencies:
flutter_markdown:
flutter_svg:
flutter_vector_icons:
path: ../flutter-vector-icons
github:
github_trending:
gql: