1
0
mirror of https://github.com/git-touch/git-touch synced 2024-12-16 18:28:51 +01:00

feat: add credits of fonts

This commit is contained in:
Rongjian Zhang 2019-09-26 20:41:25 +08:00
parent 00cbac4858
commit 0d5fef8dd7
2 changed files with 33 additions and 19 deletions

View File

@ -1,6 +1,7 @@
import 'package:flutter/material.dart';
import 'package:git_touch/scaffolds/single.dart';
import 'package:git_touch/screens/repository.dart';
import 'package:git_touch/utils/utils.dart';
import 'package:git_touch/widgets/table_view.dart';
import 'package:tuple/tuple.dart';
@ -28,17 +29,42 @@ class CreditsScreen extends StatelessWidget {
Tuple2('tuple', 'dart-lang/tuple'),
];
static const fonts = [
'Fira Code',
'Inconsolata',
'PT Mono',
'Source Code Pro',
'Ubuntu Mono'
];
@override
Widget build(BuildContext context) {
return SingleScaffold(
title: Text('Credits'),
body: TableView(
items: projects.map((t) {
return TableViewItem(
text: Text(t.item1),
screenBuilder: (_) => RepositoryScreen.fromFullName(t.item2),
);
}),
body: Column(
children: <Widget>[
borderView1,
TableView(
headerText: 'packages',
items: projects.map((t) {
return TableViewItem(
text: Text(t.item1),
screenBuilder: (_) => RepositoryScreen.fromFullName(t.item2),
);
}),
),
borderView1,
TableView(
headerText: 'fonts',
items: fonts.map((font) {
return TableViewItem(
text: Text(font),
screenBuilder: (_) =>
RepositoryScreen.fromFullName('google/fonts'),
);
}),
),
],
),
);
}

View File

@ -3,7 +3,6 @@ import 'package:flutter/material.dart';
import 'package:git_touch/models/theme.dart';
import 'package:git_touch/scaffolds/single.dart';
import 'package:git_touch/screens/credits.dart';
import 'package:git_touch/screens/object.dart';
import 'package:git_touch/screens/repository.dart';
import 'package:git_touch/utils/utils.dart';
import 'package:git_touch/widgets/app_bar_title.dart';
@ -64,17 +63,6 @@ class SettingsScreen extends StatelessWidget {
text: Text('Source Code'),
screenBuilder: (_) => RepositoryScreen('pd4d10', 'git-touch'),
),
TableViewItem(
text: Text('License'),
rightWidget: Text('MIT'),
screenBuilder: (_) => ObjectScreen(
owner: 'pd4d10',
name: 'git-touch',
branch: 'master',
paths: ['LICENSE'],
type: 'blob',
),
),
TableViewItem(
text: Text('Credits'),
screenBuilder: (_) => CreditsScreen(),