1
0
mirror of https://github.com/git-touch/git-touch synced 2024-12-19 11:43:30 +01:00

fix: user name color

This commit is contained in:
Rongjian Zhang 2020-01-26 23:47:50 +08:00
parent 798bb42509
commit 46ecf2ff4a

View File

@ -1,7 +1,7 @@
import 'package:flutter/material.dart';
import 'package:git_touch/models/theme.dart';
import 'package:git_touch/widgets/link.dart';
final style = TextStyle(fontWeight: FontWeight.w600);
import 'package:provider/provider.dart';
class UserName extends StatelessWidget {
final String login;
@ -10,6 +10,7 @@ class UserName extends StatelessWidget {
@override
Widget build(BuildContext context) {
final theme = Provider.of<ThemeModel>(context);
return Link(
url: '/$login',
child: Container(
@ -17,7 +18,13 @@ class UserName extends StatelessWidget {
decoration: BoxDecoration(
borderRadius: BorderRadius.all(Radius.circular(4)),
),
child: Text(login, style: style),
child: Text(
login,
style: TextStyle(
fontWeight: FontWeight.w600,
color: theme.paletteOf(context).primary,
),
),
),
);
}