This repository has been archived by the owner on Apr 25, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #110 from CCXXXI/dev
Dev
- Loading branch information
Showing
21 changed files
with
358 additions
and
89 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
import 'package:flutter/material.dart'; | ||
|
||
import '../toolbox/cheater.dart'; | ||
|
||
class CheaterPage extends StatelessWidget { | ||
const CheaterPage({Key? key}) : super(key: key); | ||
|
||
@override | ||
Widget build(BuildContext context) { | ||
return Scaffold( | ||
appBar: AppBar(), | ||
body: ListView( | ||
children: ListTile.divideTiles( | ||
context: context, | ||
tiles: cheaters.map((e) => Text(e)), | ||
).toList(), | ||
), | ||
); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,42 @@ | ||
import 'package:flutter_loggy/flutter_loggy.dart'; | ||
import 'package:get/get.dart'; | ||
import 'package:open_file/open_file.dart'; | ||
import 'package:path_provider/path_provider.dart'; | ||
|
||
import '../utils/gu.dart'; | ||
import '../utils/loading.dart'; | ||
import '../utils/log.dart'; | ||
import 'cheater_view.dart'; | ||
import 'trivia_view.dart'; | ||
|
||
class DevLogic extends GetxController { | ||
void triviaOnTap() => Get.to(() => const TriviaPage()); | ||
|
||
class DevLogic extends GetxController with L { | ||
void updateLog(_) => Get.snackbar('日志设置已更新', '重启后生效'); | ||
|
||
void logOnTap() => Get.to(() => const LoggyStreamScreen()); | ||
|
||
void triviaOnTap() => Get.to(() => const TriviaPage()); | ||
|
||
void cheaterOnTap() => Get.to(() => const CheaterPage()); | ||
|
||
void guOnTap() => gu(); | ||
|
||
void loadingOnTap() => Get.defaultDialog( | ||
title: 'Loading', | ||
content: Loading(), | ||
); | ||
|
||
final jsonFile = ''.obs; | ||
|
||
@override | ||
void onInit() async { | ||
if (GetPlatform.isDesktop && !GetPlatform.isWeb) { | ||
final baseDir = (await getApplicationSupportDirectory()).path; | ||
l.info(jsonFile.value = '$baseDir\\shared_preferences.json'); | ||
} | ||
super.onInit(); | ||
} | ||
|
||
void jsonOnTap() async { | ||
l.info((await OpenFile.open(jsonFile.value)).message); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.