Move testing to be a global variable and use it to control the debug output.

This commit is contained in:
2025-03-07 12:47:40 -07:00
parent 029ee8e9a8
commit a5e10e26cc
3 changed files with 16 additions and 14 deletions
+2 -2
View File
@@ -2,6 +2,7 @@
import 'package:flutter/material.dart';
// Local
import '/globals.dart';
import '/pages/home.dart';
// SQLite
@@ -10,8 +11,6 @@ import 'package:sqflite_common_ffi/sqflite_ffi.dart';
import 'package:path/path.dart';
import 'package:path_provider/path_provider.dart';
const bool testing = false;
void main() {
// I see no good explanations of why to use this other package yet, but
// trying this to see if it fixes the DB factory errors.
@@ -24,6 +23,7 @@ void main() {
}
WidgetsFlutterBinding.ensureInitialized();
// Remove the DB and recreate it to test the Database Helper multiple times.
if (testing) {
() async {
Directory documentsDirectory = await getApplicationDocumentsDirectory();