1
0
mirror of https://github.com/git-touch/git-touch synced 2024-12-20 20:13:55 +01:00
git-touch-android-ios-app/lib/widgets/entry_item.dart

50 lines
1.3 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 WidgetBuilder screenBuilder;
final String url;
2019-02-04 14:38:29 +01:00
EntryItem({this.count, this.text, this.screenBuilder, 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(
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,
color: theme.palette.text,
),
2019-09-13 09:55:58 +02:00
),
Text(
text,
style: TextStyle(
fontSize: 12,
2019-11-05 14:22:41 +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
],
),
),
screenBuilder: screenBuilder,
url: url,
2019-02-04 14:38:29 +01:00
),
);
}
}