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

52 lines
1.2 KiB
Dart
Raw Normal View History

2019-02-04 14:38:29 +01:00
import 'package:flutter/cupertino.dart';
2019-11-05 14:22:41 +01:00
import 'package:git_touch/models/theme.dart';
import 'package:git_touch/utils/utils.dart';
2019-11-05 14:22:41 +01:00
import 'package:provider/provider.dart';
2019-02-04 14:38:29 +01:00
import 'link.dart';
class EntryItem extends StatelessWidget {
final int count;
final String text;
final String url;
2019-02-04 14:38:29 +01:00
EntryItem({
@required this.count,
@required this.text,
this.url,
});
2019-02-04 14:38:29 +01:00
@override
Widget build(BuildContext context) {
2019-11-05 14:22:41 +01:00
final theme = Provider.of<ThemeModel>(context);
2019-02-04 14:38:29 +01:00
return Expanded(
child: Link(
2019-12-13 06:40:05 +01:00
url: url,
2019-02-04 14:38:29 +01:00
child: Container(
2019-09-13 09:55:58 +02:00
padding: 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(
numberFormat.format(count),
2019-11-05 14:22:41 +01:00
style: TextStyle(
fontSize: 17,
fontWeight: FontWeight.w600,
2020-01-27 08:11:51 +01:00
color: theme.palette.text,
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,
2020-01-27 08:11:51 +01:00
color: theme.palette.secondaryText,
2019-09-13 09:55:58 +02:00
fontWeight: FontWeight.w500,
),
)
2019-02-04 14:38:29 +01:00
],
),
),
),
);
}
}