App móvil Flutter para capturar contenido multimedia, etiquetarlo con hashes y enviarlo a backends configurables. Features: - Captura de fotos, audio, video y archivos - Sistema de etiquetas con bibliotecas externas (HST) - Packs de etiquetas predefinidos - Cola de reintentos (hasta 20 contenedores) - Soporte GPS - Hash SHA-256 auto-generado por contenedor - Persistencia SQLite local - Múltiples destinos configurables Stack: Flutter 3.38.5, flutter_bloc, sqflite, dio 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
50 lines
1.3 KiB
Dart
50 lines
1.3 KiB
Dart
class Etiqueta {
|
|
final String hMaestro;
|
|
final String hGlobal;
|
|
final String? mrf;
|
|
final String? ref;
|
|
final String? nombreEs;
|
|
final String? nombreEn;
|
|
final String grupo;
|
|
final bool activo;
|
|
final int? bibliotecaId;
|
|
|
|
Etiqueta({
|
|
required this.hMaestro,
|
|
required this.hGlobal,
|
|
this.mrf,
|
|
this.ref,
|
|
this.nombreEs,
|
|
this.nombreEn,
|
|
required this.grupo,
|
|
this.activo = true,
|
|
this.bibliotecaId,
|
|
});
|
|
|
|
String get displayName => nombreEs ?? nombreEn ?? ref ?? hMaestro.substring(0, 8);
|
|
|
|
String? get imagenUrl => mrf != null ? 'https://tzrtech.org/$mrf.png' : null;
|
|
|
|
factory Etiqueta.fromJson(Map<String, dynamic> json) => Etiqueta(
|
|
hMaestro: json['h_maestro'] as String,
|
|
hGlobal: json['h_global'] as String,
|
|
mrf: json['mrf'] as String?,
|
|
ref: json['ref'] as String?,
|
|
nombreEs: json['nombre_es'] as String?,
|
|
nombreEn: json['nombre_en'] as String?,
|
|
grupo: json['grupo'] as String? ?? 'default',
|
|
activo: json['activo'] as bool? ?? true,
|
|
);
|
|
|
|
Map<String, dynamic> toMap() => {
|
|
'h_maestro': hMaestro,
|
|
'h_global': hGlobal,
|
|
'mrf': mrf,
|
|
'ref': ref,
|
|
'nombre_es': nombreEs,
|
|
'nombre_en': nombreEn,
|
|
'grupo': grupo,
|
|
'biblioteca_id': bibliotecaId,
|
|
};
|
|
}
|