Skip to content

Commit

Permalink
Store local db on home dir
Browse files Browse the repository at this point in the history
  • Loading branch information
sukso96100 committed Jul 3, 2023
1 parent 0f7e21b commit 7a00ea4
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import 'dart:typed_data';
import 'dart:typed_data';
import 'dart:ui' as ui;
import 'dart:io';
import 'dart:io' show Platform;
import 'dart:ffi';

import 'package:flutter/material.dart';
Expand Down Expand Up @@ -64,12 +65,14 @@ class _KioskMainPageState extends State<KioskMainPage> {
@override
void initState() {
super.initState();
Map<String, String> envVars = Platform.environment;
var timer = Timer.periodic(Duration(milliseconds: 1), (timer) {
_getQrCodeContentFromCamera();
});
setState(() {
_timer = timer;
db = sqlite3lib.sqlite3.open("~/.ubuntu-kr-qr-kiosk/check_in_db.db");
db = sqlite3lib.sqlite3
.open("$envVars['HOME']/ubuntu_kr_qr_kiosk_check_in_db.db");
});
createTable(db);
QuickUsb.init().whenComplete(() => print("QuickUsb Init"));
Expand Down

0 comments on commit 7a00ea4

Please sign in to comment.