view.dart 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. import 'package:flutter/material.dart';
  2. import 'package:get/get.dart';
  3. import 'package:vitalapp/components/appbar.dart';
  4. import 'controller.dart';
  5. class AdminPage extends GetView<AdminController> {
  6. const AdminPage({super.key});
  7. @override
  8. Widget build(BuildContext context) {
  9. // TODO: 后门页面
  10. return Scaffold(
  11. appBar: VAppBar(titleText: "系统管理"),
  12. body: ListView(
  13. padding: const EdgeInsets.symmetric(horizontal: 40),
  14. children: [
  15. const Text("欢迎补充", style: TextStyle(fontSize: 26)),
  16. const SizedBox(height: 8),
  17. ElevatedButton(
  18. onPressed: controller.cpDbFileLoki,
  19. child: const Text("Loki DB CP"),
  20. ),
  21. const SizedBox(height: 8),
  22. ElevatedButton(
  23. onPressed: controller.cpDbFileFinlay,
  24. child: const Text("Finlay DB CP"),
  25. ),
  26. const SizedBox(height: 8),
  27. ElevatedButton(
  28. onPressed: controller.switchOnlineOffline,
  29. child: const Text("Switch Online/Offline"),
  30. ),
  31. ],
  32. ),
  33. );
  34. }
  35. }