chore: upgrade flutter to 3.10.1 (#2619)

* chore: upgrade flutter and dart

* ci: upgrade flutter in cicd

* fix: remove textstyle_extensions from flowy_infra

* ci: upgrade flutter in cicd

* fix: update flutter.toml

* fix: deprecations and ffi

* fix: move json_annotation to dependencies

Must have accidentally moved it to dev_dependencies when upgrading dependencies

* fix: update editor ref and use fold

* chore: try with generate true
This commit is contained in:
Mathias Mogensen
2023-05-28 05:09:39 +01:00
committed by GitHub
parent 45d0d41830
commit cdfb634aa6
53 changed files with 478 additions and 538 deletions

View File

@ -5,7 +5,7 @@ import 'dart:async';
import 'package:dartz/dartz.dart';
part 'select_option_type_option_bloc.freezed.dart';
abstract class ISelectOptionAction {
abstract mixin class ISelectOptionAction {
Future<List<SelectOptionPB>> Function(String) get insertOption;
List<SelectOptionPB> Function(SelectOptionPB) get deleteOption;

View File

@ -17,7 +17,7 @@ abstract class RowFieldsDelegate {
void onFieldsChanged(void Function(List<FieldInfo>) callback);
}
abstract class RowCacheDelegate {
abstract mixin class RowCacheDelegate {
UnmodifiableListView<FieldInfo> get fields;
void onRowDispose();
}

View File

@ -17,11 +17,11 @@ class CalendarToolbar extends StatelessWidget {
@override
Widget build(BuildContext context) {
return SizedBox(
return const SizedBox(
height: 40,
child: Row(
mainAxisAlignment: MainAxisAlignment.end,
children: const [
children: [
_UnscheduleEventsButton(),
_SettingButton(),
],

View File

@ -62,9 +62,9 @@ class _AccessoryMenu extends StatelessWidget {
color: AFThemeExtension.of(context).toggleOffFill,
),
const VSpace(6),
IntrinsicHeight(
const IntrinsicHeight(
child: Row(
children: const [
children: [
SortMenu(),
HSpace(6),
FilterMenu(),

View File

@ -157,7 +157,7 @@ class EditableRowNotifier {
}
}
abstract class EditableCell {
abstract mixin class EditableCell {
// Each cell notifier will be bind to the [EditableRowNotifier], which enable
// the row notifier receive its cells event. For example: begin editing the
// cell or end editing the cell.

View File

@ -2,7 +2,6 @@ import 'package:appflowy/plugins/database_view/application/cell/cell_controller_
import 'package:flowy_infra_ui/style_widget/text.dart';
import 'package:flutter/material.dart';
import 'package:flutter_bloc/flutter_bloc.dart';
import 'package:textstyle_extensions/textstyle_extensions.dart';
import '../../row/cell_builder.dart';
import '../bloc/text_card_cell_bloc.dart';
import '../define.dart';
@ -178,7 +177,10 @@ class _TextCardCellState extends State<TextCardCell> {
onChanged: (value) => focusChanged(),
onEditingComplete: () => focusNode.unfocus(),
maxLines: null,
style: Theme.of(context).textTheme.bodyMedium!.size(_fontSize()),
style: Theme.of(context)
.textTheme
.bodyMedium!
.copyWith(fontSize: _fontSize()),
decoration: InputDecoration(
// Magic number 4 makes the textField take up the same space as FlowyText
contentPadding: EdgeInsets.symmetric(

View File

@ -2,7 +2,6 @@ import 'package:appflowy/plugins/database_view/application/cell/cell_controller_
import 'package:flowy_infra/size.dart';
import 'package:flutter/material.dart';
import 'package:flutter_bloc/flutter_bloc.dart';
import 'package:textstyle_extensions/textstyle_extensions.dart';
import '../bloc/url_card_cell_bloc.dart';
import '../define.dart';
@ -60,12 +59,11 @@ class _URLCardCellState extends State<URLCardCell> {
textAlign: TextAlign.left,
text: TextSpan(
text: state.content,
style: Theme.of(context)
.textTheme
.bodyMedium!
.size(widget.style?.fontSize ?? FontSizes.s14)
.textColor(Theme.of(context).colorScheme.primary)
.underline,
style: Theme.of(context).textTheme.bodyMedium!.copyWith(
fontSize: widget.style?.fontSize ?? FontSizes.s14,
color: Theme.of(context).colorScheme.primary,
decoration: TextDecoration.underline,
),
),
),
),

View File

@ -6,7 +6,7 @@ enum AccessoryType {
more,
}
abstract class CardAccessory implements Widget {
abstract mixin class CardAccessory implements Widget {
AccessoryType get type;
void onTap(BuildContext context) {}
}

View File

@ -41,7 +41,7 @@ class GridCellAccessoryBuilder {
}
}
abstract class GridCellAccessoryState {
abstract mixin class GridCellAccessoryState {
void onTap();
// The accessory will be hidden if enable() return false;

View File

@ -17,7 +17,6 @@ import 'package:appflowy_backend/protobuf/flowy-error/errors.pbserver.dart';
import 'package:flutter/material.dart';
import 'package:flutter_bloc/flutter_bloc.dart';
import 'package:table_calendar/table_calendar.dart';
import 'package:textstyle_extensions/textstyle_extensions.dart';
import '../../../../grid/presentation/layout/sizes.dart';
import '../../../../grid/presentation/widgets/common/type_option_separator.dart';
import '../../../../grid/presentation/widgets/header/type_option/date.dart';
@ -198,11 +197,13 @@ class _CellCalendarWidgetState extends State<_CellCalendarWidget> {
outsideDecoration: boxDecoration,
defaultTextStyle: textStyle,
weekendTextStyle: textStyle,
selectedTextStyle:
textStyle.textColor(Theme.of(context).colorScheme.surface),
selectedTextStyle: textStyle.copyWith(
color: Theme.of(context).colorScheme.surface,
),
todayTextStyle: textStyle,
outsideTextStyle:
textStyle.textColor(Theme.of(context).disabledColor),
outsideTextStyle: textStyle.copyWith(
color: Theme.of(context).disabledColor,
),
),
selectedDayPredicate: (day) => isSameDay(state.dateTime, day),
onDaySelected: (selectedDay, focusedDay) {

View File

@ -8,7 +8,6 @@ import 'package:easy_localization/easy_localization.dart';
import 'package:appflowy/generated/locale_keys.g.dart';
import 'package:flutter/services.dart';
import 'package:textfield_tags/textfield_tags.dart';
import 'package:textstyle_extensions/textstyle_extensions.dart';
import 'extension.dart';
@ -126,7 +125,7 @@ class _SelectOptionTextFieldState extends State<SelectOptionTextField> {
hintStyle: Theme.of(context)
.textTheme
.bodySmall!
.textColor(Theme.of(context).hintColor),
.copyWith(color: Theme.of(context).hintColor),
suffixText: _suffixText(),
counterText: "",
prefixIconConstraints: