Improve efficiency of data fetching

This commit is contained in:
Junyuan Feng
2022-02-02 13:23:54 +08:00
parent 5d9b19407f
commit 026d203608
8 changed files with 121 additions and 113 deletions

View File

@@ -17,7 +17,8 @@ import 'package:toolbox/view/page/server/detail.dart';
import 'package:toolbox/view/page/server/edit.dart';
class ServerPage extends StatefulWidget {
const ServerPage({Key? key}) : super(key: key);
final TabController tabController;
const ServerPage(this.tabController, {Key? key}) : super(key: key);
@override
_ServerPageState createState() => _ServerPageState();
@@ -45,6 +46,9 @@ class _ServerPageState extends State<ServerPage>
_media = MediaQuery.of(context);
_theme = Theme.of(context);
_primaryColor = primaryColor;
if (widget.tabController.index == 0) {
FocusScope.of(context).unfocus();
}
}
@override