2022-09-24 20:46:37 +02:00
|
|
|
import 'package:antd_mobile/antd_mobile.dart';
|
2022-09-17 14:35:45 +02:00
|
|
|
import 'package:flutter/widgets.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';
|
2019-01-27 17:37:44 +01:00
|
|
|
|
|
|
|
class UserName extends StatelessWidget {
|
2022-09-06 18:28:12 +02:00
|
|
|
const UserName(this.login, this.prefix);
|
2022-09-21 18:28:21 +02:00
|
|
|
final String? login;
|
|
|
|
final String prefix;
|
2019-01-27 17:37:44 +01:00
|
|
|
|
|
|
|
@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(
|
2021-01-06 05:52:58 +01:00
|
|
|
url: '/$prefix/$login',
|
2019-01-31 07:37:25 +01:00
|
|
|
child: Container(
|
2019-02-09 08:33:06 +01:00
|
|
|
// padding: EdgeInsets.all(2),
|
2022-09-06 18:28:12 +02:00
|
|
|
decoration: const BoxDecoration(
|
2019-01-31 07:37:25 +01:00
|
|
|
borderRadius: BorderRadius.all(Radius.circular(4)),
|
2019-01-27 17:37:44 +01:00
|
|
|
),
|
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,
|
2022-09-24 20:46:37 +02:00
|
|
|
color: AntTheme.of(context).colorPrimary,
|
2020-01-26 16:47:50 +01:00
|
|
|
),
|
|
|
|
),
|
2019-01-27 17:37:44 +01:00
|
|
|
),
|
|
|
|
);
|
|
|
|
}
|
|
|
|
}
|