@@ -99,10 +99,9 @@ class _FilePreviewState extends ConsumerState<FilePreview> {
9999 ),
100100 const SizedBox (height: 8 ),
101101 Text (
102- "文件大小: {size}" .tr (
103- context,
104- args: {"size" : Util .formatSize (file.size)},
105- ),
102+ "文件大小: {size}" .tr (args: {
103+ "size" : Util .formatSize (file.size),
104+ }),
106105 maxLines: 1 ,
107106 overflow: TextOverflow .ellipsis,
108107 style: Theme .of (context).textTheme.bodySmall,
@@ -114,15 +113,15 @@ class _FilePreviewState extends ConsumerState<FilePreview> {
114113 SizedBox (
115114 width: double .infinity,
116115 child: FilledButton (
117- child: Text ('下载' .tr (context )),
116+ child: Text ('下载' .tr ()),
118117 onPressed: () async {
119118 await FileActionType .download.action (context, file, ref);
120119 },
121120 ),
122121 ),
123122 const SizedBox (height: 8 ),
124123 Text (
125- "未知的文件类型,无法查看文件,请下载到本地查看" .tr (context ),
124+ "未知的文件类型,无法查看文件,请下载到本地查看" .tr (),
126125 style: Theme .of (context).textTheme.bodySmall,
127126 ),
128127 ],
@@ -371,18 +370,22 @@ class _FileVideoPreviewState extends State<FileVideoPreview>
371370 overflow: TextOverflow .ellipsis,
372371 ),
373372 ),
374- body: Column (
375- children: [
376- VideoPreview (controller: _controller),
377- TabBar (
378- padding: const EdgeInsets .fromLTRB (16 , 8 , 16 , 0 ),
379- controller: _tabController,
380- tabs: < Tab > [
381- Tab (text: "简介" .tr (context)),
382- Tab (text: "播放列表" .tr (context)),
383- ],
373+ body: CustomScrollView (
374+ slivers: [
375+ SliverToBoxAdapter (
376+ child: VideoPreview (controller: _controller),
377+ ),
378+ SliverToBoxAdapter (
379+ child: TabBar (
380+ padding: const EdgeInsets .fromLTRB (16 , 8 , 16 , 0 ),
381+ controller: _tabController,
382+ tabs: < Tab > [
383+ Tab (text: "简介" .tr ()),
384+ Tab (text: "播放列表" .tr ()),
385+ ],
386+ ),
384387 ),
385- Expanded (
388+ SliverFillRemaining (
386389 child: Container (
387390 padding: const EdgeInsets .fromLTRB (16 , 0 , 16 , 0 ),
388391 child: TabBarView (
@@ -392,7 +395,7 @@ class _FileVideoPreviewState extends State<FileVideoPreview>
392395 mainAxisSize: MainAxisSize .min,
393396 children: [
394397 ListTile (
395- title: Text ("文件名称" .tr (context )),
398+ title: Text ("文件名称" .tr ()),
396399 trailing: Text (_controller.currentSource.name),
397400 ),
398401 ],
0 commit comments