feat: reminder (#3374)

This commit is contained in:
Mathias Mogensen
2023-10-02 09:12:24 +02:00
committed by GitHub
parent f7749bdccc
commit 4a433a3176
99 changed files with 4599 additions and 998 deletions

View File

@ -224,7 +224,7 @@ class _SelectOptionColorCell extends StatelessWidget {
final colorIcon = SizedBox.square(
dimension: 16,
child: Container(
child: DecoratedBox(
decoration: BoxDecoration(
color: color.toColor(context),
shape: BoxShape.circle,

View File

@ -3,17 +3,17 @@ import 'package:appflowy/generated/locale_keys.g.dart';
import 'package:appflowy/plugins/database_view/application/cell/cell_controller_builder.dart';
import 'package:appflowy/plugins/database_view/application/field/type_option/type_option_context.dart';
import 'package:appflowy/plugins/database_view/grid/presentation/widgets/header/type_option/timestamp.dart';
import 'package:appflowy/workspace/presentation/widgets/date_picker/appflowy_calendar.dart';
import 'package:appflowy/workspace/presentation/widgets/toggle/toggle.dart';
import 'package:appflowy/workspace/presentation/widgets/toggle/toggle_style.dart';
import 'package:appflowy_backend/log.dart';
import 'package:appflowy_backend/protobuf/flowy-database2/date_entities.pb.dart';
import 'package:appflowy_backend/protobuf/flowy-error/errors.pbserver.dart';
import 'package:appflowy_backend/protobuf/flowy-error/errors.pb.dart';
import 'package:appflowy_popover/appflowy_popover.dart';
import 'package:dartz/dartz.dart' show Either;
import 'package:easy_localization/easy_localization.dart';
import 'package:flowy_infra/theme_extension.dart';
import 'package:flowy_infra/time/duration.dart';
import 'package:flowy_infra/time/prelude.dart';
import 'package:flowy_infra_ui/flowy_infra_ui.dart';
import 'package:flutter/material.dart';
import 'package:flutter_bloc/flutter_bloc.dart';
@ -24,9 +24,6 @@ import '../../../../grid/presentation/widgets/common/type_option_separator.dart'
import '../../../../grid/presentation/widgets/header/type_option/date.dart';
import 'date_cal_bloc.dart';
final kFirstDay = DateTime.utc(1970, 1, 1);
final kLastDay = DateTime.utc(2100, 1, 1);
class DateCellEditor extends StatefulWidget {
final VoidCallback onDismissed;
final DateCellController cellController;
@ -51,9 +48,9 @@ class _DateCellEditor extends State<DateCellEditor> {
builder: (BuildContext context, snapshot) {
if (snapshot.hasData) {
return _buildWidget(snapshot);
} else {
return const SizedBox.shrink();
}
return const SizedBox.shrink();
},
);
}
@ -81,22 +78,14 @@ class _CellCalendarWidget extends StatefulWidget {
const _CellCalendarWidget({
required this.cellContext,
required this.dateTypeOptionPB,
Key? key,
}) : super(key: key);
});
@override
State<_CellCalendarWidget> createState() => _CellCalendarWidgetState();
}
class _CellCalendarWidgetState extends State<_CellCalendarWidget> {
late PopoverMutex popoverMutex;
@override
void initState() {
popoverMutex = PopoverMutex();
super.initState();
}
final PopoverMutex popoverMutex = PopoverMutex();
@override
Widget build(BuildContext context) {
@ -387,8 +376,7 @@ class _TimeTextField extends StatefulWidget {
required this.timeStr,
required this.popoverMutex,
required this.isEndTime,
Key? key,
}) : super(key: key);
});
@override
State<_TimeTextField> createState() => _TimeTextFieldState();