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

48 lines
1.2 KiB
Dart
Raw Normal View History

2022-09-24 20:46:37 +02:00
import 'package:antd_mobile/antd_mobile.dart';
2019-02-04 14:38:29 +01:00
import 'package:flutter/cupertino.dart';
import 'package:git_touch/utils/utils.dart';
import 'package:git_touch/widgets/link.dart';
2019-02-04 14:38:29 +01:00
class EntryItem extends StatelessWidget {
2022-09-06 18:28:12 +02:00
const EntryItem({
2021-05-16 09:16:35 +02:00
required this.text,
2020-10-05 12:26:43 +02:00
this.count,
this.url,
});
2022-09-21 18:28:21 +02:00
final int? count;
final String text;
final String? url;
2019-02-04 14:38:29 +01:00
@override
Widget build(BuildContext context) {
return Expanded(
2021-05-16 09:16:35 +02:00
child: LinkWidget(
2019-12-13 06:40:05 +01:00
url: url,
2019-02-04 14:38:29 +01:00
child: Container(
2022-09-06 18:28:12 +02:00
padding: const EdgeInsets.symmetric(vertical: 14),
2019-02-04 14:38:29 +01:00
child: Column(
children: <Widget>[
2019-09-13 09:55:58 +02:00
Text(
2020-10-05 12:26:43 +02:00
count == null ? '?' : numberFormat.format(count),
2019-11-05 14:22:41 +01:00
style: TextStyle(
fontSize: 17,
fontWeight: FontWeight.w600,
2022-09-24 20:46:37 +02:00
color: AntTheme.of(context).colorText,
2019-11-05 14:22:41 +01:00
),
2019-09-13 09:55:58 +02:00
),
Text(
text,
style: TextStyle(
2019-12-21 09:16:17 +01:00
fontSize: 14,
2022-09-24 20:46:37 +02:00
color: AntTheme.of(context).colorTextSecondary,
2019-09-13 09:55:58 +02:00
fontWeight: FontWeight.w500,
),
)
2019-02-04 14:38:29 +01:00
],
),
),
),
);
}
}