refactored settings & added content blocking

This commit is contained in:
Fabian Freund
2024-06-19 21:09:54 +02:00
parent 2bacbbffd2
commit d3e30613c9
11 changed files with 385 additions and 215 deletions
@@ -0,0 +1,36 @@
import 'package:flutter/material.dart';
import 'package:google_fonts/google_fonts.dart';
import 'package:timeago/timeago.dart' as timeago;
class SyncDetailsTable extends StatelessWidget {
final int? count;
final DateTime? lastSync;
const SyncDetailsTable(this.count, this.lastSync);
@override
Widget build(BuildContext context) {
return DefaultTextStyle(
style: GoogleFonts.robotoMono(),
child: Table(
columnWidths: const {0: FixedColumnWidth(100)},
children: [
TableRow(
children: [
const Text('Entries'),
Text(count?.toString() ?? 'N/A'),
],
),
TableRow(
children: [
const Text('Last Sync'),
Text(
(lastSync != null) ? timeago.format(lastSync!) : 'N/A',
),
],
),
],
),
);
}
}