|
@@ -257,6 +257,7 @@ class HomePage extends GetView<HomeController> {
|
|
|
}
|
|
|
|
|
|
Widget _buildHeaderCenter() {
|
|
|
+ int clickCount = 0;
|
|
|
return Row(
|
|
|
mainAxisSize: MainAxisSize.min,
|
|
|
crossAxisAlignment: CrossAxisAlignment.center,
|
|
@@ -266,25 +267,16 @@ class HomePage extends GetView<HomeController> {
|
|
|
mainAxisAlignment: MainAxisAlignment.center,
|
|
|
children: [
|
|
|
GestureDetector(
|
|
|
- onDoubleTap: () async {
|
|
|
- var sPath =
|
|
|
- "/data/user/0/com.vinno.vitalapp/databases/vital.db";
|
|
|
- final directory = await getExternalStorageDirectory();
|
|
|
- final path = directory?.path;
|
|
|
- final sourceFile = File(sPath);
|
|
|
- final destFile = File('$path/vital.db');
|
|
|
-
|
|
|
- await destFile.create(recursive: true);
|
|
|
- await sourceFile.copy(destFile.path);
|
|
|
- },
|
|
|
onTap: () async {
|
|
|
- var sPath =
|
|
|
- "/data/user/0/com.vinno.vitalapp/databases/vital.db";
|
|
|
- final directory = await getExternalStorageDirectory();
|
|
|
- final path = directory?.path;
|
|
|
- final destFile = File('$path/vital.db');
|
|
|
- final sourceFile = File(sPath);
|
|
|
- await destFile.copy(sourceFile.path);
|
|
|
+ if (clickCount >= 10) {
|
|
|
+ clickCount = 0;
|
|
|
+ Get.toNamed("/admin");
|
|
|
+ } else {
|
|
|
+ if (clickCount > 5) {
|
|
|
+ PromptBox.toast("Click count: $clickCount!");
|
|
|
+ }
|
|
|
+ clickCount++;
|
|
|
+ }
|
|
|
},
|
|
|
child: const Text(
|
|
|
"杏聆荟健康平台",
|