git-touch-android-ios-app/lib/widgets/user_name.dart

33 lines
823 B
Dart
Raw Normal View History

import 'package:flutter/material.dart';
2020-01-26 16:47:50 +01:00
import 'package:git_touch/models/theme.dart';
2019-12-12 13:29:56 +01:00
import 'package:git_touch/widgets/link.dart';
2020-01-26 16:47:50 +01:00
import 'package:provider/provider.dart';
class UserName extends StatelessWidget {
2021-05-16 09:16:35 +02:00
final String? login;
final String prefix;
UserName(this.login, this.prefix);
@override
Widget build(BuildContext context) {
2020-01-26 16:47:50 +01:00
final theme = Provider.of<ThemeModel>(context);
2021-05-16 09:16:35 +02:00
return LinkWidget(
url: '/$prefix/$login',
2019-01-31 07:37:25 +01:00
child: Container(
// padding: EdgeInsets.all(2),
2019-01-31 07:37:25 +01:00
decoration: BoxDecoration(
borderRadius: BorderRadius.all(Radius.circular(4)),
),
2020-01-26 16:47:50 +01:00
child: Text(
2021-05-16 09:16:35 +02:00
login!,
2020-01-26 16:47:50 +01:00
style: TextStyle(
fontWeight: FontWeight.w600,
2020-01-27 08:11:51 +01:00
color: theme.palette.primary,
2020-01-26 16:47:50 +01:00
),
),
),
);
}
}