feat: commit inicial — Central Monitoreo v1.0.0
- OperadorLoginPage con auth WebControl 2 pasos (empresas → login) - ShellPage: sidebar 220px + IndexedStack + header con estado API - DashboardPage: stat cards, feed alarmas, clientes, incidentes (timer 30s) - ApiAuthService: flujo real con email + paswd + dba → token + apiKey - DB SQLite v1: 7 tablas + 7 DAOs completos - theme.dart: AppColors, appHeadline (Manrope), appLabel (Inter) - Logo app: escudo radar neón (SVG + PNG 512px) en lib/recursos/ - desplegar.sh: build release Linux + upload a siax-system.net - agents.md: estado completo + objetivos futuros documentados Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,21 @@
|
||||
import 'package:sqflite/sqflite.dart';
|
||||
import '../database_helper.dart';
|
||||
|
||||
class ConfiguracionDao {
|
||||
final _db = DatabaseHelper.instance;
|
||||
|
||||
Future<String?> get(String clave) async {
|
||||
final db = await _db.db;
|
||||
final rows = await db.query('configuracion', where: 'clave = ?', whereArgs: [clave]);
|
||||
return rows.isEmpty ? null : rows.first['valor'] as String?;
|
||||
}
|
||||
|
||||
Future<void> set(String clave, String valor) async {
|
||||
final db = await _db.db;
|
||||
await db.insert(
|
||||
'configuracion',
|
||||
{'clave': clave, 'valor': valor},
|
||||
conflictAlgorithm: ConflictAlgorithm.replace,
|
||||
);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user