SimpleCloudNotifier/flutter/lib/pages/debug/debug_persistence_hiveentry.dart

32 lines
1.1 KiB
Dart
Raw Permalink Normal View History

2024-05-26 00:20:25 +02:00
import 'package:flutter/material.dart';
import 'package:simplecloudnotifier/components/layout/scaffold.dart';
import 'package:simplecloudnotifier/state/interfaces.dart';
class DebugHiveEntryPage extends StatelessWidget {
final FieldDebuggable value;
final List<(String, String)> fields;
DebugHiveEntryPage({required this.value}) : fields = value.debugFieldList();
@override
Widget build(BuildContext context) {
return SCNScaffold(
title: 'HiveEntry',
showSearch: false,
child: ListView.separated(
itemCount: fields.length,
itemBuilder: (context, listIndex) {
return ListTile(
2024-06-15 21:29:51 +02:00
dense: true,
contentPadding: EdgeInsets.fromLTRB(8, 0, 8, 0),
visualDensity: VisualDensity(horizontal: 0, vertical: -4),
2024-05-26 00:20:25 +02:00
title: Text(fields[listIndex].$1, style: TextStyle(fontWeight: FontWeight.bold)),
subtitle: Text(fields[listIndex].$2, style: TextStyle(fontFamily: "monospace")),
);
},
separatorBuilder: (context, index) => Divider(),
),
);
}
}