ente/lib/ui/notification/update/change_log_entry.dart

53 lines
1.2 KiB
Dart
Raw Normal View History

2022-11-09 05:59:05 +00:00
import 'package:flutter/widgets.dart';
import 'package:photos/theme/ente_theme.dart';
2022-11-09 08:06:10 +00:00
class ChangeLogEntry {
2022-11-09 05:59:05 +00:00
final bool isFeature;
final String title;
final String description;
2022-11-09 08:06:10 +00:00
ChangeLogEntry(this.title, this.description, {this.isFeature = true});
}
class ChangeLogEntryWidget extends StatelessWidget {
final ChangeLogEntry entry;
const ChangeLogEntryWidget({
2022-11-09 05:59:05 +00:00
super.key,
2022-11-09 08:06:10 +00:00
required this.entry,
2022-11-09 05:59:05 +00:00
});
@override
Widget build(BuildContext context) {
final enteTheme = getEnteTextTheme(context);
final colorScheme = getEnteColorScheme(context);
return Column(
2022-11-09 08:06:10 +00:00
crossAxisAlignment: CrossAxisAlignment.start,
2022-11-09 05:59:05 +00:00
children: [
Text(
2022-11-09 08:06:10 +00:00
entry.title,
textAlign: TextAlign.left,
2022-11-09 05:59:05 +00:00
style: enteTheme.largeBold.copyWith(
2022-11-09 08:06:10 +00:00
color: entry.isFeature
? colorScheme.primary700
: colorScheme.textMuted,
2022-11-09 05:59:05 +00:00
),
),
const SizedBox(
height: 18,
),
Text(
2022-11-09 08:06:10 +00:00
entry.description,
textAlign: TextAlign.left,
2022-11-09 05:59:05 +00:00
style: enteTheme.body.copyWith(
color: colorScheme.textMuted,
),
),
const SizedBox(
height: 18,
),
],
);
}
}