welcome_view.dart 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. import 'package:flutter/material.dart';
  2. import 'package:get/get.dart';
  3. import '../controllers/welcome_controller.dart';
  4. class WelcomeView extends GetView<WelcomeController> {
  5. const WelcomeView({Key? key}) : super(key: key);
  6. @override
  7. Widget build(BuildContext context) {
  8. return Scaffold(
  9. backgroundColor: Colors.white,
  10. body: Obx(() {
  11. return Center(
  12. child: controller.isLoading.value
  13. ? const Column(
  14. mainAxisAlignment: MainAxisAlignment.center,
  15. children: <Widget>[
  16. CircularProgressIndicator(), // 菊花加载指示器
  17. SizedBox(height: 20), // 用于给加载指示器和文字之间增加一些空间
  18. Text(
  19. '正在获取系统配置',
  20. style: TextStyle(
  21. fontSize: 16,
  22. fontWeight: FontWeight.w600,
  23. ),
  24. ),
  25. ],
  26. )
  27. : Container(), // 当不在加载时,你可能想要显示其他的 Widget
  28. );
  29. }),
  30. );
  31. }
  32. }