|
@@ -1,6 +1,8 @@
|
|
|
import 'package:app_flowy/generated/locale_keys.g.dart';
|
|
|
import 'package:app_flowy/plugins/grid/application/cell/date_cal_bloc.dart';
|
|
|
import 'package:app_flowy/plugins/grid/application/field/type_option/type_option_context.dart';
|
|
|
+import 'package:app_flowy/workspace/presentation/widgets/toggle/toggle.dart';
|
|
|
+import 'package:app_flowy/workspace/presentation/widgets/toggle/toggle_style.dart';
|
|
|
import 'package:appflowy_popover/appflowy_popover.dart';
|
|
|
import 'package:dartz/dartz.dart' show Either;
|
|
|
import 'package:easy_localization/easy_localization.dart';
|
|
@@ -167,6 +169,18 @@ class _CellCalendarWidgetState extends State<_CellCalendarWidget> {
|
|
|
rightChevronMargin: EdgeInsets.zero,
|
|
|
rightChevronIcon: svgWidget("home/arrow_right"),
|
|
|
),
|
|
|
+ daysOfWeekStyle: DaysOfWeekStyle(
|
|
|
+ dowTextFormatter: (date, locale) =>
|
|
|
+ DateFormat.E(locale).format(date).toUpperCase(),
|
|
|
+ weekdayStyle: TextStyle(
|
|
|
+ fontSize: 13,
|
|
|
+ color: theme.shader3,
|
|
|
+ ),
|
|
|
+ weekendStyle: TextStyle(
|
|
|
+ fontSize: 13,
|
|
|
+ color: theme.shader3,
|
|
|
+ ),
|
|
|
+ ),
|
|
|
calendarStyle: CalendarStyle(
|
|
|
selectedDecoration: BoxDecoration(
|
|
|
color: theme.main1,
|
|
@@ -230,11 +244,13 @@ class _IncludeTimeButton extends StatelessWidget {
|
|
|
FlowyText.medium(LocaleKeys.grid_field_includeTime.tr(),
|
|
|
fontSize: 14),
|
|
|
const Spacer(),
|
|
|
- Switch(
|
|
|
+ Toggle(
|
|
|
value: includeTime,
|
|
|
- onChanged: (newValue) => context
|
|
|
+ onChanged: (value) => context
|
|
|
.read<DateCalBloc>()
|
|
|
- .add(DateCalEvent.setIncludeTime(newValue)),
|
|
|
+ .add(DateCalEvent.setIncludeTime(!value)),
|
|
|
+ style: ToggleStyle.big(theme),
|
|
|
+ padding: EdgeInsets.zero,
|
|
|
),
|
|
|
],
|
|
|
),
|
|
@@ -350,7 +366,7 @@ class _DateTypeOptionButton extends StatelessWidget {
|
|
|
offset: const Offset(20, 0),
|
|
|
constraints: BoxConstraints.loose(const Size(140, 100)),
|
|
|
child: FlowyButton(
|
|
|
- text: FlowyText.medium(title, fontSize: 12),
|
|
|
+ text: FlowyText.medium(title, fontSize: 14),
|
|
|
hoverColor: theme.hover,
|
|
|
margin: kMargin,
|
|
|
rightIcon: svgWidget("grid/more", color: theme.iconColor),
|