From 0bdf267b36b7b900bbfcbe8a7ed70e62ccc10b14 Mon Sep 17 00:00:00 2001 From: jyuesong <425698907@qq.com> Date: Wed, 19 Jan 2022 15:29:11 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E6=A0=B7=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../others/dependencies/dependency_page.dart | 114 +++++++++--------- 1 file changed, 57 insertions(+), 57 deletions(-) diff --git a/lib/module/others/dependencies/dependency_page.dart b/lib/module/others/dependencies/dependency_page.dart index 9a49d13..9e4948c 100644 --- a/lib/module/others/dependencies/dependency_page.dart +++ b/lib/module/others/dependencies/dependency_page.dart @@ -71,68 +71,68 @@ class _DependcyPageState extends State with TickerProviderStateM ), ], ), - body: SizedBox( - width: MediaQuery.of(context).size.width, - child: Column( - mainAxisSize: MainAxisSize.max, - children: [ - TabBar( - controller: _tabController, - tabs: types - .map((e) => Tab( - text: e.name, - )) - .toList(), - isScrollable: true, - indicator: AbsUnderlineTabIndicator( - wantWidth: 20, - borderSide: BorderSide( - color: Theme.of(context).primaryColor, - width: 2, - ), + body: Column( + crossAxisAlignment: CrossAxisAlignment.start, + mainAxisSize: MainAxisSize.max, + children: [ + TabBar( + controller: _tabController, + tabs: types + .map( + (e) => Tab( + text: e.name, + ), + ) + .toList(), + isScrollable: true, + indicator: AbsUnderlineTabIndicator( + wantWidth: 20, + borderSide: BorderSide( + color: Theme.of(context).primaryColor, + width: 2, ), ), - Expanded( - child: BaseStateWidget( - onReady: (model) { - model.loadData(types[0].name.toLowerCase()); - model.loadData(types[1].name.toLowerCase()); - model.loadData(types[2].name.toLowerCase()); - }, - model: dependencyProvider, - builder: (context, model, child) { - return TabBarView( - controller: _tabController, - children: types.map( - (e) { - List list; - if (e.index == 0) { - list = model.nodeJsList; - } else if (e.index == 1) { - list = model.python3List; - } else { - list = model.linuxList; - } + ), + Expanded( + child: BaseStateWidget( + onReady: (model) { + model.loadData(types[0].name.toLowerCase()); + model.loadData(types[1].name.toLowerCase()); + model.loadData(types[2].name.toLowerCase()); + }, + model: dependencyProvider, + builder: (context, model, child) { + return TabBarView( + controller: _tabController, + children: types.map( + (e) { + List list; + if (e.index == 0) { + list = model.nodeJsList; + } else if (e.index == 1) { + list = model.python3List; + } else { + list = model.linuxList; + } - return RefreshIndicator( - child: ListView.builder( - itemBuilder: (context, index) { - return DependencyCell(e, list[index]); - }, - itemCount: list.length, - ), - onRefresh: () { - return model.loadData(types[_tabController!.index].name.toLowerCase(), false); + return RefreshIndicator( + child: ListView.builder( + itemBuilder: (context, index) { + return DependencyCell(e, list[index]); }, - ); - }, - ).toList(), - ); - }, - ), + itemCount: list.length, + ), + onRefresh: () { + return model.loadData(types[_tabController!.index].name.toLowerCase(), false); + }, + ); + }, + ).toList(), + ); + }, ), - ], - ), + ), + ], ), ); }