mirror of
https://github.com/git-touch/git-touch
synced 2025-03-13 09:40:15 +01:00
refactor: replace legacy palette
This commit is contained in:
parent
fee559ba9a
commit
15a57899fd
@ -1,3 +1,4 @@
|
|||||||
|
import 'package:antd_mobile/antd_mobile.dart';
|
||||||
import 'package:flutter/cupertino.dart';
|
import 'package:flutter/cupertino.dart';
|
||||||
import 'package:flutter_gen/gen_l10n/S.dart';
|
import 'package:flutter_gen/gen_l10n/S.dart';
|
||||||
import 'package:git_touch/models/auth.dart';
|
import 'package:git_touch/models/auth.dart';
|
||||||
@ -155,8 +156,8 @@ class _HomeState extends State<Home> {
|
|||||||
Positioned(
|
Positioned(
|
||||||
right: -2,
|
right: -2,
|
||||||
top: -2,
|
top: -2,
|
||||||
child:
|
child: Icon(Octicons.dot_fill,
|
||||||
Icon(Octicons.dot_fill, color: theme.palette.primary, size: 14),
|
color: AntTheme.of(context).colorPrimary, size: 14),
|
||||||
)
|
)
|
||||||
],
|
],
|
||||||
);
|
);
|
||||||
|
@ -7,7 +7,6 @@ import 'package:flutter/services.dart';
|
|||||||
import 'package:flutter_gen/gen_l10n/S.dart';
|
import 'package:flutter_gen/gen_l10n/S.dart';
|
||||||
import 'package:git_touch/utils/utils.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:primer/primer.dart';
|
|
||||||
import 'package:shared_preferences/shared_preferences.dart';
|
import 'package:shared_preferences/shared_preferences.dart';
|
||||||
import 'package:universal_io/io.dart';
|
import 'package:universal_io/io.dart';
|
||||||
|
|
||||||
@ -68,25 +67,6 @@ class StaticRoute extends PageRouteBuilder {
|
|||||||
final WidgetBuilder? builder;
|
final WidgetBuilder? builder;
|
||||||
}
|
}
|
||||||
|
|
||||||
class Palette {
|
|
||||||
const Palette({
|
|
||||||
required this.primary,
|
|
||||||
required this.text,
|
|
||||||
required this.secondaryText,
|
|
||||||
required this.tertiaryText,
|
|
||||||
required this.background,
|
|
||||||
required this.grayBackground,
|
|
||||||
required this.border,
|
|
||||||
});
|
|
||||||
final Color primary;
|
|
||||||
final Color text;
|
|
||||||
final Color secondaryText;
|
|
||||||
final Color tertiaryText;
|
|
||||||
final Color background;
|
|
||||||
final Color grayBackground;
|
|
||||||
final Color border;
|
|
||||||
}
|
|
||||||
|
|
||||||
class ThemeModel with ChangeNotifier {
|
class ThemeModel with ChangeNotifier {
|
||||||
String? markdownCss;
|
String? markdownCss;
|
||||||
|
|
||||||
@ -161,35 +141,6 @@ class ThemeModel with ChangeNotifier {
|
|||||||
notifyListeners();
|
notifyListeners();
|
||||||
}
|
}
|
||||||
|
|
||||||
final paletteLight = Palette(
|
|
||||||
primary: PrimerColors.blue500,
|
|
||||||
text: Colors.black,
|
|
||||||
secondaryText: Colors.grey.shade800,
|
|
||||||
tertiaryText: Colors.grey.shade600,
|
|
||||||
background: Colors.white,
|
|
||||||
grayBackground: Colors.grey.shade100,
|
|
||||||
border: Colors.grey.shade300,
|
|
||||||
);
|
|
||||||
final paletteDark = Palette(
|
|
||||||
primary: PrimerColors.blue500,
|
|
||||||
text: Colors.grey.shade300,
|
|
||||||
secondaryText: Colors.grey.shade400,
|
|
||||||
tertiaryText: Colors.grey.shade500,
|
|
||||||
background: Colors.black,
|
|
||||||
grayBackground: Colors.grey.shade900,
|
|
||||||
border: Colors.grey.shade700,
|
|
||||||
);
|
|
||||||
|
|
||||||
Palette get palette {
|
|
||||||
switch (brightness) {
|
|
||||||
case Brightness.dark:
|
|
||||||
return paletteDark;
|
|
||||||
case Brightness.light:
|
|
||||||
default:
|
|
||||||
return paletteLight;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
Future<void> init() async {
|
Future<void> init() async {
|
||||||
markdownCss = await rootBundle.loadString('images/github-markdown.css');
|
markdownCss = await rootBundle.loadString('images/github-markdown.css');
|
||||||
|
|
||||||
@ -252,10 +203,10 @@ class ThemeModel with ChangeNotifier {
|
|||||||
Container(
|
Container(
|
||||||
alignment: Alignment.bottomCenter,
|
alignment: Alignment.bottomCenter,
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
color: palette.background,
|
color: AntTheme.of(context).colorBackground,
|
||||||
border: Border(
|
border: Border(
|
||||||
bottom: BorderSide(
|
bottom: BorderSide(
|
||||||
color: palette.grayBackground,
|
color: AntTheme.of(context).colorBox,
|
||||||
width: 0.0,
|
width: 0.0,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
@ -291,7 +242,7 @@ class ThemeModel with ChangeNotifier {
|
|||||||
SizedBox(
|
SizedBox(
|
||||||
height: 216,
|
height: 216,
|
||||||
child: CupertinoPicker(
|
child: CupertinoPicker(
|
||||||
backgroundColor: palette.background,
|
backgroundColor: AntTheme.of(context).colorBackground,
|
||||||
itemExtent: 40,
|
itemExtent: 40,
|
||||||
scrollController: FixedExtentScrollController(
|
scrollController: FixedExtentScrollController(
|
||||||
initialItem: groupItem.items
|
initialItem: groupItem.items
|
||||||
@ -312,7 +263,9 @@ class ThemeModel with ChangeNotifier {
|
|||||||
},
|
},
|
||||||
children: <Widget>[
|
children: <Widget>[
|
||||||
for (var v in groupItem.items)
|
for (var v in groupItem.items)
|
||||||
Text(v.text!, style: TextStyle(color: palette.text)),
|
Text(v.text!,
|
||||||
|
style:
|
||||||
|
TextStyle(color: AntTheme.of(context).colorText)),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
|
@ -1,14 +1,13 @@
|
|||||||
|
import 'package:antd_mobile/antd_mobile.dart';
|
||||||
import 'package:flutter/cupertino.dart';
|
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:git_touch/widgets/error_reload.dart';
|
import 'package:git_touch/widgets/error_reload.dart';
|
||||||
import 'package:git_touch/widgets/link.dart';
|
import 'package:git_touch/widgets/link.dart';
|
||||||
import 'package:git_touch/widgets/loading.dart';
|
import 'package:git_touch/widgets/loading.dart';
|
||||||
|
import 'package:provider/provider.dart';
|
||||||
|
|
||||||
class LongListPayload<T, K> {
|
class LongListPayload<T, K> {
|
||||||
|
|
||||||
LongListPayload({
|
LongListPayload({
|
||||||
required this.header,
|
required this.header,
|
||||||
required this.totalCount,
|
required this.totalCount,
|
||||||
@ -28,7 +27,6 @@ class LongListPayload<T, K> {
|
|||||||
// We should load leading and trailing items at first fetching, and do load more in the middle
|
// We should load leading and trailing items at first fetching, and do load more in the middle
|
||||||
// e.g. https://github.com/reactjs/rfcs/pull/68
|
// e.g. https://github.com/reactjs/rfcs/pull/68
|
||||||
class LongListStatefulScaffold<T, K> extends StatefulWidget {
|
class LongListStatefulScaffold<T, K> extends StatefulWidget {
|
||||||
|
|
||||||
const LongListStatefulScaffold({
|
const LongListStatefulScaffold({
|
||||||
required this.title,
|
required this.title,
|
||||||
this.trailingBuilder,
|
this.trailingBuilder,
|
||||||
@ -125,20 +123,21 @@ class _LongListStatefulScaffoldState<T, K>
|
|||||||
child: Container(
|
child: Container(
|
||||||
padding: CommonStyle.padding,
|
padding: CommonStyle.padding,
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
border: Border.all(color: theme.palette.text),
|
border: Border.all(color: AntTheme.of(context).colorText),
|
||||||
),
|
),
|
||||||
child: Column(
|
child: Column(
|
||||||
children: <Widget>[
|
children: <Widget>[
|
||||||
Text('$count hidden items',
|
Text('$count hidden items',
|
||||||
style:
|
style: TextStyle(
|
||||||
TextStyle(color: theme.palette.text, fontSize: 15)),
|
color: AntTheme.of(context).colorText, fontSize: 15)),
|
||||||
const Padding(padding: EdgeInsets.only(top: 4)),
|
const Padding(padding: EdgeInsets.only(top: 4)),
|
||||||
loadingMore
|
loadingMore
|
||||||
? const CupertinoActivityIndicator()
|
? const CupertinoActivityIndicator()
|
||||||
: Text(
|
: Text(
|
||||||
'Load more...',
|
'Load more...',
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
color: theme.palette.primary, fontSize: 16),
|
color: AntTheme.of(context).colorPrimary,
|
||||||
|
fontSize: 16),
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
@ -177,7 +176,9 @@ class _LongListStatefulScaffoldState<T, K>
|
|||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
final slivers = <Widget>[CupertinoSliverRefreshControl(onRefresh: _refresh)];
|
final slivers = <Widget>[
|
||||||
|
CupertinoSliverRefreshControl(onRefresh: _refresh)
|
||||||
|
];
|
||||||
if (payload != null) {
|
if (payload != null) {
|
||||||
slivers.add(
|
slivers.add(
|
||||||
SliverToBoxAdapter(child: widget.headerBuilder(payload!.header)),
|
SliverToBoxAdapter(child: widget.headerBuilder(payload!.header)),
|
||||||
|
@ -44,7 +44,7 @@
|
|||||||
// SizedBox(height: 12),
|
// SizedBox(height: 12),
|
||||||
// Text(
|
// Text(
|
||||||
// 'GitTouch',
|
// 'GitTouch',
|
||||||
// style: TextStyle(fontSize: 20, color: theme.palette.text),
|
// style: TextStyle(fontSize: 20, color: AntTheme.of(context).text),
|
||||||
// ),
|
// ),
|
||||||
// SizedBox(height: 48),
|
// SizedBox(height: 48),
|
||||||
// AntList(items: [
|
// AntList(items: [
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
|
import 'package:antd_mobile/antd_mobile.dart';
|
||||||
import 'package:flutter/widgets.dart';
|
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';
|
||||||
@ -13,7 +14,6 @@ import 'package:provider/provider.dart';
|
|||||||
import 'package:tuple/tuple.dart';
|
import 'package:tuple/tuple.dart';
|
||||||
|
|
||||||
class BbIssueScreen extends StatelessWidget {
|
class BbIssueScreen extends StatelessWidget {
|
||||||
|
|
||||||
const BbIssueScreen(this.owner, this.name, this.number, {this.isPr = false});
|
const BbIssueScreen(this.owner, this.name, this.number, {this.isPr = false});
|
||||||
final String owner;
|
final String owner;
|
||||||
final String name;
|
final String name;
|
||||||
@ -65,7 +65,7 @@ class BbIssueScreen extends StatelessWidget {
|
|||||||
'$owner / $name',
|
'$owner / $name',
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
fontSize: 17,
|
fontSize: 17,
|
||||||
color: theme.palette.secondaryText,
|
color: AntTheme.of(context).colorTextSecondary,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
const SizedBox(width: 4),
|
const SizedBox(width: 4),
|
||||||
@ -73,7 +73,7 @@ class BbIssueScreen extends StatelessWidget {
|
|||||||
'#$number',
|
'#$number',
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
fontSize: 17,
|
fontSize: 17,
|
||||||
color: theme.palette.tertiaryText,
|
color: AntTheme.of(context).colorWeak,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
|
import 'package:antd_mobile/antd_mobile.dart';
|
||||||
import 'package:flutter/cupertino.dart';
|
import 'package:flutter/cupertino.dart';
|
||||||
import 'package:flutter_gen/gen_l10n/S.dart';
|
import 'package:flutter_gen/gen_l10n/S.dart';
|
||||||
import 'package:git_touch/models/auth.dart';
|
import 'package:git_touch/models/auth.dart';
|
||||||
@ -30,7 +31,7 @@ class _BbIssueCommentScreenState extends State<BbIssueCommentScreen> {
|
|||||||
Padding(
|
Padding(
|
||||||
padding: CommonStyle.padding,
|
padding: CommonStyle.padding,
|
||||||
child: CupertinoTextField(
|
child: CupertinoTextField(
|
||||||
style: TextStyle(color: theme.palette.text),
|
style: TextStyle(color: AntTheme.of(context).colorText),
|
||||||
placeholder: AppLocalizations.of(context)!.body,
|
placeholder: AppLocalizations.of(context)!.body,
|
||||||
onChanged: (v) {
|
onChanged: (v) {
|
||||||
setState(() {
|
setState(() {
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
|
import 'package:antd_mobile/antd_mobile.dart';
|
||||||
import 'package:flutter/cupertino.dart';
|
import 'package:flutter/cupertino.dart';
|
||||||
import 'package:flutter_gen/gen_l10n/S.dart';
|
import 'package:flutter_gen/gen_l10n/S.dart';
|
||||||
import 'package:git_touch/models/auth.dart';
|
import 'package:git_touch/models/auth.dart';
|
||||||
@ -31,7 +32,7 @@ class _BbIssueFormScreenState extends State<BbIssueFormScreen> {
|
|||||||
Padding(
|
Padding(
|
||||||
padding: CommonStyle.padding,
|
padding: CommonStyle.padding,
|
||||||
child: CupertinoTextField(
|
child: CupertinoTextField(
|
||||||
style: TextStyle(color: theme.palette.text),
|
style: TextStyle(color: AntTheme.of(context).colorText),
|
||||||
placeholder: AppLocalizations.of(context)!.title,
|
placeholder: AppLocalizations.of(context)!.title,
|
||||||
onChanged: (v) {
|
onChanged: (v) {
|
||||||
setState(() {
|
setState(() {
|
||||||
@ -43,7 +44,7 @@ class _BbIssueFormScreenState extends State<BbIssueFormScreen> {
|
|||||||
Padding(
|
Padding(
|
||||||
padding: CommonStyle.padding,
|
padding: CommonStyle.padding,
|
||||||
child: CupertinoTextField(
|
child: CupertinoTextField(
|
||||||
style: TextStyle(color: theme.palette.text),
|
style: TextStyle(color: AntTheme.of(context).colorText),
|
||||||
placeholder: AppLocalizations.of(context)!.body,
|
placeholder: AppLocalizations.of(context)!.body,
|
||||||
onChanged: (v) {
|
onChanged: (v) {
|
||||||
setState(() {
|
setState(() {
|
||||||
|
@ -1,6 +1,5 @@
|
|||||||
import 'dart:convert';
|
import 'package:antd_mobile/antd_mobile.dart';import 'dart:convert';
|
||||||
|
|
||||||
import 'package:antd_mobile/antd_mobile.dart';
|
|
||||||
import 'package:filesize/filesize.dart';
|
import 'package:filesize/filesize.dart';
|
||||||
import 'package:flutter/widgets.dart';
|
import 'package:flutter/widgets.dart';
|
||||||
import 'package:flutter_gen/gen_l10n/S.dart';
|
import 'package:flutter_gen/gen_l10n/S.dart';
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
|
import 'package:antd_mobile/antd_mobile.dart';
|
||||||
import 'package:flutter/widgets.dart';
|
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';
|
||||||
@ -48,7 +49,7 @@ class GeCommitScreen extends StatelessWidget {
|
|||||||
'$owner / $name',
|
'$owner / $name',
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
fontSize: 17,
|
fontSize: 17,
|
||||||
color: theme.palette.secondaryText,
|
color: AntTheme.of(context).colorTextSecondary,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
const SizedBox(width: 4),
|
const SizedBox(width: 4),
|
||||||
@ -56,7 +57,7 @@ class GeCommitScreen extends StatelessWidget {
|
|||||||
sha.substring(0, 7),
|
sha.substring(0, 7),
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
fontSize: 17,
|
fontSize: 17,
|
||||||
color: theme.palette.tertiaryText,
|
color: AntTheme.of(context).colorWeak,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
|
import 'package:antd_mobile/antd_mobile.dart';
|
||||||
import 'package:flutter/cupertino.dart';
|
import 'package:flutter/cupertino.dart';
|
||||||
import 'package:flutter/widgets.dart';
|
import 'package:flutter/widgets.dart';
|
||||||
import 'package:flutter_gen/gen_l10n/S.dart';
|
import 'package:flutter_gen/gen_l10n/S.dart';
|
||||||
@ -51,7 +52,7 @@ class GeContributorsScreen extends StatelessWidget {
|
|||||||
Text(
|
Text(
|
||||||
v.name!,
|
v.name!,
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
color: theme.palette.primary,
|
color: AntTheme.of(context).colorPrimary,
|
||||||
fontSize: 18,
|
fontSize: 18,
|
||||||
fontWeight: FontWeight.w600,
|
fontWeight: FontWeight.w600,
|
||||||
),
|
),
|
||||||
@ -62,7 +63,7 @@ class GeContributorsScreen extends StatelessWidget {
|
|||||||
if (v.contributions != null)
|
if (v.contributions != null)
|
||||||
DefaultTextStyle(
|
DefaultTextStyle(
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
color: theme.palette.secondaryText,
|
color: AntTheme.of(context).colorTextSecondary,
|
||||||
fontSize: 16,
|
fontSize: 16,
|
||||||
),
|
),
|
||||||
child: Text('Contributions: ${v.contributions}'),
|
child: Text('Contributions: ${v.contributions}'),
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
|
import 'package:antd_mobile/antd_mobile.dart';
|
||||||
import 'package:flutter/widgets.dart';
|
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';
|
||||||
@ -91,7 +92,7 @@ class GeIssueScreen extends StatelessWidget {
|
|||||||
'$owner / $name',
|
'$owner / $name',
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
fontSize: 17,
|
fontSize: 17,
|
||||||
color: theme.palette.secondaryText,
|
color: AntTheme.of(context).colorTextSecondary,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
const SizedBox(width: 4),
|
const SizedBox(width: 4),
|
||||||
@ -99,7 +100,7 @@ class GeIssueScreen extends StatelessWidget {
|
|||||||
'#$number',
|
'#$number',
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
fontSize: 17,
|
fontSize: 17,
|
||||||
color: theme.palette.tertiaryText,
|
color: AntTheme.of(context).colorWeak,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
|
import 'package:antd_mobile/antd_mobile.dart';
|
||||||
import 'package:flutter/cupertino.dart';
|
import 'package:flutter/cupertino.dart';
|
||||||
import 'package:flutter_gen/gen_l10n/S.dart';
|
import 'package:flutter_gen/gen_l10n/S.dart';
|
||||||
import 'package:git_touch/models/auth.dart';
|
import 'package:git_touch/models/auth.dart';
|
||||||
@ -45,7 +46,7 @@ class _GeIssueCommentScreenState extends State<GeIssueCommentScreen> {
|
|||||||
padding: CommonStyle.padding,
|
padding: CommonStyle.padding,
|
||||||
child: CupertinoTextField(
|
child: CupertinoTextField(
|
||||||
controller: _controller,
|
controller: _controller,
|
||||||
style: TextStyle(color: theme.palette.text),
|
style: TextStyle(color: AntTheme.of(context).colorText),
|
||||||
placeholder: AppLocalizations.of(context)!.body,
|
placeholder: AppLocalizations.of(context)!.body,
|
||||||
maxLines: 10,
|
maxLines: 10,
|
||||||
),
|
),
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
|
import 'package:antd_mobile/antd_mobile.dart';
|
||||||
import 'package:flutter/cupertino.dart';
|
import 'package:flutter/cupertino.dart';
|
||||||
import 'package:flutter_gen/gen_l10n/S.dart';
|
import 'package:flutter_gen/gen_l10n/S.dart';
|
||||||
import 'package:git_touch/models/auth.dart';
|
import 'package:git_touch/models/auth.dart';
|
||||||
@ -31,7 +32,7 @@ class _GeIssueFormScreenState extends State<GeIssueFormScreen> {
|
|||||||
Padding(
|
Padding(
|
||||||
padding: CommonStyle.padding,
|
padding: CommonStyle.padding,
|
||||||
child: CupertinoTextField(
|
child: CupertinoTextField(
|
||||||
style: TextStyle(color: theme.palette.text),
|
style: TextStyle(color: AntTheme.of(context).colorText),
|
||||||
placeholder: AppLocalizations.of(context)!.title,
|
placeholder: AppLocalizations.of(context)!.title,
|
||||||
onChanged: (v) {
|
onChanged: (v) {
|
||||||
setState(() {
|
setState(() {
|
||||||
@ -43,7 +44,7 @@ class _GeIssueFormScreenState extends State<GeIssueFormScreen> {
|
|||||||
Padding(
|
Padding(
|
||||||
padding: CommonStyle.padding,
|
padding: CommonStyle.padding,
|
||||||
child: CupertinoTextField(
|
child: CupertinoTextField(
|
||||||
style: TextStyle(color: theme.palette.text),
|
style: TextStyle(color: AntTheme.of(context).colorText),
|
||||||
placeholder: AppLocalizations.of(context)!.body,
|
placeholder: AppLocalizations.of(context)!.body,
|
||||||
onChanged: (v) {
|
onChanged: (v) {
|
||||||
setState(() {
|
setState(() {
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
|
import 'package:antd_mobile/antd_mobile.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.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';
|
||||||
@ -114,7 +115,8 @@ class GePullScreen extends StatelessWidget {
|
|||||||
'$owner / $name',
|
'$owner / $name',
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
fontSize: 17,
|
fontSize: 17,
|
||||||
color: theme.palette.secondaryText,
|
color: AntTheme.of(context)
|
||||||
|
.colorTextSecondary,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
const SizedBox(width: 4),
|
const SizedBox(width: 4),
|
||||||
@ -122,7 +124,7 @@ class GePullScreen extends StatelessWidget {
|
|||||||
'#$number',
|
'#$number',
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
fontSize: 17,
|
fontSize: 17,
|
||||||
color: theme.palette.tertiaryText,
|
color: AntTheme.of(context).colorWeak,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
@ -157,7 +159,8 @@ class GePullScreen extends StatelessWidget {
|
|||||||
Text(
|
Text(
|
||||||
'${files.length} files changed',
|
'${files.length} files changed',
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
color: theme.palette.secondaryText,
|
color: AntTheme.of(context)
|
||||||
|
.colorTextSecondary,
|
||||||
fontSize: 17,
|
fontSize: 17,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
@ -180,7 +183,8 @@ class GePullScreen extends StatelessWidget {
|
|||||||
),
|
),
|
||||||
Icon(
|
Icon(
|
||||||
Ionicons.chevron_forward,
|
Ionicons.chevron_forward,
|
||||||
color: theme.palette.border,
|
color:
|
||||||
|
AntTheme.of(context).colorBorder,
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
)
|
)
|
||||||
@ -195,7 +199,7 @@ class GePullScreen extends StatelessWidget {
|
|||||||
title: Text(
|
title: Text(
|
||||||
'Commits',
|
'Commits',
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
color: theme.palette.primary,
|
color: AntTheme.of(context).colorPrimary,
|
||||||
fontSize: 18,
|
fontSize: 18,
|
||||||
fontWeight: FontWeight.w600,
|
fontWeight: FontWeight.w600,
|
||||||
),
|
),
|
||||||
@ -215,7 +219,8 @@ class GePullScreen extends StatelessWidget {
|
|||||||
Text(
|
Text(
|
||||||
commit.sha!.substring(0, 7),
|
commit.sha!.substring(0, 7),
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
color: theme.palette.primary,
|
color: AntTheme.of(context)
|
||||||
|
.colorPrimary,
|
||||||
fontSize: 17,
|
fontSize: 17,
|
||||||
fontFamily:
|
fontFamily:
|
||||||
CommonStyle.monospace,
|
CommonStyle.monospace,
|
||||||
|
@ -1,7 +1,6 @@
|
|||||||
import 'dart:convert';
|
import 'package:antd_mobile/antd_mobile.dart';import 'dart:convert';
|
||||||
import 'dart:io';
|
import 'dart:io';
|
||||||
|
|
||||||
import 'package:antd_mobile/antd_mobile.dart';
|
|
||||||
import 'package:flutter/widgets.dart';
|
import 'package:flutter/widgets.dart';
|
||||||
import 'package:flutter_gen/gen_l10n/S.dart';
|
import 'package:flutter_gen/gen_l10n/S.dart';
|
||||||
import 'package:git_touch/models/auth.dart';
|
import 'package:git_touch/models/auth.dart';
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
|
import 'package:antd_mobile/antd_mobile.dart';
|
||||||
import 'package:flutter/cupertino.dart';
|
import 'package:flutter/cupertino.dart';
|
||||||
import 'package:flutter_gen/gen_l10n/S.dart';
|
import 'package:flutter_gen/gen_l10n/S.dart';
|
||||||
import 'package:git_touch/models/auth.dart';
|
import 'package:git_touch/models/auth.dart';
|
||||||
@ -122,7 +123,7 @@ class _GeSearchScreenState extends State<GeSearchScreen> {
|
|||||||
|
|
||||||
return CommonScaffold(
|
return CommonScaffold(
|
||||||
title: Container(
|
title: Container(
|
||||||
color: theme.palette.background,
|
color: AntTheme.of(context).colorBackground,
|
||||||
child: CupertinoTextField(
|
child: CupertinoTextField(
|
||||||
prefix: Row(
|
prefix: Row(
|
||||||
children: const <Widget>[
|
children: const <Widget>[
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
|
import 'package:antd_mobile/antd_mobile.dart';
|
||||||
import 'package:ferry/ferry.dart';
|
import 'package:ferry/ferry.dart';
|
||||||
import 'package:flutter/widgets.dart';
|
import 'package:flutter/widgets.dart';
|
||||||
import 'package:git_touch/graphql/__generated__/github.data.gql.dart';
|
import 'package:git_touch/graphql/__generated__/github.data.gql.dart';
|
||||||
@ -5,18 +6,17 @@ import 'package:git_touch/graphql/__generated__/github.req.gql.dart';
|
|||||||
import 'package:git_touch/graphql/__generated__/github.var.gql.dart';
|
import 'package:git_touch/graphql/__generated__/github.var.gql.dart';
|
||||||
import 'package:git_touch/models/auth.dart';
|
import 'package:git_touch/models/auth.dart';
|
||||||
import 'package:git_touch/models/theme.dart';
|
import 'package:git_touch/models/theme.dart';
|
||||||
|
import 'package:git_touch/scaffolds/long_list.dart';
|
||||||
import 'package:git_touch/utils/utils.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/avatar.dart';
|
import 'package:git_touch/widgets/avatar.dart';
|
||||||
|
import 'package:git_touch/widgets/comment_item.dart';
|
||||||
import 'package:git_touch/widgets/link.dart';
|
import 'package:git_touch/widgets/link.dart';
|
||||||
import 'package:git_touch/widgets/timeline_item.dart';
|
import 'package:git_touch/widgets/timeline_item.dart';
|
||||||
import 'package:github/github.dart' as github;
|
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 'package:git_touch/scaffolds/long_list.dart';
|
|
||||||
import 'package:git_touch/widgets/comment_item.dart';
|
|
||||||
|
|
||||||
class GhIssueScreen extends StatelessWidget {
|
class GhIssueScreen extends StatelessWidget {
|
||||||
const GhIssueScreen(this.owner, this.name, this.number);
|
const GhIssueScreen(this.owner, this.name, this.number);
|
||||||
final String owner;
|
final String owner;
|
||||||
@ -50,7 +50,7 @@ class GhIssueScreen extends StatelessWidget {
|
|||||||
'$owner / $name',
|
'$owner / $name',
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
fontSize: 17,
|
fontSize: 17,
|
||||||
color: theme.palette.secondaryText,
|
color: AntTheme.of(context).colorTextSecondary,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
const SizedBox(width: 4),
|
const SizedBox(width: 4),
|
||||||
@ -58,7 +58,7 @@ class GhIssueScreen extends StatelessWidget {
|
|||||||
'#$number',
|
'#$number',
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
fontSize: 17,
|
fontSize: 17,
|
||||||
color: theme.palette.tertiaryText,
|
color: AntTheme.of(context).colorWeak,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
@ -226,7 +226,7 @@ class GhIssueScreen extends StatelessWidget {
|
|||||||
children: <Widget>[
|
children: <Widget>[
|
||||||
Text('${pr.changedFiles} files changed',
|
Text('${pr.changedFiles} files changed',
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
color: theme.palette.secondaryText,
|
color: AntTheme.of(context).colorTextSecondary,
|
||||||
fontSize: 17,
|
fontSize: 17,
|
||||||
)),
|
)),
|
||||||
Row(
|
Row(
|
||||||
@ -243,7 +243,7 @@ class GhIssueScreen extends StatelessWidget {
|
|||||||
fontSize: 15,
|
fontSize: 15,
|
||||||
)),
|
)),
|
||||||
Icon(Ionicons.chevron_forward,
|
Icon(Ionicons.chevron_forward,
|
||||||
color: theme.palette.border),
|
color: AntTheme.of(context).colorBorder),
|
||||||
],
|
],
|
||||||
)
|
)
|
||||||
],
|
],
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
|
import 'package:antd_mobile/antd_mobile.dart';
|
||||||
import 'package:flutter/cupertino.dart';
|
import 'package:flutter/cupertino.dart';
|
||||||
import 'package:flutter_gen/gen_l10n/S.dart';
|
import 'package:flutter_gen/gen_l10n/S.dart';
|
||||||
import 'package:git_touch/models/auth.dart';
|
import 'package:git_touch/models/auth.dart';
|
||||||
@ -31,7 +32,7 @@ class _GhIssueFormScreenState extends State<GhIssueFormScreen> {
|
|||||||
Padding(
|
Padding(
|
||||||
padding: CommonStyle.padding,
|
padding: CommonStyle.padding,
|
||||||
child: CupertinoTextField(
|
child: CupertinoTextField(
|
||||||
style: TextStyle(color: theme.palette.text),
|
style: TextStyle(color: AntTheme.of(context).colorText),
|
||||||
placeholder: AppLocalizations.of(context)!.title,
|
placeholder: AppLocalizations.of(context)!.title,
|
||||||
onChanged: (v) {
|
onChanged: (v) {
|
||||||
setState(() {
|
setState(() {
|
||||||
@ -43,7 +44,7 @@ class _GhIssueFormScreenState extends State<GhIssueFormScreen> {
|
|||||||
Padding(
|
Padding(
|
||||||
padding: CommonStyle.padding,
|
padding: CommonStyle.padding,
|
||||||
child: CupertinoTextField(
|
child: CupertinoTextField(
|
||||||
style: TextStyle(color: theme.palette.text),
|
style: TextStyle(color: AntTheme.of(context).colorText),
|
||||||
placeholder: AppLocalizations.of(context)!.body,
|
placeholder: AppLocalizations.of(context)!.body,
|
||||||
onChanged: (v) {
|
onChanged: (v) {
|
||||||
setState(() {
|
setState(() {
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
|
import 'package:antd_mobile/antd_mobile.dart';
|
||||||
import 'package:flutter/cupertino.dart';
|
import 'package:flutter/cupertino.dart';
|
||||||
import 'package:flutter/widgets.dart';
|
import 'package:flutter/widgets.dart';
|
||||||
import 'package:flutter_gen/gen_l10n/S.dart';
|
import 'package:flutter_gen/gen_l10n/S.dart';
|
||||||
@ -6,14 +7,13 @@ import 'package:git_touch/models/github.dart';
|
|||||||
import 'package:git_touch/models/notification.dart';
|
import 'package:git_touch/models/notification.dart';
|
||||||
import 'package:git_touch/models/theme.dart';
|
import 'package:git_touch/models/theme.dart';
|
||||||
import 'package:git_touch/scaffolds/tab_stateful.dart';
|
import 'package:git_touch/scaffolds/tab_stateful.dart';
|
||||||
import 'package:git_touch/widgets/app_bar_title.dart';
|
|
||||||
import 'package:github/github.dart';
|
|
||||||
import 'package:provider/provider.dart';
|
|
||||||
|
|
||||||
import 'package:git_touch/utils/utils.dart';
|
import 'package:git_touch/utils/utils.dart';
|
||||||
|
import 'package:git_touch/widgets/app_bar_title.dart';
|
||||||
import 'package:git_touch/widgets/empty.dart';
|
import 'package:git_touch/widgets/empty.dart';
|
||||||
import 'package:git_touch/widgets/list_group.dart';
|
import 'package:git_touch/widgets/list_group.dart';
|
||||||
import 'package:git_touch/widgets/notification_item.dart';
|
import 'package:git_touch/widgets/notification_item.dart';
|
||||||
|
import 'package:github/github.dart';
|
||||||
|
import 'package:provider/provider.dart';
|
||||||
|
|
||||||
class GhNotificationScreen extends StatefulWidget {
|
class GhNotificationScreen extends StatefulWidget {
|
||||||
@override
|
@override
|
||||||
@ -117,7 +117,7 @@ ${item.key}: pullRequest(number: ${item.subject!.number}) {
|
|||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
fontSize: 16,
|
fontSize: 16,
|
||||||
fontWeight: FontWeight.w600,
|
fontWeight: FontWeight.w600,
|
||||||
color: theme.palette.text,
|
color: AntTheme.of(context).colorText,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
GestureDetector(
|
GestureDetector(
|
||||||
@ -132,7 +132,7 @@ ${item.key}: pullRequest(number: ${item.subject!.number}) {
|
|||||||
},
|
},
|
||||||
child: Icon(
|
child: Icon(
|
||||||
Ionicons.checkmark_done,
|
Ionicons.checkmark_done,
|
||||||
color: theme.palette.tertiaryText,
|
color: AntTheme.of(context).colorWeak,
|
||||||
size: 24,
|
size: 24,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
|
import 'package:antd_mobile/antd_mobile.dart';
|
||||||
import 'package:flutter/cupertino.dart';
|
import 'package:flutter/cupertino.dart';
|
||||||
import 'package:flutter_gen/gen_l10n/S.dart';
|
import 'package:flutter_gen/gen_l10n/S.dart';
|
||||||
import 'package:git_touch/models/auth.dart';
|
import 'package:git_touch/models/auth.dart';
|
||||||
@ -182,7 +183,7 @@ class _GhSearchScreenState extends State<GhSearchScreen> {
|
|||||||
|
|
||||||
return CommonScaffold(
|
return CommonScaffold(
|
||||||
title: Container(
|
title: Container(
|
||||||
color: theme.palette.background,
|
color: AntTheme.of(context).colorBackground,
|
||||||
child: CupertinoTextField(
|
child: CupertinoTextField(
|
||||||
prefix: Row(
|
prefix: Row(
|
||||||
children: const <Widget>[
|
children: const <Widget>[
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
|
import 'package:antd_mobile/antd_mobile.dart';
|
||||||
import 'package:flutter/widgets.dart';
|
import 'package:flutter/widgets.dart';
|
||||||
import 'package:flutter_gen/gen_l10n/S.dart';
|
import 'package:flutter_gen/gen_l10n/S.dart';
|
||||||
import 'package:git_touch/models/theme.dart';
|
import 'package:git_touch/models/theme.dart';
|
||||||
@ -66,7 +67,8 @@ class GhTrendingScreen extends StatelessWidget {
|
|||||||
Icon(
|
Icon(
|
||||||
Octicons.repo,
|
Octicons.repo,
|
||||||
size: 17,
|
size: 17,
|
||||||
color: theme.palette.secondaryText,
|
color: AntTheme.of(context)
|
||||||
|
.colorTextSecondary,
|
||||||
),
|
),
|
||||||
const SizedBox(width: 4),
|
const SizedBox(width: 4),
|
||||||
Expanded(
|
Expanded(
|
||||||
@ -74,7 +76,8 @@ class GhTrendingScreen extends StatelessWidget {
|
|||||||
'${v.username} / ${v.repo!.name}',
|
'${v.username} / ${v.repo!.name}',
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
fontSize: 17,
|
fontSize: 17,
|
||||||
color: theme.palette.secondaryText,
|
color: AntTheme.of(context)
|
||||||
|
.colorTextSecondary,
|
||||||
),
|
),
|
||||||
overflow: TextOverflow.ellipsis,
|
overflow: TextOverflow.ellipsis,
|
||||||
))
|
))
|
||||||
|
@ -139,7 +139,8 @@ class _User extends StatelessWidget {
|
|||||||
child: TextWithAt(
|
child: TextWithAt(
|
||||||
text: p.company!,
|
text: p.company!,
|
||||||
linkFactory: (text) => '/github/${text.substring(1)}',
|
linkFactory: (text) => '/github/${text.substring(1)}',
|
||||||
style: TextStyle(fontSize: 17, color: theme.palette.text),
|
style: TextStyle(
|
||||||
|
fontSize: 17, color: AntTheme.of(context).colorText),
|
||||||
oneLine: true,
|
oneLine: true,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
|
import 'package:antd_mobile/antd_mobile.dart';
|
||||||
import 'package:flutter/cupertino.dart';
|
import 'package:flutter/cupertino.dart';
|
||||||
import 'package:flutter_gen/gen_l10n/S.dart';
|
import 'package:flutter_gen/gen_l10n/S.dart';
|
||||||
import 'package:git_touch/models/auth.dart';
|
import 'package:git_touch/models/auth.dart';
|
||||||
@ -30,7 +31,7 @@ class _GlIssueFormScreenState extends State<GlIssueFormScreen> {
|
|||||||
Padding(
|
Padding(
|
||||||
padding: CommonStyle.padding,
|
padding: CommonStyle.padding,
|
||||||
child: CupertinoTextField(
|
child: CupertinoTextField(
|
||||||
style: TextStyle(color: theme.palette.text),
|
style: TextStyle(color: AntTheme.of(context).colorText),
|
||||||
placeholder: AppLocalizations.of(context)!.title,
|
placeholder: AppLocalizations.of(context)!.title,
|
||||||
onChanged: (v) {
|
onChanged: (v) {
|
||||||
setState(() {
|
setState(() {
|
||||||
@ -42,7 +43,7 @@ class _GlIssueFormScreenState extends State<GlIssueFormScreen> {
|
|||||||
Padding(
|
Padding(
|
||||||
padding: CommonStyle.padding,
|
padding: CommonStyle.padding,
|
||||||
child: CupertinoTextField(
|
child: CupertinoTextField(
|
||||||
style: TextStyle(color: theme.palette.text),
|
style: TextStyle(color: AntTheme.of(context).colorText),
|
||||||
placeholder: AppLocalizations.of(context)!.body,
|
placeholder: AppLocalizations.of(context)!.body,
|
||||||
onChanged: (v) {
|
onChanged: (v) {
|
||||||
setState(() {
|
setState(() {
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
|
import 'package:antd_mobile/antd_mobile.dart';
|
||||||
import 'package:flutter/widgets.dart';
|
import 'package:flutter/widgets.dart';
|
||||||
import 'package:flutter_gen/gen_l10n/S.dart';
|
import 'package:flutter_gen/gen_l10n/S.dart';
|
||||||
import 'package:git_touch/models/auth.dart';
|
import 'package:git_touch/models/auth.dart';
|
||||||
@ -44,7 +45,7 @@ class GlProjectActivityScreen extends StatelessWidget {
|
|||||||
TextSpan(
|
TextSpan(
|
||||||
text: data.author!.name,
|
text: data.author!.name,
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
color: theme.palette.primary,
|
color: AntTheme.of(context).colorPrimary,
|
||||||
fontWeight: FontWeight.w500,
|
fontWeight: FontWeight.w500,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
|
import 'package:antd_mobile/antd_mobile.dart';
|
||||||
import 'package:flutter/cupertino.dart';
|
import 'package:flutter/cupertino.dart';
|
||||||
import 'package:flutter_gen/gen_l10n/S.dart';
|
import 'package:flutter_gen/gen_l10n/S.dart';
|
||||||
import 'package:git_touch/models/auth.dart';
|
import 'package:git_touch/models/auth.dart';
|
||||||
@ -98,7 +99,7 @@ class _GlSearchScreenState extends State<GlSearchScreen> {
|
|||||||
|
|
||||||
return CommonScaffold(
|
return CommonScaffold(
|
||||||
title: Container(
|
title: Container(
|
||||||
color: theme.palette.background,
|
color: AntTheme.of(context).colorBackground,
|
||||||
child: CupertinoTextField(
|
child: CupertinoTextField(
|
||||||
prefix: Row(
|
prefix: Row(
|
||||||
children: const <Widget>[
|
children: const <Widget>[
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
|
import 'package:antd_mobile/antd_mobile.dart';
|
||||||
import 'package:flutter/widgets.dart';
|
import 'package:flutter/widgets.dart';
|
||||||
import 'package:git_touch/models/auth.dart';
|
import 'package:git_touch/models/auth.dart';
|
||||||
import 'package:git_touch/models/gitlab.dart';
|
import 'package:git_touch/models/gitlab.dart';
|
||||||
@ -13,7 +14,7 @@ class GlTodosScreen extends StatelessWidget {
|
|||||||
final theme = Provider.of<ThemeModel>(context);
|
final theme = Provider.of<ThemeModel>(context);
|
||||||
return TextSpan(
|
return TextSpan(
|
||||||
text: p.author!.name,
|
text: p.author!.name,
|
||||||
style: TextStyle(color: theme.palette.primary),
|
style: TextStyle(color: AntTheme.of(context).colorPrimary),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -21,7 +22,7 @@ class GlTodosScreen extends StatelessWidget {
|
|||||||
final theme = Provider.of<ThemeModel>(context);
|
final theme = Provider.of<ThemeModel>(context);
|
||||||
return TextSpan(
|
return TextSpan(
|
||||||
text: '${p.project!.pathWithNamespace}!${p.target!.iid}',
|
text: '${p.project!.pathWithNamespace}!${p.target!.iid}',
|
||||||
style: TextStyle(color: theme.palette.primary),
|
style: TextStyle(color: AntTheme.of(context).colorPrimary),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -86,7 +87,8 @@ class GlTodosScreen extends StatelessWidget {
|
|||||||
child: Text.rich(
|
child: Text.rich(
|
||||||
TextSpan(
|
TextSpan(
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
color: theme.palette.text, fontSize: 17),
|
color: AntTheme.of(context).colorText,
|
||||||
|
fontSize: 17),
|
||||||
children: [
|
children: [
|
||||||
..._buildItem(context, item),
|
..._buildItem(context, item),
|
||||||
],
|
],
|
||||||
|
@ -1,6 +1,5 @@
|
|||||||
import 'dart:convert';
|
import 'package:antd_mobile/antd_mobile.dart';import 'dart:convert';
|
||||||
|
|
||||||
import 'package:antd_mobile/antd_mobile.dart';
|
|
||||||
import 'package:flutter/widgets.dart';
|
import 'package:flutter/widgets.dart';
|
||||||
import 'package:flutter_gen/gen_l10n/S.dart';
|
import 'package:flutter_gen/gen_l10n/S.dart';
|
||||||
import 'package:git_touch/models/auth.dart';
|
import 'package:git_touch/models/auth.dart';
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
|
import 'package:antd_mobile/antd_mobile.dart';
|
||||||
import 'package:flutter/widgets.dart';
|
import 'package:flutter/widgets.dart';
|
||||||
import 'package:git_touch/models/auth.dart';
|
import 'package:git_touch/models/auth.dart';
|
||||||
import 'package:git_touch/models/gitea.dart';
|
import 'package:git_touch/models/gitea.dart';
|
||||||
@ -91,7 +92,7 @@ class GtIssueScreen extends StatelessWidget {
|
|||||||
'$owner / $name',
|
'$owner / $name',
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
fontSize: 17,
|
fontSize: 17,
|
||||||
color: theme.palette.secondaryText,
|
color: AntTheme.of(context).colorTextSecondary,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
const SizedBox(width: 4),
|
const SizedBox(width: 4),
|
||||||
@ -99,7 +100,7 @@ class GtIssueScreen extends StatelessWidget {
|
|||||||
'#$number',
|
'#$number',
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
fontSize: 17,
|
fontSize: 17,
|
||||||
color: theme.palette.tertiaryText,
|
color: AntTheme.of(context).colorWeak,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
|
import 'package:antd_mobile/antd_mobile.dart';
|
||||||
import 'package:flutter/cupertino.dart';
|
import 'package:flutter/cupertino.dart';
|
||||||
import 'package:flutter_gen/gen_l10n/S.dart';
|
import 'package:flutter_gen/gen_l10n/S.dart';
|
||||||
import 'package:git_touch/models/auth.dart';
|
import 'package:git_touch/models/auth.dart';
|
||||||
@ -45,7 +46,7 @@ class _GtIssueCommentScreenState extends State<GtIssueCommentScreen> {
|
|||||||
padding: CommonStyle.padding,
|
padding: CommonStyle.padding,
|
||||||
child: CupertinoTextField(
|
child: CupertinoTextField(
|
||||||
controller: _controller,
|
controller: _controller,
|
||||||
style: TextStyle(color: theme.palette.text),
|
style: TextStyle(color: AntTheme.of(context).colorText),
|
||||||
placeholder: AppLocalizations.of(context)!.body,
|
placeholder: AppLocalizations.of(context)!.body,
|
||||||
maxLines: 10,
|
maxLines: 10,
|
||||||
),
|
),
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
|
import 'package:antd_mobile/antd_mobile.dart';
|
||||||
import 'package:flutter/cupertino.dart';
|
import 'package:flutter/cupertino.dart';
|
||||||
import 'package:flutter_gen/gen_l10n/S.dart';
|
import 'package:flutter_gen/gen_l10n/S.dart';
|
||||||
import 'package:git_touch/models/auth.dart';
|
import 'package:git_touch/models/auth.dart';
|
||||||
@ -31,7 +32,7 @@ class _GtIssueFormScreenState extends State<GtIssueFormScreen> {
|
|||||||
Padding(
|
Padding(
|
||||||
padding: CommonStyle.padding,
|
padding: CommonStyle.padding,
|
||||||
child: CupertinoTextField(
|
child: CupertinoTextField(
|
||||||
style: TextStyle(color: theme.palette.text),
|
style: TextStyle(color: AntTheme.of(context).colorText),
|
||||||
placeholder: AppLocalizations.of(context)!.title,
|
placeholder: AppLocalizations.of(context)!.title,
|
||||||
onChanged: (v) {
|
onChanged: (v) {
|
||||||
setState(() {
|
setState(() {
|
||||||
@ -43,7 +44,7 @@ class _GtIssueFormScreenState extends State<GtIssueFormScreen> {
|
|||||||
Padding(
|
Padding(
|
||||||
padding: CommonStyle.padding,
|
padding: CommonStyle.padding,
|
||||||
child: CupertinoTextField(
|
child: CupertinoTextField(
|
||||||
style: TextStyle(color: theme.palette.text),
|
style: TextStyle(color: AntTheme.of(context).colorText),
|
||||||
placeholder: AppLocalizations.of(context)!.body,
|
placeholder: AppLocalizations.of(context)!.body,
|
||||||
onChanged: (v) {
|
onChanged: (v) {
|
||||||
setState(() {
|
setState(() {
|
||||||
|
@ -1,6 +1,5 @@
|
|||||||
import 'dart:convert';
|
import 'package:antd_mobile/antd_mobile.dart';import 'dart:convert';
|
||||||
|
|
||||||
import 'package:antd_mobile/antd_mobile.dart';
|
|
||||||
import 'package:filesize/filesize.dart';
|
import 'package:filesize/filesize.dart';
|
||||||
import 'package:flutter/widgets.dart';
|
import 'package:flutter/widgets.dart';
|
||||||
import 'package:flutter_gen/gen_l10n/S.dart';
|
import 'package:flutter_gen/gen_l10n/S.dart';
|
||||||
|
@ -18,7 +18,7 @@
|
|||||||
// title: title,
|
// title: title,
|
||||||
// body: PhotoView(
|
// body: PhotoView(
|
||||||
// imageProvider: NetworkImage(url),
|
// imageProvider: NetworkImage(url),
|
||||||
// backgroundDecoration: BoxDecoration(color: theme.palette.background),
|
// backgroundDecoration: BoxDecoration(color: AntTheme.of(context).background),
|
||||||
// ),
|
// ),
|
||||||
// );
|
// );
|
||||||
// }
|
// }
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
|
import 'package:antd_mobile/antd_mobile.dart';
|
||||||
import 'package:flutter/cupertino.dart';
|
import 'package:flutter/cupertino.dart';
|
||||||
import 'package:flutter/gestures.dart';
|
import 'package:flutter/gestures.dart';
|
||||||
import 'package:flutter/widgets.dart';
|
import 'package:flutter/widgets.dart';
|
||||||
@ -49,7 +50,8 @@ class _LoginScreenState extends State<LoginScreen> {
|
|||||||
child: Container(
|
child: Container(
|
||||||
padding: CommonStyle.padding,
|
padding: CommonStyle.padding,
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
border: Border(bottom: BorderSide(color: theme.palette.border)),
|
border: Border(
|
||||||
|
bottom: BorderSide(color: AntTheme.of(context).colorBorder)),
|
||||||
),
|
),
|
||||||
child: Row(
|
child: Row(
|
||||||
children: <Widget>[
|
children: <Widget>[
|
||||||
@ -61,12 +63,14 @@ class _LoginScreenState extends State<LoginScreen> {
|
|||||||
children: <Widget>[
|
children: <Widget>[
|
||||||
Text(
|
Text(
|
||||||
account.login,
|
account.login,
|
||||||
style: TextStyle(fontSize: 20, color: theme.palette.text),
|
style: TextStyle(
|
||||||
|
fontSize: 20, color: AntTheme.of(context).colorText),
|
||||||
),
|
),
|
||||||
const Padding(padding: EdgeInsets.only(top: 6)),
|
const Padding(padding: EdgeInsets.only(top: 6)),
|
||||||
Text(
|
Text(
|
||||||
account.domain,
|
account.domain,
|
||||||
style: TextStyle(color: theme.palette.secondaryText),
|
style: TextStyle(
|
||||||
|
color: AntTheme.of(context).colorTextSecondary),
|
||||||
)
|
)
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
@ -88,7 +92,8 @@ class _LoginScreenState extends State<LoginScreen> {
|
|||||||
child: Container(
|
child: Container(
|
||||||
padding: const EdgeInsets.symmetric(vertical: 20),
|
padding: const EdgeInsets.symmetric(vertical: 20),
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
border: Border(bottom: BorderSide(color: theme.palette.border)),
|
border: Border(
|
||||||
|
bottom: BorderSide(color: AntTheme.of(context).colorBorder)),
|
||||||
),
|
),
|
||||||
child: Row(
|
child: Row(
|
||||||
mainAxisAlignment: MainAxisAlignment.center,
|
mainAxisAlignment: MainAxisAlignment.center,
|
||||||
@ -173,7 +178,7 @@ class _LoginScreenState extends State<LoginScreen> {
|
|||||||
'user, repo, read:org, notifications',
|
'user, repo, read:org, notifications',
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
fontSize: 16,
|
fontSize: 16,
|
||||||
color: theme.palette.primary),
|
color: AntTheme.of(context).colorPrimary),
|
||||||
)
|
)
|
||||||
]),
|
]),
|
||||||
);
|
);
|
||||||
@ -212,7 +217,8 @@ class _LoginScreenState extends State<LoginScreen> {
|
|||||||
Text(
|
Text(
|
||||||
'api, read_user, read_repository',
|
'api, read_user, read_repository',
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
fontSize: 16, color: theme.palette.primary),
|
fontSize: 16,
|
||||||
|
color: AntTheme.of(context).colorPrimary),
|
||||||
)
|
)
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
@ -257,8 +263,8 @@ class _LoginScreenState extends State<LoginScreen> {
|
|||||||
),
|
),
|
||||||
TextSpan(
|
TextSpan(
|
||||||
text: 'this guide',
|
text: 'this guide',
|
||||||
style:
|
style: TextStyle(
|
||||||
TextStyle(color: theme.palette.primary),
|
color: AntTheme.of(context).colorPrimary),
|
||||||
recognizer: TapGestureRecognizer()
|
recognizer: TapGestureRecognizer()
|
||||||
..onTap = () {
|
..onTap = () {
|
||||||
context.pushUrl(
|
context.pushUrl(
|
||||||
@ -279,7 +285,8 @@ class _LoginScreenState extends State<LoginScreen> {
|
|||||||
Text(
|
Text(
|
||||||
'Account: read\nTeam membership: read\nProjects: read\nRepositories: read\nPull requests: read\nIssues: read\nSnippets: read',
|
'Account: read\nTeam membership: read\nProjects: read\nRepositories: read\nPull requests: read\nIssues: read\nSnippets: read',
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
fontSize: 16, color: theme.palette.primary),
|
fontSize: 16,
|
||||||
|
color: AntTheme.of(context).colorPrimary),
|
||||||
)
|
)
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
@ -316,7 +323,8 @@ class _LoginScreenState extends State<LoginScreen> {
|
|||||||
Text(
|
Text(
|
||||||
'https://codeberg.org',
|
'https://codeberg.org',
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
fontSize: 16, color: theme.palette.primary),
|
fontSize: 16,
|
||||||
|
color: AntTheme.of(context).colorPrimary),
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
));
|
));
|
||||||
@ -375,7 +383,7 @@ class _LoginScreenState extends State<LoginScreen> {
|
|||||||
AppLocalizations.of(context)!.longPressToRemoveAccount,
|
AppLocalizations.of(context)!.longPressToRemoveAccount,
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
fontSize: 16,
|
fontSize: 16,
|
||||||
color: theme.palette.secondaryText,
|
color: AntTheme.of(context).colorTextSecondary,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
|
import 'package:antd_mobile/antd_mobile.dart';
|
||||||
import 'package:flutter/gestures.dart';
|
import 'package:flutter/gestures.dart';
|
||||||
import 'package:flutter/widgets.dart';
|
import 'package:flutter/widgets.dart';
|
||||||
import 'package:git_touch/models/theme.dart';
|
import 'package:git_touch/models/theme.dart';
|
||||||
@ -64,7 +65,7 @@ TextSpan createLinkSpan(
|
|||||||
return TextSpan(
|
return TextSpan(
|
||||||
text: text,
|
text: text,
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
color: theme.palette.primary,
|
color: AntTheme.of(context).colorPrimary,
|
||||||
fontWeight: FontWeight.w600,
|
fontWeight: FontWeight.w600,
|
||||||
),
|
),
|
||||||
recognizer: TapGestureRecognizer()
|
recognizer: TapGestureRecognizer()
|
||||||
|
@ -37,7 +37,7 @@ class BlobView extends StatelessWidget {
|
|||||||
case 'webp':
|
case 'webp':
|
||||||
// return PhotoView(
|
// return PhotoView(
|
||||||
// imageProvider: MemoryImage(Uint8List.fromList(bits)),
|
// imageProvider: MemoryImage(Uint8List.fromList(bits)),
|
||||||
// backgroundDecoration: BoxDecoration(color: theme.palette.background),
|
// backgroundDecoration: BoxDecoration(color: AntTheme.of(context).background),
|
||||||
// );
|
// );
|
||||||
return base64Text == null
|
return base64Text == null
|
||||||
? Image.network(
|
? Image.network(
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
|
import 'package:antd_mobile/antd_mobile.dart';
|
||||||
import 'package:flutter/widgets.dart';
|
import 'package:flutter/widgets.dart';
|
||||||
import 'package:git_touch/models/theme.dart';
|
import 'package:git_touch/models/theme.dart';
|
||||||
import 'package:provider/provider.dart';
|
import 'package:provider/provider.dart';
|
||||||
|
|
||||||
class BorderView extends StatelessWidget {
|
class BorderView extends StatelessWidget {
|
||||||
|
|
||||||
const BorderView({
|
const BorderView({
|
||||||
this.height,
|
this.height,
|
||||||
this.leftPadding = 0,
|
this.leftPadding = 0,
|
||||||
@ -21,7 +21,7 @@ class BorderView extends StatelessWidget {
|
|||||||
margin: EdgeInsets.only(left: leftPadding),
|
margin: EdgeInsets.only(left: leftPadding),
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
border: Border(
|
border: Border(
|
||||||
top: BorderSide(color: theme.palette.border, width: 0),
|
top: BorderSide(color: AntTheme.of(context).colorBorder, width: 0),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
@ -33,14 +33,16 @@ class BorderView extends StatelessWidget {
|
|||||||
width: leftPadding,
|
width: leftPadding,
|
||||||
height: height,
|
height: height,
|
||||||
child: DecoratedBox(
|
child: DecoratedBox(
|
||||||
decoration: BoxDecoration(color: theme.palette.background),
|
decoration:
|
||||||
|
BoxDecoration(color: AntTheme.of(context).colorBackground),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
Expanded(
|
Expanded(
|
||||||
child: SizedBox(
|
child: SizedBox(
|
||||||
height: height,
|
height: height,
|
||||||
child: DecoratedBox(
|
child: DecoratedBox(
|
||||||
decoration: BoxDecoration(color: theme.palette.border),
|
decoration:
|
||||||
|
BoxDecoration(color: AntTheme.of(context).colorBorder),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
|
import 'package:antd_mobile/antd_mobile.dart';
|
||||||
import 'package:flutter/widgets.dart';
|
import 'package:flutter/widgets.dart';
|
||||||
import 'package:git_touch/graphql/__generated__/github.data.gql.dart';
|
import 'package:git_touch/graphql/__generated__/github.data.gql.dart';
|
||||||
import 'package:git_touch/graphql/__generated__/schema.schema.gql.dart';
|
import 'package:git_touch/graphql/__generated__/schema.schema.gql.dart';
|
||||||
@ -138,7 +139,8 @@ mutation {
|
|||||||
const SizedBox(width: 4),
|
const SizedBox(width: 4),
|
||||||
Text(numberFormat.format(item.count),
|
Text(numberFormat.format(item.count),
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
color: theme.palette.primary, fontSize: 14))
|
color: AntTheme.of(context).colorPrimary,
|
||||||
|
fontSize: 14))
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
@ -160,8 +162,10 @@ mutation {
|
|||||||
child: Wrap(
|
child: Wrap(
|
||||||
crossAxisAlignment: WrapCrossAlignment.center,
|
crossAxisAlignment: WrapCrossAlignment.center,
|
||||||
children: <Widget>[
|
children: <Widget>[
|
||||||
Text('+', style: TextStyle(color: theme.palette.primary)),
|
Text('+',
|
||||||
Icon(Octicons.smiley, color: theme.palette.primary, size: 18),
|
style: TextStyle(color: AntTheme.of(context).colorPrimary)),
|
||||||
|
Icon(Octicons.smiley,
|
||||||
|
color: AntTheme.of(context).colorPrimary, size: 18),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
@ -224,7 +228,7 @@ class CommentItem extends StatelessWidget {
|
|||||||
Text(
|
Text(
|
||||||
timeago.format(createdAt!),
|
timeago.format(createdAt!),
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
color: theme.palette.tertiaryText, fontSize: 13),
|
color: AntTheme.of(context).colorWeak, fontSize: 13),
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
|
@ -44,7 +44,7 @@ class CommitItem extends StatelessWidget {
|
|||||||
message!,
|
message!,
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
fontSize: 17,
|
fontSize: 17,
|
||||||
color: theme.palette.text,
|
color: AntTheme.of(context).colorText,
|
||||||
),
|
),
|
||||||
overflow: TextOverflow.ellipsis,
|
overflow: TextOverflow.ellipsis,
|
||||||
maxLines: 1,
|
maxLines: 1,
|
||||||
@ -54,11 +54,12 @@ class CommitItem extends StatelessWidget {
|
|||||||
children: <Widget>[
|
children: <Widget>[
|
||||||
Text(author!,
|
Text(author!,
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
fontSize: 15, color: theme.palette.primary)),
|
fontSize: 15,
|
||||||
|
color: AntTheme.of(context).colorPrimary)),
|
||||||
Text(
|
Text(
|
||||||
' committed ${timeago.format(createdAt!)}',
|
' committed ${timeago.format(createdAt!)}',
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
color: theme.palette.secondaryText,
|
color: AntTheme.of(context).colorTextSecondary,
|
||||||
fontSize: 15,
|
fontSize: 15,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
@ -38,7 +38,7 @@ class ContributorItem extends StatelessWidget {
|
|||||||
Text(
|
Text(
|
||||||
login!,
|
login!,
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
color: theme.palette.primary,
|
color: AntTheme.of(context).colorPrimary,
|
||||||
fontSize: 18,
|
fontSize: 18,
|
||||||
fontWeight: FontWeight.w600,
|
fontWeight: FontWeight.w600,
|
||||||
),
|
),
|
||||||
@ -49,7 +49,7 @@ class ContributorItem extends StatelessWidget {
|
|||||||
if (commits != null)
|
if (commits != null)
|
||||||
DefaultTextStyle(
|
DefaultTextStyle(
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
color: theme.palette.secondaryText,
|
color: AntTheme.of(context).colorTextSecondary,
|
||||||
fontSize: 16,
|
fontSize: 16,
|
||||||
),
|
),
|
||||||
child: Text('Commits: $commits'),
|
child: Text('Commits: $commits'),
|
||||||
|
@ -57,7 +57,7 @@
|
|||||||
// Text(
|
// Text(
|
||||||
// c.heading,
|
// c.heading,
|
||||||
// style: TextStyle(
|
// style: TextStyle(
|
||||||
// color: theme.palette.tertiaryText,
|
// color: AntTheme.of(context).tertiaryText,
|
||||||
// backgroundColor: Color(0xfffafafa),
|
// backgroundColor: Color(0xfffafafa),
|
||||||
// ),
|
// ),
|
||||||
// ),
|
// ),
|
||||||
@ -79,7 +79,7 @@
|
|||||||
// style: TextStyle(
|
// style: TextStyle(
|
||||||
// fontFamily: code.fontFamilyUsed,
|
// fontFamily: code.fontFamilyUsed,
|
||||||
// fontSize: 14,
|
// fontSize: 14,
|
||||||
// color: theme.palette.text,
|
// color: AntTheme.of(context).text,
|
||||||
// ),
|
// ),
|
||||||
// );
|
// );
|
||||||
// }
|
// }
|
||||||
|
@ -1,11 +1,11 @@
|
|||||||
|
import 'package:antd_mobile/antd_mobile.dart';
|
||||||
import 'package:flutter/cupertino.dart';
|
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:git_touch/widgets/link.dart';
|
import 'package:git_touch/widgets/link.dart';
|
||||||
|
import 'package:provider/provider.dart';
|
||||||
|
|
||||||
class EntryItem extends StatelessWidget {
|
class EntryItem extends StatelessWidget {
|
||||||
|
|
||||||
const EntryItem({
|
const EntryItem({
|
||||||
required this.text,
|
required this.text,
|
||||||
this.count,
|
this.count,
|
||||||
@ -31,14 +31,14 @@ class EntryItem extends StatelessWidget {
|
|||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
fontSize: 17,
|
fontSize: 17,
|
||||||
fontWeight: FontWeight.w600,
|
fontWeight: FontWeight.w600,
|
||||||
color: theme.palette.text,
|
color: AntTheme.of(context).colorText,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
Text(
|
Text(
|
||||||
text,
|
text,
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
fontSize: 14,
|
fontSize: 14,
|
||||||
color: theme.palette.secondaryText,
|
color: AntTheme.of(context).colorTextSecondary,
|
||||||
fontWeight: FontWeight.w500,
|
fontWeight: FontWeight.w500,
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
|
import 'package:antd_mobile/antd_mobile.dart';
|
||||||
import 'package:flutter/cupertino.dart';
|
import 'package:flutter/cupertino.dart';
|
||||||
import 'package:flutter/gestures.dart';
|
import 'package:flutter/gestures.dart';
|
||||||
import 'package:flutter/widgets.dart';
|
import 'package:flutter/widgets.dart';
|
||||||
@ -20,7 +21,7 @@ class EventItem extends StatelessWidget {
|
|||||||
final theme = Provider.of<ThemeModel>(context);
|
final theme = Provider.of<ThemeModel>(context);
|
||||||
return TextSpan(
|
return TextSpan(
|
||||||
text: text,
|
text: text,
|
||||||
style: TextStyle(color: theme.palette.primary),
|
style: TextStyle(color: AntTheme.of(context).colorPrimary),
|
||||||
recognizer: TapGestureRecognizer()
|
recognizer: TapGestureRecognizer()
|
||||||
..onTap = () {
|
..onTap = () {
|
||||||
context.pushUrl(url!);
|
context.pushUrl(url!);
|
||||||
@ -65,7 +66,7 @@ class EventItem extends StatelessWidget {
|
|||||||
TextSpan(
|
TextSpan(
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
fontSize: 17,
|
fontSize: 17,
|
||||||
color: theme.palette.text,
|
color: AntTheme.of(context).colorText,
|
||||||
),
|
),
|
||||||
children: [
|
children: [
|
||||||
_buildLinkSpan(context, e.actor!.login,
|
_buildLinkSpan(context, e.actor!.login,
|
||||||
@ -80,7 +81,7 @@ class EventItem extends StatelessWidget {
|
|||||||
Text(timeago.format(e.createdAt!),
|
Text(timeago.format(e.createdAt!),
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
fontSize: 14,
|
fontSize: 14,
|
||||||
color: theme.palette.tertiaryText,
|
color: AntTheme.of(context).colorWeak,
|
||||||
)),
|
)),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
@ -102,7 +103,7 @@ class EventItem extends StatelessWidget {
|
|||||||
spans: [
|
spans: [
|
||||||
TextSpan(
|
TextSpan(
|
||||||
text: ' ${e.type!}',
|
text: ' ${e.type!}',
|
||||||
style: TextStyle(color: theme.palette.primary),
|
style: TextStyle(color: AntTheme.of(context).colorPrimary),
|
||||||
)
|
)
|
||||||
],
|
],
|
||||||
card: Text(
|
card: Text(
|
||||||
@ -117,15 +118,16 @@ class EventItem extends StatelessWidget {
|
|||||||
'/github/${e.repoOwner}/${e.repoName}/compare/${e.payload!.before}/${e.payload!.head}',
|
'/github/${e.repoOwner}/${e.repoName}/compare/${e.payload!.before}/${e.payload!.head}',
|
||||||
child: Container(
|
child: Container(
|
||||||
padding: const EdgeInsets.all(12),
|
padding: const EdgeInsets.all(12),
|
||||||
decoration: BoxDecoration(
|
decoration: const BoxDecoration(
|
||||||
color: theme.palette.grayBackground,
|
color: Color(0xffcccccc),
|
||||||
borderRadius: const BorderRadius.all(Radius.circular(4))),
|
borderRadius: BorderRadius.all(Radius.circular(4))),
|
||||||
child: Column(
|
child: Column(
|
||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
children: [
|
children: [
|
||||||
Text.rich(
|
Text.rich(
|
||||||
TextSpan(
|
TextSpan(
|
||||||
style: TextStyle(color: theme.palette.text, fontSize: 15),
|
style: TextStyle(
|
||||||
|
color: AntTheme.of(context).colorText, fontSize: 15),
|
||||||
children: [
|
children: [
|
||||||
TextSpan(
|
TextSpan(
|
||||||
text:
|
text:
|
||||||
@ -144,7 +146,7 @@ class EventItem extends StatelessWidget {
|
|||||||
Text(
|
Text(
|
||||||
commit.sha!.substring(0, 7),
|
commit.sha!.substring(0, 7),
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
color: theme.palette.primary,
|
color: AntTheme.of(context).colorPrimary,
|
||||||
fontSize: 15,
|
fontSize: 15,
|
||||||
fontFamily: CommonStyle.monospace,
|
fontFamily: CommonStyle.monospace,
|
||||||
),
|
),
|
||||||
@ -155,7 +157,8 @@ class EventItem extends StatelessWidget {
|
|||||||
commit.message!,
|
commit.message!,
|
||||||
overflow: TextOverflow.ellipsis,
|
overflow: TextOverflow.ellipsis,
|
||||||
maxLines: 1,
|
maxLines: 1,
|
||||||
style: TextStyle(color: theme.palette.text, fontSize: 15),
|
style: TextStyle(
|
||||||
|
color: AntTheme.of(context).colorText, fontSize: 15),
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
],
|
],
|
||||||
@ -175,7 +178,7 @@ class EventItem extends StatelessWidget {
|
|||||||
child: Container(
|
child: Container(
|
||||||
padding: const EdgeInsets.all(12),
|
padding: const EdgeInsets.all(12),
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
color: theme.palette.grayBackground,
|
color: AntTheme.of(context).colorBox,
|
||||||
borderRadius: const BorderRadius.all(Radius.circular(4))),
|
borderRadius: const BorderRadius.all(Radius.circular(4))),
|
||||||
child: Column(
|
child: Column(
|
||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
@ -185,7 +188,7 @@ class EventItem extends StatelessWidget {
|
|||||||
Text(
|
Text(
|
||||||
e.payload!.comment!.commitId!.substring(0, 7),
|
e.payload!.comment!.commitId!.substring(0, 7),
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
color: theme.palette.primary,
|
color: AntTheme.of(context).colorPrimary,
|
||||||
fontSize: 15,
|
fontSize: 15,
|
||||||
fontFamily: CommonStyle.monospace,
|
fontFamily: CommonStyle.monospace,
|
||||||
),
|
),
|
||||||
@ -196,7 +199,8 @@ class EventItem extends StatelessWidget {
|
|||||||
e.payload!.comment!.body!,
|
e.payload!.comment!.body!,
|
||||||
overflow: TextOverflow.ellipsis,
|
overflow: TextOverflow.ellipsis,
|
||||||
maxLines: 1,
|
maxLines: 1,
|
||||||
style: TextStyle(color: theme.palette.text, fontSize: 15),
|
style: TextStyle(
|
||||||
|
color: AntTheme.of(context).colorText, fontSize: 15),
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
],
|
],
|
||||||
@ -234,7 +238,7 @@ class EventItem extends StatelessWidget {
|
|||||||
child: Container(
|
child: Container(
|
||||||
padding: const EdgeInsets.all(12),
|
padding: const EdgeInsets.all(12),
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
color: theme.palette.grayBackground,
|
color: AntTheme.of(context).colorBox,
|
||||||
borderRadius: const BorderRadius.all(Radius.circular(4))),
|
borderRadius: const BorderRadius.all(Radius.circular(4))),
|
||||||
child: Column(
|
child: Column(
|
||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
@ -249,7 +253,7 @@ class EventItem extends StatelessWidget {
|
|||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
fontWeight: FontWeight.w500,
|
fontWeight: FontWeight.w500,
|
||||||
fontSize: 17,
|
fontSize: 17,
|
||||||
color: theme.palette.text,
|
color: AntTheme.of(context).colorText,
|
||||||
),
|
),
|
||||||
overflow: TextOverflow.ellipsis,
|
overflow: TextOverflow.ellipsis,
|
||||||
),
|
),
|
||||||
@ -261,8 +265,9 @@ class EventItem extends StatelessWidget {
|
|||||||
body,
|
body,
|
||||||
overflow: TextOverflow.ellipsis,
|
overflow: TextOverflow.ellipsis,
|
||||||
maxLines: 3,
|
maxLines: 3,
|
||||||
style:
|
style: TextStyle(
|
||||||
TextStyle(color: theme.palette.secondaryText, fontSize: 15),
|
color: AntTheme.of(context).colorTextSecondary,
|
||||||
|
fontSize: 15),
|
||||||
),
|
),
|
||||||
Row(
|
Row(
|
||||||
children: <Widget>[
|
children: <Widget>[
|
||||||
@ -271,20 +276,20 @@ class EventItem extends StatelessWidget {
|
|||||||
Text(issue.user!.login!,
|
Text(issue.user!.login!,
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
fontSize: 14,
|
fontSize: 14,
|
||||||
color: theme.palette.tertiaryText,
|
color: AntTheme.of(context).colorWeak,
|
||||||
)),
|
)),
|
||||||
Expanded(child: Container()),
|
Expanded(child: Container()),
|
||||||
if (issue.comments != null) ...[
|
if (issue.comments != null) ...[
|
||||||
Icon(
|
Icon(
|
||||||
Octicons.comment,
|
Octicons.comment,
|
||||||
size: 14,
|
size: 14,
|
||||||
color: theme.palette.tertiaryText,
|
color: AntTheme.of(context).colorWeak,
|
||||||
),
|
),
|
||||||
const SizedBox(width: 4),
|
const SizedBox(width: 4),
|
||||||
Text(issue.comments.toString(),
|
Text(issue.comments.toString(),
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
fontSize: 14,
|
fontSize: 14,
|
||||||
color: theme.palette.tertiaryText,
|
color: AntTheme.of(context).colorWeak,
|
||||||
)),
|
)),
|
||||||
]
|
]
|
||||||
],
|
],
|
||||||
@ -422,8 +427,7 @@ class EventItem extends StatelessWidget {
|
|||||||
],
|
],
|
||||||
);
|
);
|
||||||
case 'InstallationRepositoriesEvent':
|
case 'InstallationRepositoriesEvent':
|
||||||
final repositoriesAdded =
|
final repositoriesAdded = e.payload!.installation!.repositoriesAdded!;
|
||||||
e.payload!.installation!.repositoriesAdded!;
|
|
||||||
final repositoriesRemoved =
|
final repositoriesRemoved =
|
||||||
e.payload!.installation!.repositoriesRemoved!;
|
e.payload!.installation!.repositoriesRemoved!;
|
||||||
var addedRepos = '';
|
var addedRepos = '';
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
|
import 'package:antd_mobile/antd_mobile.dart';
|
||||||
import 'package:flutter/widgets.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';
|
||||||
@ -7,7 +8,6 @@ import 'package:git_touch/utils/utils.dart';
|
|||||||
import 'package:provider/provider.dart';
|
import 'package:provider/provider.dart';
|
||||||
|
|
||||||
class FilesItem extends StatelessWidget {
|
class FilesItem extends StatelessWidget {
|
||||||
|
|
||||||
const FilesItem({
|
const FilesItem({
|
||||||
required this.filename,
|
required this.filename,
|
||||||
required this.status,
|
required this.status,
|
||||||
@ -26,13 +26,13 @@ class FilesItem extends StatelessWidget {
|
|||||||
final theme = Provider.of<ThemeModel>(context);
|
final theme = Provider.of<ThemeModel>(context);
|
||||||
final codeProvider = Provider.of<CodeModel>(context);
|
final codeProvider = Provider.of<CodeModel>(context);
|
||||||
return Card(
|
return Card(
|
||||||
color: theme.palette.background,
|
color: AntTheme.of(context).colorBackground,
|
||||||
margin: const EdgeInsets.all(0),
|
margin: const EdgeInsets.all(0),
|
||||||
child: ExpansionTile(
|
child: ExpansionTile(
|
||||||
title: Text(
|
title: Text(
|
||||||
filename!,
|
filename!,
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
color: theme.palette.primary,
|
color: AntTheme.of(context).colorPrimary,
|
||||||
fontSize: 18,
|
fontSize: 18,
|
||||||
fontWeight: FontWeight.w600,
|
fontWeight: FontWeight.w600,
|
||||||
),
|
),
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
|
import 'package:antd_mobile/antd_mobile.dart';
|
||||||
import 'package:flutter/widgets.dart';
|
import 'package:flutter/widgets.dart';
|
||||||
import 'package:from_css_color/from_css_color.dart';
|
import 'package:from_css_color/from_css_color.dart';
|
||||||
import 'package:git_touch/models/theme.dart';
|
import 'package:git_touch/models/theme.dart';
|
||||||
@ -9,7 +10,6 @@ import 'package:provider/provider.dart';
|
|||||||
import 'package:timeago/timeago.dart' as timeago;
|
import 'package:timeago/timeago.dart' as timeago;
|
||||||
|
|
||||||
class GistsItem extends StatelessWidget {
|
class GistsItem extends StatelessWidget {
|
||||||
|
|
||||||
const GistsItem({
|
const GistsItem({
|
||||||
required this.description,
|
required this.description,
|
||||||
required this.login,
|
required this.login,
|
||||||
@ -56,14 +56,14 @@ class GistsItem extends StatelessWidget {
|
|||||||
text: '$login / ',
|
text: '$login / ',
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
fontSize: 18,
|
fontSize: 18,
|
||||||
color: theme.palette.primary,
|
color: AntTheme.of(context).colorPrimary,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
TextSpan(
|
TextSpan(
|
||||||
text: filenames[0],
|
text: filenames[0],
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
fontSize: 18,
|
fontSize: 18,
|
||||||
color: theme.palette.primary,
|
color: AntTheme.of(context).colorPrimary,
|
||||||
fontWeight: FontWeight.w600,
|
fontWeight: FontWeight.w600,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
@ -78,7 +78,7 @@ class GistsItem extends StatelessWidget {
|
|||||||
Text(
|
Text(
|
||||||
description!,
|
description!,
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
color: theme.palette.secondaryText,
|
color: AntTheme.of(context).colorTextSecondary,
|
||||||
fontSize: 16,
|
fontSize: 16,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
@ -89,13 +89,14 @@ class GistsItem extends StatelessWidget {
|
|||||||
'Updated ${timeago.format(updatedAt!)}',
|
'Updated ${timeago.format(updatedAt!)}',
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
fontSize: 14,
|
fontSize: 14,
|
||||||
color: theme.palette.tertiaryText,
|
color: AntTheme.of(context).colorWeak,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
const SizedBox(height: 10),
|
const SizedBox(height: 10),
|
||||||
],
|
],
|
||||||
DefaultTextStyle(
|
DefaultTextStyle(
|
||||||
style: TextStyle(color: theme.palette.text, fontSize: 14),
|
style: TextStyle(
|
||||||
|
color: AntTheme.of(context).colorText, fontSize: 14),
|
||||||
child: Row(
|
child: Row(
|
||||||
children: <Widget>[
|
children: <Widget>[
|
||||||
if (language != null)
|
if (language != null)
|
||||||
|
@ -80,7 +80,7 @@ class IssueItem extends StatelessWidget {
|
|||||||
TextSpan(
|
TextSpan(
|
||||||
text: subtitle,
|
text: subtitle,
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
color: theme.palette.tertiaryText,
|
color: AntTheme.of(context).colorWeak,
|
||||||
fontWeight: FontWeight.normal,
|
fontWeight: FontWeight.normal,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
@ -88,7 +88,7 @@ class IssueItem extends StatelessWidget {
|
|||||||
),
|
),
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
fontSize: 17,
|
fontSize: 17,
|
||||||
color: theme.palette.text,
|
color: AntTheme.of(context).colorText,
|
||||||
fontWeight: FontWeight.w600,
|
fontWeight: FontWeight.w600,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
@ -96,7 +96,7 @@ class IssueItem extends StatelessWidget {
|
|||||||
DefaultTextStyle(
|
DefaultTextStyle(
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
fontSize: 14,
|
fontSize: 14,
|
||||||
color: theme.palette.secondaryText,
|
color: AntTheme.of(context).colorTextSecondary,
|
||||||
),
|
),
|
||||||
child: Row(
|
child: Row(
|
||||||
crossAxisAlignment: CrossAxisAlignment.center,
|
crossAxisAlignment: CrossAxisAlignment.center,
|
||||||
@ -118,14 +118,15 @@ class IssueItem extends StatelessWidget {
|
|||||||
' opened ${timeago.format(updatedAt!)}',
|
' opened ${timeago.format(updatedAt!)}',
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
fontSize: 17,
|
fontSize: 17,
|
||||||
color: theme.palette.secondaryText,
|
color: AntTheme.of(context).colorTextSecondary,
|
||||||
),
|
),
|
||||||
overflow: TextOverflow.ellipsis,
|
overflow: TextOverflow.ellipsis,
|
||||||
)),
|
)),
|
||||||
if (commentCount! > 0) ...[
|
if (commentCount! > 0) ...[
|
||||||
const Expanded(child: SizedBox()),
|
const Expanded(child: SizedBox()),
|
||||||
Icon(Octicons.comment,
|
Icon(Octicons.comment,
|
||||||
size: 14, color: theme.palette.secondaryText),
|
size: 14,
|
||||||
|
color: AntTheme.of(context).colorTextSecondary),
|
||||||
const SizedBox(width: 3),
|
const SizedBox(width: 3),
|
||||||
Text(numberFormat.format(commentCount))
|
Text(numberFormat.format(commentCount))
|
||||||
],
|
],
|
||||||
|
@ -40,7 +40,7 @@ class LanguageBar extends StatelessWidget {
|
|||||||
);
|
);
|
||||||
},
|
},
|
||||||
child: Container(
|
child: Container(
|
||||||
// color: theme.palette.background,
|
// color: AntTheme.of(context).background,
|
||||||
padding: CommonStyle.padding.copyWith(top: 8, bottom: 8),
|
padding: CommonStyle.padding.copyWith(top: 8, bottom: 8),
|
||||||
child: ClipRRect(
|
child: ClipRRect(
|
||||||
borderRadius: BorderRadius.circular(5),
|
borderRadius: BorderRadius.circular(5),
|
||||||
@ -65,7 +65,7 @@ class LanguageBar extends StatelessWidget {
|
|||||||
Widget _buildPopup(BuildContext context) {
|
Widget _buildPopup(BuildContext context) {
|
||||||
final theme = Provider.of<ThemeModel>(context);
|
final theme = Provider.of<ThemeModel>(context);
|
||||||
return Container(
|
return Container(
|
||||||
color: theme.palette.background,
|
color: AntTheme.of(context).colorBackground,
|
||||||
padding: CommonStyle.padding,
|
padding: CommonStyle.padding,
|
||||||
height: 300,
|
height: 300,
|
||||||
child: SingleChildScrollView(
|
child: SingleChildScrollView(
|
||||||
@ -87,10 +87,10 @@ class LanguageBar extends StatelessWidget {
|
|||||||
Text(
|
Text(
|
||||||
edge.name!,
|
edge.name!,
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
color: theme.palette.text,
|
color: AntTheme.of(context).colorText,
|
||||||
fontSize: 18,
|
fontSize: 18,
|
||||||
decoration: TextDecoration.underline,
|
decoration: TextDecoration.underline,
|
||||||
decorationColor: theme.palette.background,
|
decorationColor: AntTheme.of(context).colorBackground,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
]),
|
]),
|
||||||
@ -100,10 +100,10 @@ class LanguageBar extends StatelessWidget {
|
|||||||
child: Text(
|
child: Text(
|
||||||
'${(edge.ratio! * 100).toStringAsFixed(1)}%',
|
'${(edge.ratio! * 100).toStringAsFixed(1)}%',
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
color: theme.palette.secondaryText,
|
color: AntTheme.of(context).colorTextSecondary,
|
||||||
fontSize: 18,
|
fontSize: 18,
|
||||||
decoration: TextDecoration.underline,
|
decoration: TextDecoration.underline,
|
||||||
decorationColor: theme.palette.background,
|
decorationColor: AntTheme.of(context).colorBackground,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
@ -1,11 +1,10 @@
|
|||||||
|
import 'package:antd_mobile/antd_mobile.dart';
|
||||||
import 'package:flutter/widgets.dart';
|
import 'package:flutter/widgets.dart';
|
||||||
import 'package:provider/provider.dart';
|
|
||||||
|
|
||||||
import 'package:git_touch/models/theme.dart';
|
import 'package:git_touch/models/theme.dart';
|
||||||
import 'package:git_touch/widgets/empty.dart';
|
import 'package:git_touch/widgets/empty.dart';
|
||||||
|
import 'package:provider/provider.dart';
|
||||||
|
|
||||||
class ListGroup<T> extends StatelessWidget {
|
class ListGroup<T> extends StatelessWidget {
|
||||||
|
|
||||||
const ListGroup({
|
const ListGroup({
|
||||||
required this.title,
|
required this.title,
|
||||||
required this.items,
|
required this.items,
|
||||||
@ -21,7 +20,8 @@ class ListGroup<T> extends StatelessWidget {
|
|||||||
final theme = Provider.of<ThemeModel>(context);
|
final theme = Provider.of<ThemeModel>(context);
|
||||||
return Container(
|
return Container(
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
border: Border(top: BorderSide(color: theme.palette.border)),
|
border:
|
||||||
|
Border(top: BorderSide(color: AntTheme.of(context).colorBorder)),
|
||||||
),
|
),
|
||||||
child: itemBuilder(entry.value, entry.key),
|
child: itemBuilder(entry.value, entry.key),
|
||||||
);
|
);
|
||||||
@ -34,7 +34,7 @@ class ListGroup<T> extends StatelessWidget {
|
|||||||
padding: padding,
|
padding: padding,
|
||||||
child: Container(
|
child: Container(
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
border: Border.all(color: theme.palette.border),
|
border: Border.all(color: AntTheme.of(context).colorBorder),
|
||||||
borderRadius: const BorderRadius.all(Radius.circular(3)),
|
borderRadius: const BorderRadius.all(Radius.circular(3)),
|
||||||
),
|
),
|
||||||
child: Column(
|
child: Column(
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
|
import 'package:antd_mobile/antd_mobile.dart';
|
||||||
import 'package:flutter/widgets.dart';
|
import 'package:flutter/widgets.dart';
|
||||||
import 'package:flutter_markdown/flutter_markdown.dart';
|
import 'package:flutter_markdown/flutter_markdown.dart';
|
||||||
import 'package:git_touch/models/code.dart';
|
import 'package:git_touch/models/code.dart';
|
||||||
@ -100,8 +101,8 @@ class MarkdownFlutterView extends StatelessWidget {
|
|||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
final theme = Provider.of<ThemeModel>(context);
|
final theme = Provider.of<ThemeModel>(context);
|
||||||
final code = Provider.of<CodeModel>(context);
|
final code = Provider.of<CodeModel>(context);
|
||||||
final basicStyle =
|
final basicStyle = TextStyle(
|
||||||
TextStyle(fontSize: 16, color: theme.palette.text, height: 1.5);
|
fontSize: 16, color: AntTheme.of(context).colorText, height: 1.5);
|
||||||
final hStyle =
|
final hStyle =
|
||||||
basicStyle.copyWith(fontWeight: FontWeight.w600, height: 1.25);
|
basicStyle.copyWith(fontWeight: FontWeight.w600, height: 1.25);
|
||||||
|
|
||||||
@ -157,10 +158,10 @@ class MarkdownFlutterView extends StatelessWidget {
|
|||||||
launchStringUrl(url);
|
launchStringUrl(url);
|
||||||
},
|
},
|
||||||
styleSheet: MarkdownStyleSheet(
|
styleSheet: MarkdownStyleSheet(
|
||||||
a: basicStyle.copyWith(color: theme.palette.primary),
|
a: basicStyle.copyWith(color: AntTheme.of(context).colorPrimary),
|
||||||
p: basicStyle,
|
p: basicStyle,
|
||||||
code: basicStyle.copyWith(
|
code: basicStyle.copyWith(
|
||||||
backgroundColor: theme.palette.grayBackground,
|
backgroundColor: AntTheme.of(context).colorBox,
|
||||||
fontSize: 16 * 0.85,
|
fontSize: 16 * 0.85,
|
||||||
height: 1.45,
|
height: 1.45,
|
||||||
fontFamily: code.fontStyle.fontFamily,
|
fontFamily: code.fontStyle.fontFamily,
|
||||||
@ -171,11 +172,12 @@ class MarkdownFlutterView extends StatelessWidget {
|
|||||||
h4: hStyle,
|
h4: hStyle,
|
||||||
h5: hStyle.copyWith(fontSize: 14),
|
h5: hStyle.copyWith(fontSize: 14),
|
||||||
h6: hStyle.copyWith(
|
h6: hStyle.copyWith(
|
||||||
fontSize: 16 * 0.85, color: theme.palette.tertiaryText),
|
fontSize: 16 * 0.85, color: AntTheme.of(context).colorWeak),
|
||||||
em: basicStyle.copyWith(fontStyle: FontStyle.italic),
|
em: basicStyle.copyWith(fontStyle: FontStyle.italic),
|
||||||
strong: basicStyle.copyWith(fontWeight: FontWeight.w600),
|
strong: basicStyle.copyWith(fontWeight: FontWeight.w600),
|
||||||
del: const TextStyle(decoration: TextDecoration.lineThrough),
|
del: const TextStyle(decoration: TextDecoration.lineThrough),
|
||||||
blockquote: basicStyle.copyWith(color: theme.palette.tertiaryText),
|
blockquote:
|
||||||
|
basicStyle.copyWith(color: AntTheme.of(context).colorWeak),
|
||||||
img: basicStyle,
|
img: basicStyle,
|
||||||
checkbox: basicStyle,
|
checkbox: basicStyle,
|
||||||
blockSpacing: 16,
|
blockSpacing: 16,
|
||||||
@ -194,14 +196,14 @@ class MarkdownFlutterView extends StatelessWidget {
|
|||||||
),
|
),
|
||||||
codeblockPadding: const EdgeInsets.all(16),
|
codeblockPadding: const EdgeInsets.all(16),
|
||||||
codeblockDecoration: BoxDecoration(
|
codeblockDecoration: BoxDecoration(
|
||||||
color: theme.palette.grayBackground,
|
color: AntTheme.of(context).colorBox,
|
||||||
borderRadius: BorderRadius.circular(3),
|
borderRadius: BorderRadius.circular(3),
|
||||||
),
|
),
|
||||||
horizontalRuleDecoration: BoxDecoration(
|
horizontalRuleDecoration: BoxDecoration(
|
||||||
border: Border(
|
border: Border(
|
||||||
top: BorderSide(
|
top: BorderSide(
|
||||||
width: 4,
|
width: 4,
|
||||||
color: theme.palette.grayBackground,
|
color: AntTheme.of(context).colorBox,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
@ -1,15 +1,14 @@
|
|||||||
|
import 'package:antd_mobile/antd_mobile.dart';
|
||||||
import 'package:flutter/widgets.dart';
|
import 'package:flutter/widgets.dart';
|
||||||
import 'package:git_touch/models/auth.dart';
|
import 'package:git_touch/models/auth.dart';
|
||||||
import 'package:git_touch/models/github.dart';
|
import 'package:git_touch/models/github.dart';
|
||||||
|
import 'package:git_touch/models/theme.dart';
|
||||||
import 'package:git_touch/utils/utils.dart';
|
import 'package:git_touch/utils/utils.dart';
|
||||||
import 'package:git_touch/widgets/issue_icon.dart';
|
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 'package:git_touch/models/theme.dart';
|
|
||||||
|
|
||||||
class NotificationItem extends StatefulWidget {
|
class NotificationItem extends StatefulWidget {
|
||||||
|
|
||||||
const NotificationItem({
|
const NotificationItem({
|
||||||
Key? key,
|
Key? key,
|
||||||
required this.payload,
|
required this.payload,
|
||||||
@ -68,8 +67,9 @@ class _NotificationItemState extends State<NotificationItem> {
|
|||||||
final theme = Provider.of<ThemeModel>(context);
|
final theme = Provider.of<ThemeModel>(context);
|
||||||
return Icon(
|
return Icon(
|
||||||
payload.unread! ? Ionicons.checkmark : Octicons.dot_fill,
|
payload.unread! ? Ionicons.checkmark : Octicons.dot_fill,
|
||||||
color:
|
color: loading
|
||||||
loading ? theme.palette.grayBackground : theme.palette.tertiaryText,
|
? AntTheme.of(context).colorBox
|
||||||
|
: AntTheme.of(context).colorWeak,
|
||||||
size: 24,
|
size: 24,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
@ -133,7 +133,8 @@ class _NotificationItemState extends State<NotificationItem> {
|
|||||||
child: Text(
|
child: Text(
|
||||||
payload.subject!.title!,
|
payload.subject!.title!,
|
||||||
overflow: TextOverflow.ellipsis,
|
overflow: TextOverflow.ellipsis,
|
||||||
style: TextStyle(fontSize: 15, color: theme.palette.text),
|
style: TextStyle(
|
||||||
|
fontSize: 15, color: AntTheme.of(context).colorText),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
LinkWidget(onTap: _markAsRead, child: _buildCheckIcon()),
|
LinkWidget(onTap: _markAsRead, child: _buildCheckIcon()),
|
||||||
|
@ -47,7 +47,7 @@ class ReleaseItem extends StatelessWidget {
|
|||||||
Text(
|
Text(
|
||||||
tagName!,
|
tagName!,
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
color: theme.palette.primary,
|
color: AntTheme.of(context).colorPrimary,
|
||||||
fontSize: 18,
|
fontSize: 18,
|
||||||
fontWeight: FontWeight.w600,
|
fontWeight: FontWeight.w600,
|
||||||
),
|
),
|
||||||
@ -57,7 +57,7 @@ class ReleaseItem extends StatelessWidget {
|
|||||||
const SizedBox(height: 6),
|
const SizedBox(height: 6),
|
||||||
DefaultTextStyle(
|
DefaultTextStyle(
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
color: theme.palette.secondaryText,
|
color: AntTheme.of(context).colorTextSecondary,
|
||||||
fontSize: 16,
|
fontSize: 16,
|
||||||
),
|
),
|
||||||
child: Text(
|
child: Text(
|
||||||
@ -74,13 +74,13 @@ class ReleaseItem extends StatelessWidget {
|
|||||||
const SizedBox(height: 10),
|
const SizedBox(height: 10),
|
||||||
],
|
],
|
||||||
Card(
|
Card(
|
||||||
color: theme.palette.grayBackground,
|
color: AntTheme.of(context).colorBox,
|
||||||
margin: const EdgeInsets.all(0),
|
margin: const EdgeInsets.all(0),
|
||||||
child: ExpansionTile(
|
child: ExpansionTile(
|
||||||
title: Text(
|
title: Text(
|
||||||
'Assets (${releaseAssets?.nodes?.length ?? 0})',
|
'Assets (${releaseAssets?.nodes?.length ?? 0})',
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
color: theme.palette.secondaryText,
|
color: AntTheme.of(context).colorTextSecondary,
|
||||||
fontSize: 18,
|
fontSize: 18,
|
||||||
fontWeight: FontWeight.w600,
|
fontWeight: FontWeight.w600,
|
||||||
),
|
),
|
||||||
@ -101,7 +101,7 @@ class ReleaseItem extends StatelessWidget {
|
|||||||
child: Text(
|
child: Text(
|
||||||
asset.name,
|
asset.name,
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
color: theme.palette.primary,
|
color: AntTheme.of(context).colorPrimary,
|
||||||
fontSize: 14,
|
fontSize: 14,
|
||||||
fontWeight: FontWeight.w400,
|
fontWeight: FontWeight.w400,
|
||||||
),
|
),
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
|
import 'package:antd_mobile/antd_mobile.dart';
|
||||||
import 'package:flutter/widgets.dart';
|
import 'package:flutter/widgets.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';
|
||||||
@ -47,7 +48,7 @@ class RepoHeader extends StatelessWidget {
|
|||||||
'$owner / $name',
|
'$owner / $name',
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
fontSize: 20,
|
fontSize: 20,
|
||||||
color: theme.palette.primary,
|
color: AntTheme.of(context).colorPrimary,
|
||||||
),
|
),
|
||||||
overflow: TextOverflow.visible,
|
overflow: TextOverflow.visible,
|
||||||
),
|
),
|
||||||
@ -59,7 +60,7 @@ class RepoHeader extends StatelessWidget {
|
|||||||
Text(
|
Text(
|
||||||
description!,
|
description!,
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
color: theme.palette.secondaryText,
|
color: AntTheme.of(context).colorTextSecondary,
|
||||||
fontSize: 17,
|
fontSize: 17,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
@ -69,7 +70,7 @@ class RepoHeader extends StatelessWidget {
|
|||||||
child: Text(
|
child: Text(
|
||||||
homepageUrl!,
|
homepageUrl!,
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
color: theme.palette.primary,
|
color: AntTheme.of(context).colorPrimary,
|
||||||
fontSize: 17,
|
fontSize: 17,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
@ -165,14 +165,14 @@ class RepositoryItem extends StatelessWidget {
|
|||||||
text: '$owner / ',
|
text: '$owner / ',
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
fontSize: 18,
|
fontSize: 18,
|
||||||
color: theme.palette.primary,
|
color: AntTheme.of(context).colorPrimary,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
TextSpan(
|
TextSpan(
|
||||||
text: name,
|
text: name,
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
fontSize: 18,
|
fontSize: 18,
|
||||||
color: theme.palette.primary,
|
color: AntTheme.of(context).colorPrimary,
|
||||||
fontWeight: FontWeight.w600,
|
fontWeight: FontWeight.w600,
|
||||||
),
|
),
|
||||||
// overflow: TextOverflow.ellipsis,
|
// overflow: TextOverflow.ellipsis,
|
||||||
@ -184,9 +184,10 @@ class RepositoryItem extends StatelessWidget {
|
|||||||
if (iconData != null) ...[
|
if (iconData != null) ...[
|
||||||
const SizedBox(width: 6),
|
const SizedBox(width: 6),
|
||||||
DefaultTextStyle(
|
DefaultTextStyle(
|
||||||
style: TextStyle(color: theme.palette.secondaryText),
|
style:
|
||||||
|
TextStyle(color: AntTheme.of(context).colorTextSecondary),
|
||||||
child: Icon(iconData,
|
child: Icon(iconData,
|
||||||
size: 18, color: theme.palette.secondaryText),
|
size: 18, color: AntTheme.of(context).colorTextSecondary),
|
||||||
),
|
),
|
||||||
]
|
]
|
||||||
],
|
],
|
||||||
@ -196,7 +197,7 @@ class RepositoryItem extends StatelessWidget {
|
|||||||
Text(
|
Text(
|
||||||
description!,
|
description!,
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
color: theme.palette.secondaryText,
|
color: AntTheme.of(context).colorTextSecondary,
|
||||||
fontSize: 16,
|
fontSize: 16,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
@ -207,13 +208,14 @@ class RepositoryItem extends StatelessWidget {
|
|||||||
note!,
|
note!,
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
fontSize: 14,
|
fontSize: 14,
|
||||||
color: theme.palette.tertiaryText,
|
color: AntTheme.of(context).colorWeak,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
const SizedBox(height: 10),
|
const SizedBox(height: 10),
|
||||||
],
|
],
|
||||||
DefaultTextStyle(
|
DefaultTextStyle(
|
||||||
style: TextStyle(color: theme.palette.text, fontSize: 14),
|
style:
|
||||||
|
TextStyle(color: AntTheme.of(context).colorText, fontSize: 14),
|
||||||
child: Row(
|
child: Row(
|
||||||
children: <Widget>[
|
children: <Widget>[
|
||||||
if (primaryLanguageName != null) ...[
|
if (primaryLanguageName != null) ...[
|
||||||
@ -234,14 +236,15 @@ class RepositoryItem extends StatelessWidget {
|
|||||||
const SizedBox(width: 24),
|
const SizedBox(width: 24),
|
||||||
],
|
],
|
||||||
if (starCount! > 0) ...[
|
if (starCount! > 0) ...[
|
||||||
Icon(Octicons.star, size: 16, color: theme.palette.text),
|
Icon(Octicons.star,
|
||||||
|
size: 16, color: AntTheme.of(context).colorText),
|
||||||
const SizedBox(width: 2),
|
const SizedBox(width: 2),
|
||||||
Text(numberFormat.format(starCount)),
|
Text(numberFormat.format(starCount)),
|
||||||
const SizedBox(width: 24),
|
const SizedBox(width: 24),
|
||||||
],
|
],
|
||||||
if (forkCount! > 0) ...[
|
if (forkCount! > 0) ...[
|
||||||
Icon(Octicons.repo_forked,
|
Icon(Octicons.repo_forked,
|
||||||
size: 16, color: theme.palette.text),
|
size: 16, color: AntTheme.of(context).colorText),
|
||||||
const SizedBox(width: 2),
|
const SizedBox(width: 2),
|
||||||
Text(numberFormat.format(forkCount)),
|
Text(numberFormat.format(forkCount)),
|
||||||
],
|
],
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
|
import 'package:antd_mobile/antd_mobile.dart';
|
||||||
import 'package:flutter/cupertino.dart';
|
import 'package:flutter/cupertino.dart';
|
||||||
import 'package:git_touch/models/theme.dart';
|
import 'package:git_touch/models/theme.dart';
|
||||||
import 'package:provider/provider.dart';
|
import 'package:provider/provider.dart';
|
||||||
@ -14,7 +15,7 @@ class MyTextField extends StatelessWidget {
|
|||||||
return CupertinoTextField(
|
return CupertinoTextField(
|
||||||
controller: controller,
|
controller: controller,
|
||||||
placeholder: placeholder,
|
placeholder: placeholder,
|
||||||
style: TextStyle(color: theme.palette.text),
|
style: TextStyle(color: AntTheme.of(context).colorText),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -40,7 +40,8 @@ class TimelineEventItem extends StatelessWidget {
|
|||||||
Expanded(
|
Expanded(
|
||||||
child: Text.rich(
|
child: Text.rich(
|
||||||
TextSpan(
|
TextSpan(
|
||||||
style: TextStyle(color: theme.palette.text, fontSize: 16),
|
style: TextStyle(
|
||||||
|
color: AntTheme.of(context).colorText, fontSize: 16),
|
||||||
children: [
|
children: [
|
||||||
// TODO: actor is null
|
// TODO: actor is null
|
||||||
createUserSpan(context, actor),
|
createUserSpan(context, actor),
|
||||||
@ -415,12 +416,12 @@ class TimelineItem extends StatelessWidget {
|
|||||||
' ${AppLocalizations.of(context)!.headRefForcedPushedEventSecondMessage} '),
|
' ${AppLocalizations.of(context)!.headRefForcedPushedEventSecondMessage} '),
|
||||||
TextSpan(
|
TextSpan(
|
||||||
text: p.beforeCommit!.oid.substring(0, 7),
|
text: p.beforeCommit!.oid.substring(0, 7),
|
||||||
style: TextStyle(color: theme.palette.primary),
|
style: TextStyle(color: AntTheme.of(context).colorPrimary),
|
||||||
),
|
),
|
||||||
TextSpan(text: ' ${AppLocalizations.of(context)!.to} '),
|
TextSpan(text: ' ${AppLocalizations.of(context)!.to} '),
|
||||||
TextSpan(
|
TextSpan(
|
||||||
text: p.afterCommit!.oid.substring(0, 7),
|
text: p.afterCommit!.oid.substring(0, 7),
|
||||||
style: TextStyle(color: theme.palette.primary),
|
style: TextStyle(color: AntTheme.of(context).colorPrimary),
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
@ -441,12 +442,12 @@ class TimelineItem extends StatelessWidget {
|
|||||||
' ${AppLocalizations.of(context)!.headRefForcedPushedEventSecondMessage} '),
|
' ${AppLocalizations.of(context)!.headRefForcedPushedEventSecondMessage} '),
|
||||||
TextSpan(
|
TextSpan(
|
||||||
text: p.beforeCommit!.oid.substring(0, 7),
|
text: p.beforeCommit!.oid.substring(0, 7),
|
||||||
style: TextStyle(color: theme.palette.primary),
|
style: TextStyle(color: AntTheme.of(context).colorPrimary),
|
||||||
),
|
),
|
||||||
TextSpan(text: ' ${AppLocalizations.of(context)!.to} '),
|
TextSpan(text: ' ${AppLocalizations.of(context)!.to} '),
|
||||||
TextSpan(
|
TextSpan(
|
||||||
text: p.afterCommit!.oid.substring(0, 7),
|
text: p.afterCommit!.oid.substring(0, 7),
|
||||||
style: TextStyle(color: theme.palette.primary),
|
style: TextStyle(color: AntTheme.of(context).colorPrimary),
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
|
import 'package:antd_mobile/antd_mobile.dart';
|
||||||
import 'package:flutter/widgets.dart';
|
import 'package:flutter/widgets.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';
|
||||||
@ -57,7 +58,7 @@ class UserHeader extends StatelessWidget {
|
|||||||
Text(
|
Text(
|
||||||
name!,
|
name!,
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
color: theme.palette.text,
|
color: AntTheme.of(context).colorText,
|
||||||
fontSize: 20,
|
fontSize: 20,
|
||||||
fontWeight: FontWeight.w600,
|
fontWeight: FontWeight.w600,
|
||||||
),
|
),
|
||||||
@ -67,7 +68,7 @@ class UserHeader extends StatelessWidget {
|
|||||||
Text(
|
Text(
|
||||||
login!,
|
login!,
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
color: theme.palette.primary,
|
color: AntTheme.of(context).colorPrimary,
|
||||||
fontSize: 18,
|
fontSize: 18,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
@ -78,13 +79,13 @@ class UserHeader extends StatelessWidget {
|
|||||||
Icon(
|
Icon(
|
||||||
Octicons.clock,
|
Octicons.clock,
|
||||||
size: 16,
|
size: 16,
|
||||||
color: theme.palette.tertiaryText,
|
color: AntTheme.of(context).colorWeak,
|
||||||
),
|
),
|
||||||
const SizedBox(width: 4),
|
const SizedBox(width: 4),
|
||||||
Text(
|
Text(
|
||||||
'Joined on ${dateFormat.format(createdAt!)}',
|
'Joined on ${dateFormat.format(createdAt!)}',
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
color: theme.palette.tertiaryText,
|
color: AntTheme.of(context).colorWeak,
|
||||||
fontSize: 16,
|
fontSize: 16,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
@ -95,7 +96,7 @@ class UserHeader extends StatelessWidget {
|
|||||||
Text(
|
Text(
|
||||||
bio!,
|
bio!,
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
color: theme.palette.secondaryText,
|
color: AntTheme.of(context).colorTextSecondary,
|
||||||
fontSize: 17,
|
fontSize: 17,
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
|
@ -28,7 +28,7 @@ class GhBioWidget extends StatelessWidget {
|
|||||||
Icon(
|
Icon(
|
||||||
Octicons.location,
|
Octicons.location,
|
||||||
size: 15,
|
size: 15,
|
||||||
color: theme.palette.secondaryText,
|
color: AntTheme.of(context).colorTextSecondary,
|
||||||
),
|
),
|
||||||
const SizedBox(width: 4),
|
const SizedBox(width: 4),
|
||||||
Expanded(child: Text(location!, overflow: TextOverflow.ellipsis)),
|
Expanded(child: Text(location!, overflow: TextOverflow.ellipsis)),
|
||||||
@ -40,7 +40,7 @@ class GhBioWidget extends StatelessWidget {
|
|||||||
Icon(
|
Icon(
|
||||||
Octicons.clock,
|
Octicons.clock,
|
||||||
size: 15,
|
size: 15,
|
||||||
color: theme.palette.secondaryText,
|
color: AntTheme.of(context).colorTextSecondary,
|
||||||
),
|
),
|
||||||
const SizedBox(width: 4),
|
const SizedBox(width: 4),
|
||||||
Expanded(
|
Expanded(
|
||||||
@ -146,7 +146,7 @@ class UserItem extends StatelessWidget {
|
|||||||
Text(
|
Text(
|
||||||
name!,
|
name!,
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
color: theme.palette.text,
|
color: AntTheme.of(context).colorText,
|
||||||
fontSize: 18,
|
fontSize: 18,
|
||||||
fontWeight: FontWeight.w500,
|
fontWeight: FontWeight.w500,
|
||||||
),
|
),
|
||||||
@ -157,7 +157,7 @@ class UserItem extends StatelessWidget {
|
|||||||
child: Text(
|
child: Text(
|
||||||
login!,
|
login!,
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
color: theme.palette.text,
|
color: AntTheme.of(context).colorText,
|
||||||
fontSize: 16,
|
fontSize: 16,
|
||||||
),
|
),
|
||||||
overflow: TextOverflow.ellipsis,
|
overflow: TextOverflow.ellipsis,
|
||||||
@ -169,7 +169,7 @@ class UserItem extends StatelessWidget {
|
|||||||
if (bio != null)
|
if (bio != null)
|
||||||
DefaultTextStyle(
|
DefaultTextStyle(
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
color: theme.palette.secondaryText,
|
color: AntTheme.of(context).colorTextSecondary,
|
||||||
fontSize: 16,
|
fontSize: 16,
|
||||||
),
|
),
|
||||||
child: bio!,
|
child: bio!,
|
||||||
|
@ -1,10 +1,10 @@
|
|||||||
|
import 'package:antd_mobile/antd_mobile.dart';
|
||||||
import 'package:flutter/widgets.dart';
|
import 'package:flutter/widgets.dart';
|
||||||
import 'package:git_touch/models/theme.dart';
|
import 'package:git_touch/models/theme.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';
|
||||||
|
|
||||||
class UserName extends StatelessWidget {
|
class UserName extends StatelessWidget {
|
||||||
|
|
||||||
const UserName(this.login, this.prefix);
|
const UserName(this.login, this.prefix);
|
||||||
final String? login;
|
final String? login;
|
||||||
final String prefix;
|
final String prefix;
|
||||||
@ -23,7 +23,7 @@ class UserName extends StatelessWidget {
|
|||||||
login!,
|
login!,
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
fontWeight: FontWeight.w600,
|
fontWeight: FontWeight.w600,
|
||||||
color: theme.palette.primary,
|
color: AntTheme.of(context).colorPrimary,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
Loading…
x
Reference in New Issue
Block a user