Move testing to be a global variable and use it to control the debug output.
This commit is contained in:
+2
-2
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user