Import/Export
This commit is contained in:
@@ -64,10 +64,10 @@ class _SplashState extends ConsumerState<SplashScreen>
|
||||
return Scaffold(
|
||||
body: FadeTransition(
|
||||
opacity: t,
|
||||
child: Center(
|
||||
child: const Center(
|
||||
child: Column(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
children: const [
|
||||
children: [
|
||||
Icon(Icons.pets, size: 96),
|
||||
SizedBox(height: 12),
|
||||
CircularProgressIndicator(),
|
||||
|
||||
@@ -39,7 +39,7 @@ class IgelExportService {
|
||||
// Immer frisch laden
|
||||
final igelList = await igelRepo.list();
|
||||
|
||||
final sep = ';';
|
||||
const sep = ';';
|
||||
final sb = StringBuffer();
|
||||
|
||||
// Kopfzeile – nur Felder, die deine Models wirklich haben
|
||||
|
||||
@@ -19,7 +19,7 @@ class IgelRepository {
|
||||
DateTime? rescuedAt,
|
||||
String? location}) async {
|
||||
String? fmtDate(DateTime? d) =>
|
||||
d == null ? null : d.toIso8601String().split('T').first;
|
||||
d?.toIso8601String().split('T').first;
|
||||
final res = await api.post<dynamic>('/igel', {
|
||||
'name': name,
|
||||
'note': note,
|
||||
@@ -53,7 +53,7 @@ class IgelRepository {
|
||||
DateTime? rescuedAt,
|
||||
String? location}) async {
|
||||
String? fmtDate(DateTime? d) =>
|
||||
d == null ? null : d.toIso8601String().split('T').first;
|
||||
d?.toIso8601String().split('T').first;
|
||||
final body = {
|
||||
'name': name,
|
||||
'note': note,
|
||||
|
||||
@@ -49,7 +49,7 @@ class Igel {
|
||||
|
||||
Map<String, dynamic> toMapForCreateUpdate() {
|
||||
String? fmtDate(DateTime? d) =>
|
||||
d == null ? null : d.toIso8601String().split('T').first;
|
||||
d?.toIso8601String().split('T').first;
|
||||
|
||||
return {
|
||||
'name': name,
|
||||
|
||||
@@ -463,7 +463,7 @@ class _IgelDetailState extends ConsumerState<IgelDetailScreen> {
|
||||
// Sicherheits-Reload der Messwerte, damit CSV aktuell ist
|
||||
final mw = await messRepo.list(widget.igelId);
|
||||
|
||||
final sep = ';';
|
||||
const sep = ';';
|
||||
final sb = StringBuffer();
|
||||
|
||||
sb.writeln([
|
||||
@@ -1384,7 +1384,7 @@ class _IgelDetailState extends ConsumerState<IgelDetailScreen> {
|
||||
Text(
|
||||
_uploadTotal <= 1
|
||||
? 'Lade Bild hoch …'
|
||||
: 'Lade Bilder hoch (${_uploadDone}/${_uploadTotal}) …',
|
||||
: 'Lade Bilder hoch ($_uploadDone/$_uploadTotal) …',
|
||||
style: const TextStyle(color: Colors.white, fontSize: 16),
|
||||
),
|
||||
],
|
||||
@@ -1592,10 +1592,10 @@ class _WeightChartPainter extends CustomPainter {
|
||||
|
||||
@override
|
||||
void paint(Canvas canvas, Size size) {
|
||||
final paddingLeft = 44.0; // Platz für Y-Labels
|
||||
final paddingBottom = 28.0; // Platz für X-Labels
|
||||
final paddingTop = 8.0;
|
||||
final paddingRight = 12.0;
|
||||
const paddingLeft = 44.0; // Platz für Y-Labels
|
||||
const paddingBottom = 28.0; // Platz für X-Labels
|
||||
const paddingTop = 8.0;
|
||||
const paddingRight = 12.0;
|
||||
|
||||
final area = Rect.fromLTWH(
|
||||
paddingLeft,
|
||||
@@ -1631,7 +1631,7 @@ class _WeightChartPainter extends CustomPainter {
|
||||
final spanG = (maxG - minG).toDouble();
|
||||
|
||||
// Y-Ticks (5)
|
||||
final yTicks = 4;
|
||||
const yTicks = 4;
|
||||
for (var i = 0; i <= yTicks; i++) {
|
||||
final ty = i / yTicks;
|
||||
final y = area.bottom - ty * area.height;
|
||||
@@ -1643,7 +1643,7 @@ class _WeightChartPainter extends CustomPainter {
|
||||
);
|
||||
// Label
|
||||
final gVal = (minG + ty * spanG).round();
|
||||
_drawText(canvas, '${gVal} g', Offset(area.left - 6, y),
|
||||
_drawText(canvas, '$gVal g', Offset(area.left - 6, y),
|
||||
align: TextAlign.right, anchor: const Offset(1, 0.5));
|
||||
}
|
||||
|
||||
|
||||
@@ -178,7 +178,7 @@ class _IgelListState extends ConsumerState<IgelListScreen> {
|
||||
|
||||
// Header
|
||||
final sb = StringBuffer();
|
||||
final sep = ';';
|
||||
const sep = ';';
|
||||
sb.writeln([
|
||||
// Igel-Stammdaten
|
||||
'igel_id',
|
||||
|
||||
Reference in New Issue
Block a user