|
|
@@ -1,6 +1,7 @@
|
|
|
import 'package:electronic_assistant/base/base_page.dart';
|
|
|
import 'package:electronic_assistant/module/files/controller.dart';
|
|
|
import 'package:flutter/material.dart';
|
|
|
+import 'package:flutter_screenutil/flutter_screenutil.dart';
|
|
|
|
|
|
import '../../resource/assets.gen.dart';
|
|
|
|
|
|
@@ -9,69 +10,73 @@ class FilesPage extends BasePage<FilesController> {
|
|
|
|
|
|
@override
|
|
|
Widget? buildBody(BuildContext context) {
|
|
|
- return Flex(
|
|
|
- direction: Axis.vertical,
|
|
|
- children: [
|
|
|
- Column(
|
|
|
- children: [
|
|
|
- AppBar(
|
|
|
- title: const Text('文件夹'),
|
|
|
- actions: [
|
|
|
- IconButton(
|
|
|
- onPressed: () {},
|
|
|
- icon: ImageIcon(Assets.images.iconFilesNewDir.provider()),
|
|
|
- ),
|
|
|
- IconButton(
|
|
|
- onPressed: () {},
|
|
|
- icon: ImageIcon(Assets.images.iconMore.provider()),
|
|
|
- ),
|
|
|
- ],
|
|
|
- ),
|
|
|
- Container(
|
|
|
- height: 36,
|
|
|
- decoration: BoxDecoration(
|
|
|
- color: Colors.white,
|
|
|
- borderRadius: BorderRadius.circular(8),
|
|
|
- ),
|
|
|
- child: Flex(
|
|
|
- direction: Axis.horizontal,
|
|
|
- children: [
|
|
|
- ImageIcon(Assets.images.iconSearch.provider()),
|
|
|
- const Expanded(
|
|
|
- child: TextField(
|
|
|
- decoration: InputDecoration(
|
|
|
- hintText: '搜索所有文件标题 / 内容',
|
|
|
- ),
|
|
|
- ))
|
|
|
+ return Scaffold(
|
|
|
+ body: Flex(
|
|
|
+ direction: Axis.vertical,
|
|
|
+ children: [
|
|
|
+ Column(
|
|
|
+ children: [
|
|
|
+ AppBar(
|
|
|
+ title: const Text('文件夹'),
|
|
|
+ actions: [
|
|
|
+ IconButton(
|
|
|
+ onPressed: () {},
|
|
|
+ icon: ImageIcon(Assets.images.iconFilesNewDir.provider()),
|
|
|
+ ),
|
|
|
+ IconButton(
|
|
|
+ onPressed: () {},
|
|
|
+ icon: ImageIcon(Assets.images.iconMore.provider()),
|
|
|
+ ),
|
|
|
],
|
|
|
),
|
|
|
- ),
|
|
|
- ],
|
|
|
- ),
|
|
|
- Expanded(
|
|
|
- child: NestedScrollView(
|
|
|
- headerSliverBuilder: (BuildContext context, bool innerBoxIsScrolled) {
|
|
|
- return <Widget>[
|
|
|
- GridView.builder(
|
|
|
- gridDelegate: const SliverGridDelegateWithFixedCrossAxisCount(
|
|
|
- crossAxisCount: 2,
|
|
|
+ Container(
|
|
|
+ margin: EdgeInsets.symmetric(horizontal: 12.w),
|
|
|
+ padding: EdgeInsets.symmetric(horizontal: 10.w, vertical: 8.w),
|
|
|
+ height: 36.w,
|
|
|
+ decoration: BoxDecoration(
|
|
|
+ color: Colors.white,
|
|
|
+ borderRadius: BorderRadius.circular(8.w),
|
|
|
+ ),
|
|
|
+ child: TextField(
|
|
|
+ maxLines: 1,
|
|
|
+ textAlignVertical: TextAlignVertical.center,
|
|
|
+ decoration: InputDecoration(
|
|
|
+ hintText: '搜索所有文件标题 / 内容',
|
|
|
+ border: InputBorder.none,
|
|
|
+ icon: ImageIcon(Assets.images.iconSearch.provider()),
|
|
|
+ iconColor: const Color.fromRGBO(95, 95, 97, 1),
|
|
|
+ ),
|
|
|
+ style: TextStyle(fontSize: 14.sp),
|
|
|
),
|
|
|
- itemBuilder: (BuildContext context, int index) {
|
|
|
- return const SizedBox();
|
|
|
- },
|
|
|
),
|
|
|
- const Text('全部谈话'),
|
|
|
- ];
|
|
|
- },
|
|
|
- body: AnimatedList(
|
|
|
- initialItemCount: 10,
|
|
|
- itemBuilder:
|
|
|
- (BuildContext context, int index, Animation<double> animation) {
|
|
|
- return const SizedBox();
|
|
|
- },
|
|
|
+ ],
|
|
|
),
|
|
|
- ))
|
|
|
- ],
|
|
|
+ Expanded(
|
|
|
+ child: NestedScrollView(
|
|
|
+ headerSliverBuilder:
|
|
|
+ (BuildContext context, bool innerBoxIsScrolled) {
|
|
|
+ return <Widget>[
|
|
|
+ GridView.builder(
|
|
|
+ gridDelegate: const SliverGridDelegateWithFixedCrossAxisCount(
|
|
|
+ crossAxisCount: 2,
|
|
|
+ ),
|
|
|
+ itemBuilder: (BuildContext context, int index) {
|
|
|
+ return const SizedBox();
|
|
|
+ },
|
|
|
+ ),
|
|
|
+ const Text('全部谈话'),
|
|
|
+ ];
|
|
|
+ },
|
|
|
+ body: AnimatedList(
|
|
|
+ initialItemCount: 10,
|
|
|
+ itemBuilder: (BuildContext context, int index,
|
|
|
+ Animation<double> animation) {
|
|
|
+ return const SizedBox();
|
|
|
+ },
|
|
|
+ ),
|
|
|
+ ))
|
|
|
+ ],
|
|
|
+ ),
|
|
|
);
|
|
|
}
|
|
|
}
|