|
|
@@ -13,6 +13,7 @@ import 'package:pull_to_refresh/pull_to_refresh.dart';
|
|
|
|
|
|
import '../../data/bean/agenda.dart';
|
|
|
import '../../data/repositories/account_repository.dart';
|
|
|
+import '../../popup/agenda_time_popup.dart';
|
|
|
import '../../popup/common_popup.dart';
|
|
|
import '../../popup/template_utils.dart';
|
|
|
import '../../resource/assets.gen.dart';
|
|
|
@@ -52,52 +53,7 @@ class AgendaPage extends BasePage<AgendaController> {
|
|
|
color: ColorName.primaryTextColor)),
|
|
|
centerTitle: true,
|
|
|
),
|
|
|
- Row(
|
|
|
- children: [
|
|
|
- Expanded(
|
|
|
- child: Container(
|
|
|
- height: 36.h,
|
|
|
- margin: EdgeInsets.only(left: 12.w),
|
|
|
- decoration: BoxDecoration(
|
|
|
- color: ColorName.white,
|
|
|
- borderRadius: BorderRadius.circular(8.w)),
|
|
|
- padding: EdgeInsets.only(left: 12.w),
|
|
|
- child: Row(
|
|
|
- children: [
|
|
|
- Assets.images.iconSearch.image(width: 20.w, height: 20.w),
|
|
|
- SizedBox(width: 6.w),
|
|
|
- Text(
|
|
|
- StringName.searchHint.tr,
|
|
|
- style: TextStyle(
|
|
|
- fontSize: 14.sp,
|
|
|
- color: ColorName.tertiaryTextColor),
|
|
|
- )
|
|
|
- ],
|
|
|
- ),
|
|
|
- )),
|
|
|
- GestureDetector(
|
|
|
- onTap: () {},
|
|
|
- child: Column(
|
|
|
- mainAxisAlignment: MainAxisAlignment.center,
|
|
|
- children: [
|
|
|
- Container(
|
|
|
- margin: EdgeInsets.symmetric(horizontal: 16.w),
|
|
|
- width: 20.w,
|
|
|
- height: 20.w,
|
|
|
- child: Assets.images.iconSift.image()),
|
|
|
- // Replace with your image asset
|
|
|
- SizedBox(height: 2.h),
|
|
|
- // Add some space between the image and text
|
|
|
- Text(
|
|
|
- StringName.agendaSift.tr,
|
|
|
- style: TextStyle(
|
|
|
- fontSize: 10.sp, color: ColorName.primaryTextColor),
|
|
|
- ),
|
|
|
- ],
|
|
|
- ),
|
|
|
- )
|
|
|
- ],
|
|
|
- ),
|
|
|
+ _buildSearchView(),
|
|
|
SizedBox(height: 12.h),
|
|
|
Container(
|
|
|
margin: EdgeInsets.only(left: 12.w),
|
|
|
@@ -172,6 +128,61 @@ class AgendaPage extends BasePage<AgendaController> {
|
|
|
);
|
|
|
}
|
|
|
|
|
|
+ Widget _buildSearchView() {
|
|
|
+ return Row(
|
|
|
+ children: [
|
|
|
+ Expanded(
|
|
|
+ child: Container(
|
|
|
+ height: 36.h,
|
|
|
+ margin: EdgeInsets.only(left: 12.w),
|
|
|
+ decoration: BoxDecoration(
|
|
|
+ color: ColorName.white, borderRadius: BorderRadius.circular(8.w)),
|
|
|
+ padding: EdgeInsets.only(left: 12.w),
|
|
|
+ child: Row(
|
|
|
+ children: [
|
|
|
+ Assets.images.iconSearch.image(width: 20.w, height: 20.w),
|
|
|
+ SizedBox(width: 6.w),
|
|
|
+ Text(
|
|
|
+ StringName.searchHint.tr,
|
|
|
+ style: TextStyle(
|
|
|
+ fontSize: 14.sp, color: ColorName.tertiaryTextColor),
|
|
|
+ )
|
|
|
+ ],
|
|
|
+ ),
|
|
|
+ )),
|
|
|
+ Builder(builder: (context) {
|
|
|
+ return GestureDetector(
|
|
|
+ onTap: () {
|
|
|
+ showAgendaTimePopup(
|
|
|
+ context, Alignment.bottomLeft, controller.timeFilterIndex,
|
|
|
+ callback: (index) {
|
|
|
+ controller.setTimeFilterIndex(index);
|
|
|
+ });
|
|
|
+ },
|
|
|
+ child: Column(
|
|
|
+ mainAxisAlignment: MainAxisAlignment.center,
|
|
|
+ children: [
|
|
|
+ Container(
|
|
|
+ margin: EdgeInsets.symmetric(horizontal: 16.w),
|
|
|
+ width: 20.w,
|
|
|
+ height: 20.w,
|
|
|
+ child: Assets.images.iconSift.image()),
|
|
|
+ // Replace with your image asset
|
|
|
+ SizedBox(height: 2.h),
|
|
|
+ // Add some space between the image and text
|
|
|
+ Text(
|
|
|
+ StringName.agendaSift.tr,
|
|
|
+ style: TextStyle(
|
|
|
+ fontSize: 10.sp, color: ColorName.primaryTextColor),
|
|
|
+ ),
|
|
|
+ ],
|
|
|
+ ),
|
|
|
+ );
|
|
|
+ })
|
|
|
+ ],
|
|
|
+ );
|
|
|
+ }
|
|
|
+
|
|
|
Widget _buildTodoItem(BuildContext context, int index) {
|
|
|
Agenda item = controller.agendaTodoList[index];
|
|
|
return Builder(builder: (context) {
|
|
|
@@ -180,7 +191,7 @@ class AgendaPage extends BasePage<AgendaController> {
|
|
|
if (!accountRepository.isLogin.value) {
|
|
|
return;
|
|
|
}
|
|
|
- showCommonPopup(null, details.globalPosition, Alignment.bottomRight,
|
|
|
+ showPressTouchPopup(details.globalPosition, Alignment.bottomRight,
|
|
|
_buildListUpdatePopupView(item, controller.agendaDetailPopupTag),
|
|
|
tag: controller.agendaDetailPopupTag);
|
|
|
},
|