mirror of
https://github.com/AppFlowy-IO/AppFlowy.git
synced 2024-08-30 18:12:39 +00:00
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:
parent
45d0d41830
commit
cdfb634aa6
2
.github/workflows/flutter_ci.yaml
vendored
2
.github/workflows/flutter_ci.yaml
vendored
@ -22,7 +22,7 @@ on:
|
||||
- "!frontend/appflowy_tauri/**"
|
||||
|
||||
env:
|
||||
FLUTTER_VERSION: "3.7.5"
|
||||
FLUTTER_VERSION: "3.10.1"
|
||||
RUST_TOOLCHAIN: "1.65"
|
||||
|
||||
jobs:
|
||||
|
2
.github/workflows/integration_test.yml
vendored
2
.github/workflows/integration_test.yml
vendored
@ -35,7 +35,7 @@ jobs:
|
||||
- uses: subosito/flutter-action@v2
|
||||
with:
|
||||
channel: "stable"
|
||||
flutter-version: "3.7.5"
|
||||
flutter-version: "3.10.1"
|
||||
cache: true
|
||||
|
||||
- name: Cache Cargo
|
||||
|
8
.github/workflows/release.yml
vendored
8
.github/workflows/release.yml
vendored
@ -6,7 +6,7 @@ on:
|
||||
- "*"
|
||||
|
||||
env:
|
||||
FLUTTER_VERSION: "3.7.5"
|
||||
FLUTTER_VERSION: "3.10.1"
|
||||
RUST_TOOLCHAIN: "1.65"
|
||||
|
||||
jobs:
|
||||
@ -136,11 +136,7 @@ jobs:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
job:
|
||||
- {
|
||||
target: x86_64-apple-darwin,
|
||||
os: macos-11,
|
||||
extra-build-args: "",
|
||||
}
|
||||
- { target: x86_64-apple-darwin, os: macos-11, extra-build-args: "" }
|
||||
steps:
|
||||
- name: Checkout source code
|
||||
uses: actions/checkout@v3
|
||||
|
4
.github/workflows/rust_ci.yaml
vendored
4
.github/workflows/rust_ci.yaml
vendored
@ -22,7 +22,7 @@ on:
|
||||
env:
|
||||
CARGO_TERM_COLOR: always
|
||||
RUST_TOOLCHAIN: "1.65"
|
||||
FLUTTER_VERSION: "3.7.5"
|
||||
FLUTTER_VERSION: "3.10.1"
|
||||
|
||||
jobs:
|
||||
test-on-ubuntu:
|
||||
@ -80,7 +80,7 @@ jobs:
|
||||
working-directory: shared-lib
|
||||
|
||||
- name: clippy shared-lib
|
||||
run: cargo clippy -- -D warnings
|
||||
run: cargo clippy -- -D warnings
|
||||
working-directory: shared-lib
|
||||
|
||||
- name: Run shared-lib tests
|
||||
|
2
.github/workflows/rust_coverage.yml
vendored
2
.github/workflows/rust_coverage.yml
vendored
@ -11,7 +11,7 @@ on:
|
||||
|
||||
env:
|
||||
CARGO_TERM_COLOR: always
|
||||
FLUTTER_VERSION: "3.7.5"
|
||||
FLUTTER_VERSION: "3.10.1"
|
||||
RUST_TOOLCHAIN: "1.65"
|
||||
|
||||
jobs:
|
||||
|
2
frontend/.vscode/tasks.json
vendored
2
frontend/.vscode/tasks.json
vendored
@ -118,7 +118,7 @@
|
||||
{
|
||||
"label": "AF: Generate Freezed Files",
|
||||
"type": "shell",
|
||||
"command": "flutter pub run build_runner build --delete-conflicting-outputs",
|
||||
"command": "dart run build_runner build -d",
|
||||
"options": {
|
||||
"cwd": "${workspaceFolder}/appflowy_flutter"
|
||||
}
|
||||
|
@ -1,7 +1,7 @@
|
||||
.PHONY: freeze_build, free_watch
|
||||
|
||||
freeze_build:
|
||||
flutter pub run build_runner build --delete-conflicting-outputs
|
||||
dart run build_runner build -d
|
||||
|
||||
watch:
|
||||
flutter pub run build_runner watch
|
||||
dart run build_runner watch
|
@ -1,6 +1,6 @@
|
||||
<h1 align="center" style="margin:0"> AppFlowy_Flutter</h1>
|
||||
<div align="center">
|
||||
<img src="https://img.shields.io/badge/Flutter-v3.7.5-blue"/>
|
||||
<img src="https://img.shields.io/badge/Flutter-v3.10.1-blue"/>
|
||||
<img src="https://img.shields.io/badge/Rust-v1.65-orange"/>
|
||||
</div>
|
||||
|
||||
|
@ -58,17 +58,21 @@ class TestFolder {
|
||||
|
||||
extension AppFlowyTestBase on WidgetTester {
|
||||
Future<void> initializeAppFlowy() async {
|
||||
const MethodChannel('hotkey_manager')
|
||||
.setMockMethodCallHandler((MethodCall methodCall) async {
|
||||
if (methodCall.method == 'unregisterAll') {
|
||||
// do nothing
|
||||
}
|
||||
});
|
||||
TestDefaultBinaryMessengerBinding.instance.defaultBinaryMessenger
|
||||
.setMockMethodCallHandler(
|
||||
const MethodChannel('hotkey_manager'),
|
||||
(MethodCall methodCall) async {
|
||||
if (methodCall.method == 'unregisterAll') {
|
||||
// do nothing
|
||||
}
|
||||
|
||||
return;
|
||||
},
|
||||
);
|
||||
|
||||
await app.main();
|
||||
await wait(3000);
|
||||
await pumpAndSettle(const Duration(seconds: 2));
|
||||
return;
|
||||
}
|
||||
|
||||
Future<void> tapButton(
|
||||
|
10
frontend/appflowy_flutter/lib/env/env.dart
vendored
10
frontend/appflowy_flutter/lib/env/env.dart
vendored
@ -10,32 +10,32 @@ abstract class Env {
|
||||
varName: 'SUPABASE_URL',
|
||||
defaultValue: '',
|
||||
)
|
||||
static final supabaseUrl = _Env.supabaseUrl;
|
||||
static final String supabaseUrl = _Env.supabaseUrl;
|
||||
@EnviedField(
|
||||
obfuscate: true,
|
||||
varName: 'SUPABASE_ANON_KEY',
|
||||
defaultValue: '',
|
||||
)
|
||||
static final supabaseAnonKey = _Env.supabaseAnonKey;
|
||||
static final String supabaseAnonKey = _Env.supabaseAnonKey;
|
||||
@EnviedField(
|
||||
obfuscate: true,
|
||||
varName: 'SUPABASE_KEY',
|
||||
defaultValue: '',
|
||||
)
|
||||
static final supabaseKey = _Env.supabaseKey;
|
||||
static final String supabaseKey = _Env.supabaseKey;
|
||||
@EnviedField(
|
||||
obfuscate: true,
|
||||
varName: 'SUPABASE_JWT_SECRET',
|
||||
defaultValue: '',
|
||||
)
|
||||
static final supabaseJwtSecret = _Env.supabaseJwtSecret;
|
||||
static final String supabaseJwtSecret = _Env.supabaseJwtSecret;
|
||||
|
||||
@EnviedField(
|
||||
obfuscate: true,
|
||||
varName: 'SUPABASE_COLLAB_TABLE',
|
||||
defaultValue: '',
|
||||
)
|
||||
static final supabaseCollabTable = _Env.supabaseCollabTable;
|
||||
static final String supabaseCollabTable = _Env.supabaseCollabTable;
|
||||
}
|
||||
|
||||
bool get isSupabaseEnable =>
|
||||
|
@ -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;
|
||||
|
@ -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();
|
||||
}
|
||||
|
@ -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(),
|
||||
],
|
||||
|
@ -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(),
|
||||
|
@ -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.
|
||||
|
@ -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(
|
||||
|
@ -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,
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
|
@ -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) {}
|
||||
}
|
||||
|
@ -41,7 +41,7 @@ class GridCellAccessoryBuilder {
|
||||
}
|
||||
}
|
||||
|
||||
abstract class GridCellAccessoryState {
|
||||
abstract mixin class GridCellAccessoryState {
|
||||
void onTap();
|
||||
|
||||
// The accessory will be hidden if enable() return false;
|
||||
|
@ -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) {
|
||||
|
@ -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:
|
||||
|
@ -6,7 +6,6 @@ import 'package:appflowy/plugins/document/presentation/editor_style.dart';
|
||||
import 'package:appflowy_editor/appflowy_editor.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_bloc/flutter_bloc.dart';
|
||||
import 'package:tuple/tuple.dart';
|
||||
|
||||
/// Wrapper for the appflowy editor.
|
||||
class AppFlowyEditorPage extends StatefulWidget {
|
||||
@ -88,14 +87,16 @@ class _AppFlowyEditorPageState extends State<AppFlowyEditorPage> {
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
final autoFocusParameters = _computeAutoFocusParameters();
|
||||
final (bool autoFocus, Selection? selection) =
|
||||
_computeAutoFocusParameters();
|
||||
|
||||
final editor = AppFlowyEditor.custom(
|
||||
editorState: widget.editorState,
|
||||
editable: true,
|
||||
scrollController: scrollController,
|
||||
// setup the auto focus parameters
|
||||
autoFocus: autoFocusParameters.item1,
|
||||
focusedSelection: autoFocusParameters.item2,
|
||||
autoFocus: autoFocus,
|
||||
focusedSelection: selection,
|
||||
// setup the theme
|
||||
editorStyle: styleCustomizer.style(),
|
||||
// customize the block builder
|
||||
@ -107,7 +108,7 @@ class _AppFlowyEditorPageState extends State<AppFlowyEditorPage> {
|
||||
);
|
||||
|
||||
return Center(
|
||||
child: Container(
|
||||
child: ConstrainedBox(
|
||||
constraints: const BoxConstraints(
|
||||
maxWidth: double.infinity,
|
||||
),
|
||||
@ -246,17 +247,17 @@ class _AppFlowyEditorPageState extends State<AppFlowyEditorPage> {
|
||||
return builders;
|
||||
}
|
||||
|
||||
Tuple2<bool, Selection?> _computeAutoFocusParameters() {
|
||||
(bool, Selection?) _computeAutoFocusParameters() {
|
||||
if (widget.editorState.document.isEmpty) {
|
||||
return Tuple2(true, Selection.collapse([0], 0));
|
||||
return (true, Selection.collapse([0], 0));
|
||||
}
|
||||
final nodes = widget.editorState.document.root.children
|
||||
.where((element) => element.delta != null);
|
||||
final isAllEmpty =
|
||||
nodes.isNotEmpty && nodes.every((element) => element.delta!.isEmpty);
|
||||
if (isAllEmpty) {
|
||||
return Tuple2(true, Selection.collapse(nodes.first.path, 0));
|
||||
return (true, Selection.collapse(nodes.first.path, 0));
|
||||
}
|
||||
return const Tuple2(false, null);
|
||||
return const (false, null);
|
||||
}
|
||||
}
|
||||
|
@ -2,7 +2,6 @@ import 'package:appflowy/plugins/document/presentation/editor_plugins/base/inser
|
||||
import 'package:appflowy/workspace/application/app/app_service.dart';
|
||||
import 'package:appflowy_backend/protobuf/flowy-folder2/view.pb.dart';
|
||||
import 'package:appflowy_editor/appflowy_editor.dart';
|
||||
import 'package:dartz/dartz.dart' as dartz;
|
||||
import 'package:flowy_infra/image.dart';
|
||||
import 'package:flowy_infra_ui/style_widget/button.dart';
|
||||
import 'package:flowy_infra_ui/style_widget/text.dart';
|
||||
@ -66,16 +65,16 @@ class _LinkToPageMenuState extends State<LinkToPageMenu> {
|
||||
EditorStyle get style => widget.editorState.editorStyle;
|
||||
int _selectedIndex = 0;
|
||||
int _totalItems = 0;
|
||||
Future<List<dartz.Tuple2<ViewPB, List<ViewPB>>>>? _availableLayout;
|
||||
final Map<int, dartz.Tuple2<ViewPB, ViewPB>> _items = {};
|
||||
Future<List<(ViewPB, List<ViewPB>)>>? _availableLayout;
|
||||
final Map<int, (ViewPB, ViewPB)> _items = {};
|
||||
|
||||
Future<List<dartz.Tuple2<ViewPB, List<ViewPB>>>> fetchItems() async {
|
||||
Future<List<(ViewPB, List<ViewPB>)>> fetchItems() async {
|
||||
final items = await AppBackendService().fetchViews(widget.layoutType);
|
||||
|
||||
int index = 0;
|
||||
for (final app in items) {
|
||||
for (final view in app.value2) {
|
||||
_items.putIfAbsent(index, () => dartz.Tuple2(app.value1, view));
|
||||
for (final (app, children) in items) {
|
||||
for (final view in children) {
|
||||
_items.putIfAbsent(index, () => (app, view));
|
||||
index += 1;
|
||||
}
|
||||
}
|
||||
@ -158,8 +157,8 @@ class _LinkToPageMenuState extends State<LinkToPageMenu> {
|
||||
newSelectedIndex %= _totalItems;
|
||||
} else if (event.logicalKey == LogicalKeyboardKey.enter) {
|
||||
widget.onSelected(
|
||||
_items[_selectedIndex]!.value1,
|
||||
_items[_selectedIndex]!.value2,
|
||||
_items[_selectedIndex]!.$1,
|
||||
_items[_selectedIndex]!.$2,
|
||||
);
|
||||
}
|
||||
|
||||
@ -173,15 +172,15 @@ class _LinkToPageMenuState extends State<LinkToPageMenu> {
|
||||
Widget _buildListWidget(
|
||||
BuildContext context,
|
||||
int selectedIndex,
|
||||
Future<List<dartz.Tuple2<ViewPB, List<ViewPB>>>>? items,
|
||||
Future<List<(ViewPB, List<ViewPB>)>>? items,
|
||||
) {
|
||||
int index = 0;
|
||||
return FutureBuilder<List<dartz.Tuple2<ViewPB, List<ViewPB>>>>(
|
||||
return FutureBuilder<List<(ViewPB, List<ViewPB>)>>(
|
||||
builder: (context, snapshot) {
|
||||
if (snapshot.hasData &&
|
||||
snapshot.connectionState == ConnectionState.done) {
|
||||
final views = snapshot.data;
|
||||
final children = <Widget>[
|
||||
final List<Widget> children = [
|
||||
Padding(
|
||||
padding: const EdgeInsets.symmetric(vertical: 4),
|
||||
child: FlowyText.regular(
|
||||
@ -191,18 +190,20 @@ class _LinkToPageMenuState extends State<LinkToPageMenu> {
|
||||
),
|
||||
),
|
||||
];
|
||||
|
||||
if (views != null && views.isNotEmpty) {
|
||||
for (final view in views) {
|
||||
if (view.value2.isNotEmpty) {
|
||||
for (final (view, viewChildren) in views) {
|
||||
if (viewChildren.isNotEmpty) {
|
||||
children.add(
|
||||
Padding(
|
||||
padding: const EdgeInsets.symmetric(vertical: 4),
|
||||
child: FlowyText.regular(
|
||||
view.value1.name,
|
||||
view.name,
|
||||
),
|
||||
),
|
||||
);
|
||||
for (final value in view.value2) {
|
||||
|
||||
for (final value in viewChildren) {
|
||||
children.add(
|
||||
FlowyButton(
|
||||
isSelected: index == _selectedIndex,
|
||||
@ -211,7 +212,7 @@ class _LinkToPageMenuState extends State<LinkToPageMenu> {
|
||||
color: Theme.of(context).iconTheme.color,
|
||||
),
|
||||
text: FlowyText.regular(value.name),
|
||||
onTap: () => widget.onSelected(view.value1, value),
|
||||
onTap: () => widget.onSelected(view, value),
|
||||
),
|
||||
);
|
||||
|
||||
|
@ -4,7 +4,6 @@ import 'package:flowy_infra_ui/style_widget/text.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:appflowy/generated/locale_keys.g.dart';
|
||||
import 'package:flutter_bloc/flutter_bloc.dart';
|
||||
import 'package:tuple/tuple.dart';
|
||||
import 'package:easy_localization/easy_localization.dart';
|
||||
|
||||
class FontSizeSwitcher extends StatefulWidget {
|
||||
@ -17,10 +16,10 @@ class FontSizeSwitcher extends StatefulWidget {
|
||||
}
|
||||
|
||||
class _FontSizeSwitcherState extends State<FontSizeSwitcher> {
|
||||
final List<Tuple3<String, double, bool>> _fontSizes = [
|
||||
Tuple3(LocaleKeys.moreAction_small.tr(), 14.0, false),
|
||||
Tuple3(LocaleKeys.moreAction_medium.tr(), 18.0, true),
|
||||
Tuple3(LocaleKeys.moreAction_large.tr(), 22.0, false),
|
||||
final List<(String, double, bool)> _fontSizes = [
|
||||
(LocaleKeys.moreAction_small.tr(), 14.0, false),
|
||||
(LocaleKeys.moreAction_medium.tr(), 18.0, true),
|
||||
(LocaleKeys.moreAction_large.tr(), 22.0, false),
|
||||
];
|
||||
|
||||
@override
|
||||
@ -42,9 +41,9 @@ class _FontSizeSwitcherState extends State<FontSizeSwitcher> {
|
||||
),
|
||||
ToggleButtons(
|
||||
isSelected:
|
||||
_fontSizes.map((e) => e.item2 == state.fontSize).toList(),
|
||||
_fontSizes.map((e) => e.$2 == state.fontSize).toList(),
|
||||
onPressed: (int index) {
|
||||
_updateSelectedFontSize(_fontSizes[index].item2);
|
||||
_updateSelectedFontSize(_fontSizes[index].$2);
|
||||
},
|
||||
color: foregroundColor,
|
||||
borderRadius: const BorderRadius.all(Radius.circular(5)),
|
||||
@ -63,8 +62,8 @@ class _FontSizeSwitcherState extends State<FontSizeSwitcher> {
|
||||
children: _fontSizes
|
||||
.map(
|
||||
(e) => Text(
|
||||
e.item1,
|
||||
style: TextStyle(fontSize: e.item2),
|
||||
e.$1,
|
||||
style: TextStyle(fontSize: e.$2),
|
||||
),
|
||||
)
|
||||
.toList(),
|
||||
|
@ -273,9 +273,9 @@ class OrContinueWith extends StatelessWidget {
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Row(
|
||||
return const Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
|
||||
children: const [
|
||||
children: [
|
||||
Flexible(
|
||||
child: Divider(
|
||||
color: Colors.white,
|
||||
|
@ -178,8 +178,8 @@ class _SkipLoginMoveWindow extends StatelessWidget
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Row(
|
||||
children: const [
|
||||
return const Row(
|
||||
children: [
|
||||
Expanded(
|
||||
child: MoveWindowDetector(),
|
||||
),
|
||||
|
@ -85,10 +85,10 @@ class AppBackendService {
|
||||
return FolderEventMoveItem(payload).send();
|
||||
}
|
||||
|
||||
Future<List<Tuple2<ViewPB, List<ViewPB>>>> fetchViews(
|
||||
Future<List<(ViewPB, List<ViewPB>)>> fetchViews(
|
||||
ViewLayoutPB layoutType,
|
||||
) async {
|
||||
final result = <Tuple2<ViewPB, List<ViewPB>>>[];
|
||||
final result = <(ViewPB, List<ViewPB>)>[];
|
||||
return FolderEventReadCurrentWorkspace().send().then((value) async {
|
||||
final workspaces = value.getLeftOrNull<WorkspaceSettingPB>();
|
||||
if (workspaces != null) {
|
||||
@ -101,7 +101,7 @@ class AppBackendService {
|
||||
.toList(),
|
||||
);
|
||||
if (childViews != null && childViews.isNotEmpty) {
|
||||
result.add(Tuple2(view, childViews));
|
||||
result.add((view, childViews));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -100,7 +100,7 @@ class FadingIndexedStackState extends State<FadingIndexedStack> {
|
||||
}
|
||||
}
|
||||
|
||||
abstract class NavigationItem {
|
||||
abstract mixin class NavigationItem {
|
||||
Widget get leftBarItem;
|
||||
Widget? get rightBarItem => null;
|
||||
|
||||
|
@ -108,15 +108,10 @@ class _DebugToast {
|
||||
|
||||
Future<String> _getDeviceInfo() async {
|
||||
final deviceInfoPlugin = DeviceInfoPlugin();
|
||||
final deviceInfo = deviceInfoPlugin.deviceInfo;
|
||||
final deviceInfo = await deviceInfoPlugin.deviceInfo;
|
||||
|
||||
return deviceInfo.then((info) {
|
||||
var debugText = "";
|
||||
info.toMap().forEach((key, value) {
|
||||
debugText = "$debugText$key: $value\n";
|
||||
});
|
||||
return debugText;
|
||||
});
|
||||
return deviceInfo.data.entries
|
||||
.fold('', (prev, el) => "$prev${el.key}: ${el.value}");
|
||||
}
|
||||
|
||||
Future<String> _getDocumentPath() async {
|
||||
|
@ -6,7 +6,7 @@ description: Demonstrates how to use the appflowy_backend plugin.
|
||||
publish_to: 'none' # Remove this line if you wish to publish to pub.dev
|
||||
|
||||
environment:
|
||||
sdk: ">=2.7.0 <3.0.0"
|
||||
sdk: ">=2.12.0 <3.0.0"
|
||||
|
||||
dependencies:
|
||||
flutter:
|
||||
|
@ -8,7 +8,6 @@ import 'package:appflowy_backend/protobuf/flowy-net/network_state.pb.dart';
|
||||
import 'package:isolates/isolates.dart';
|
||||
import 'package:isolates/ports.dart';
|
||||
import 'package:ffi/ffi.dart';
|
||||
// ignore: unused_import
|
||||
import 'package:flutter/services.dart';
|
||||
import 'dart:async';
|
||||
import 'dart:typed_data';
|
||||
|
@ -1,17 +1,17 @@
|
||||
name: appflowy_backend
|
||||
description: A new flutter plugin project.
|
||||
version: 0.0.1
|
||||
homepage:
|
||||
homepage: https://appflowy.io
|
||||
publish_to: "none"
|
||||
|
||||
environment:
|
||||
sdk: ">=2.12.0-0 <3.0.0"
|
||||
sdk: ">=2.17.0-0 <3.0.0"
|
||||
flutter: ">=1.17.0"
|
||||
|
||||
dependencies:
|
||||
flutter:
|
||||
sdk: flutter
|
||||
ffi: ^2.0.1
|
||||
ffi: ^2.0.2
|
||||
isolates: ^3.0.3+8
|
||||
protobuf: ^2.0.0
|
||||
dartz: ^0.10.1
|
||||
|
@ -9,13 +9,21 @@ void main() {
|
||||
TestWidgetsFlutterBinding.ensureInitialized();
|
||||
|
||||
setUp(() {
|
||||
channel.setMockMethodCallHandler((MethodCall methodCall) async {
|
||||
return '42';
|
||||
});
|
||||
TestDefaultBinaryMessengerBinding.instance.defaultBinaryMessenger
|
||||
.setMockMethodCallHandler(
|
||||
channel,
|
||||
(MethodCall methodCall) async {
|
||||
return '42';
|
||||
},
|
||||
);
|
||||
});
|
||||
|
||||
tearDown(() {
|
||||
channel.setMockMethodCallHandler(null);
|
||||
TestDefaultBinaryMessengerBinding.instance.defaultBinaryMessenger
|
||||
.setMockMethodCallHandler(
|
||||
channel,
|
||||
null,
|
||||
);
|
||||
});
|
||||
|
||||
test('getPlatformVersion', () async {
|
||||
|
@ -8,13 +8,18 @@ void main() {
|
||||
TestWidgetsFlutterBinding.ensureInitialized();
|
||||
|
||||
setUp(() {
|
||||
channel.setMockMethodCallHandler((MethodCall methodCall) async {
|
||||
TestDefaultBinaryMessengerBinding.instance.defaultBinaryMessenger
|
||||
.setMockMethodCallHandler(channel, (MethodCall methodCall) async {
|
||||
return '42';
|
||||
});
|
||||
});
|
||||
|
||||
tearDown(() {
|
||||
channel.setMockMethodCallHandler(null);
|
||||
TestDefaultBinaryMessengerBinding.instance.defaultBinaryMessenger
|
||||
.setMockMethodCallHandler(
|
||||
channel,
|
||||
null,
|
||||
);
|
||||
});
|
||||
|
||||
test('getPlatformVersion', () async {
|
||||
|
@ -78,11 +78,11 @@ class _MyHomePageState extends State<MyHomePage> {
|
||||
direction: PopoverDirection.topWithLeftAligned,
|
||||
),
|
||||
]),
|
||||
Expanded(
|
||||
const Expanded(
|
||||
child: Column(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: <Widget>[
|
||||
const ExampleButton(
|
||||
children: [
|
||||
ExampleButton(
|
||||
label: "Top",
|
||||
offset: Offset(0, 10),
|
||||
direction: PopoverDirection.bottomWithCenterAligned,
|
||||
@ -91,7 +91,7 @@ class _MyHomePageState extends State<MyHomePage> {
|
||||
child: Column(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
crossAxisAlignment: CrossAxisAlignment.center,
|
||||
children: const [
|
||||
children: [
|
||||
ExampleButton(
|
||||
label: "Central",
|
||||
offset: Offset(0, 10),
|
||||
@ -100,7 +100,7 @@ class _MyHomePageState extends State<MyHomePage> {
|
||||
],
|
||||
),
|
||||
),
|
||||
const ExampleButton(
|
||||
ExampleButton(
|
||||
label: "Bottom",
|
||||
offset: Offset(0, -10),
|
||||
direction: PopoverDirection.topWithCenterAligned,
|
||||
@ -108,15 +108,15 @@ class _MyHomePageState extends State<MyHomePage> {
|
||||
],
|
||||
),
|
||||
),
|
||||
Column(
|
||||
const Column(
|
||||
children: [
|
||||
const ExampleButton(
|
||||
ExampleButton(
|
||||
label: "Right top",
|
||||
offset: Offset(0, 10),
|
||||
direction: PopoverDirection.bottomWithRightAligned,
|
||||
),
|
||||
Expanded(child: Container()),
|
||||
const ExampleButton(
|
||||
Expanded(child: SizedBox.shrink()),
|
||||
ExampleButton(
|
||||
label: "Right bottom",
|
||||
offset: Offset(0, -10),
|
||||
direction: PopoverDirection.topWithRightAligned,
|
||||
|
@ -1,11 +1,11 @@
|
||||
name: appflowy_popover
|
||||
description: A new Flutter package project.
|
||||
version: 0.0.1
|
||||
homepage:
|
||||
homepage: https://appflowy.io
|
||||
|
||||
environment:
|
||||
sdk: ">=2.19.0 <3.0.0"
|
||||
flutter: ">=3.7.0"
|
||||
sdk: ">=3.0.0 <4.0.0"
|
||||
flutter: ">=3.10.1"
|
||||
|
||||
dependencies:
|
||||
flutter:
|
||||
|
@ -1,19 +1,18 @@
|
||||
name: flowy_infra
|
||||
description: A new Flutter package project.
|
||||
version: 0.0.1
|
||||
homepage:
|
||||
homepage: https://appflowy.io
|
||||
|
||||
environment:
|
||||
sdk: ">=2.18.0 <3.0.0"
|
||||
flutter: ">=3.3.0"
|
||||
sdk: ">=3.0.0 <4.0.0"
|
||||
flutter: ">=3.10.1"
|
||||
|
||||
dependencies:
|
||||
flutter:
|
||||
sdk: flutter
|
||||
time: '>=2.0.0'
|
||||
uuid: ">=2.2.2"
|
||||
textstyle_extensions: '2.0.0-nullsafety'
|
||||
flutter_svg: ^2.0.2
|
||||
flutter_svg: ^2.0.6
|
||||
|
||||
dev_dependencies:
|
||||
flutter_test:
|
||||
|
@ -73,7 +73,7 @@ TransitionBuilder overlayManagerBuilder() {
|
||||
};
|
||||
}
|
||||
|
||||
abstract class FlowyOverlayDelegate {
|
||||
abstract mixin class FlowyOverlayDelegate {
|
||||
bool asBarrier() => false;
|
||||
void didRemove() => {};
|
||||
}
|
||||
|
@ -3,7 +3,6 @@ import 'dart:async';
|
||||
import 'package:flowy_infra/size.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter/services.dart';
|
||||
import 'package:textstyle_extensions/textstyle_extensions.dart';
|
||||
|
||||
class FlowyTextField extends StatefulWidget {
|
||||
final String hintText;
|
||||
@ -125,7 +124,7 @@ class FlowyTextFieldState extends State<FlowyTextField> {
|
||||
hintStyle: Theme.of(context)
|
||||
.textTheme
|
||||
.bodySmall!
|
||||
.textColor(Theme.of(context).hintColor),
|
||||
.copyWith(color: Theme.of(context).hintColor),
|
||||
suffixText: _suffixText(),
|
||||
counterText: "",
|
||||
focusedBorder: OutlineInputBorder(
|
||||
|
@ -3,7 +3,6 @@ import 'dart:math' as math;
|
||||
import 'package:flowy_infra/size.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter/services.dart';
|
||||
import 'package:textstyle_extensions/textstyle_extensions.dart';
|
||||
|
||||
class FlowyFormTextInput extends StatelessWidget {
|
||||
static EdgeInsets kDefaultTextInputPadding =
|
||||
@ -221,7 +220,7 @@ class StyledSearchTextInputState extends State<StyledSearchTextInput> {
|
||||
hintStyle: Theme.of(context)
|
||||
.textTheme
|
||||
.bodyMedium!
|
||||
.textColor(Theme.of(context).hintColor),
|
||||
.copyWith(color: Theme.of(context).hintColor),
|
||||
labelText: widget.label,
|
||||
),
|
||||
),
|
||||
|
@ -3,7 +3,6 @@ import 'package:flowy_infra_ui/widget/rounded_button.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flowy_infra/time/duration.dart';
|
||||
import 'package:flutter/services.dart';
|
||||
import 'package:textstyle_extensions/textstyle_extensions.dart';
|
||||
|
||||
class RoundedInputField extends StatefulWidget {
|
||||
final String? hintText;
|
||||
@ -131,7 +130,7 @@ class _RoundedInputFieldState extends State<RoundedInputField> {
|
||||
hintStyle: Theme.of(context)
|
||||
.textTheme
|
||||
.bodySmall!
|
||||
.textColor(Theme.of(context).hintColor),
|
||||
.copyWith(color: Theme.of(context).hintColor),
|
||||
suffixText: _suffixText(),
|
||||
counterText: "",
|
||||
enabledBorder: OutlineInputBorder(
|
||||
|
@ -1,25 +1,24 @@
|
||||
name: flowy_infra_ui
|
||||
description: A new flutter plugin project.
|
||||
version: 0.0.1
|
||||
homepage:
|
||||
homepage: https://appflowy.io
|
||||
publish_to: "none"
|
||||
|
||||
environment:
|
||||
sdk: ">=2.19.0 <3.0.0"
|
||||
flutter: ">=3.7.0"
|
||||
sdk: ">=3.0.0 <4.0.0"
|
||||
flutter: ">=3.10.1"
|
||||
|
||||
dependencies:
|
||||
flutter:
|
||||
sdk: flutter
|
||||
|
||||
# Thirdparty packages
|
||||
textstyle_extensions: "2.0.0-nullsafety"
|
||||
dartz:
|
||||
provider: ^6.0.1
|
||||
styled_widget: "^0.3.1"
|
||||
equatable: "^2.0.3"
|
||||
animations: ^2.0.0
|
||||
loading_indicator: ^3.0.1
|
||||
provider: ^6.0.5
|
||||
styled_widget: ^0.4.1
|
||||
equatable: ^2.0.5
|
||||
animations: ^2.0.7
|
||||
loading_indicator: ^3.1.0
|
||||
async:
|
||||
|
||||
# Federated Platform Interface
|
||||
|
@ -7,13 +7,18 @@ void main() {
|
||||
TestWidgetsFlutterBinding.ensureInitialized();
|
||||
|
||||
setUp(() {
|
||||
channel.setMockMethodCallHandler((MethodCall methodCall) async {
|
||||
TestDefaultBinaryMessengerBinding.instance.defaultBinaryMessenger
|
||||
.setMockMethodCallHandler(channel, (MethodCall methodCall) async {
|
||||
return '42';
|
||||
});
|
||||
});
|
||||
|
||||
tearDown(() {
|
||||
channel.setMockMethodCallHandler(null);
|
||||
TestDefaultBinaryMessengerBinding.instance.defaultBinaryMessenger
|
||||
.setMockMethodCallHandler(
|
||||
channel,
|
||||
null,
|
||||
);
|
||||
});
|
||||
|
||||
test('getPlatformVersion', () async {});
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -18,7 +18,7 @@ publish_to: "none" # Remove this line if you wish to publish to pub.dev
|
||||
version: 0.1.5
|
||||
|
||||
environment:
|
||||
sdk: ">=2.19.0 <3.0.0"
|
||||
sdk: ">=3.0.0 <4.0.0"
|
||||
|
||||
# Dependencies specify other packages that your package needs in order to work.
|
||||
# To automatically upgrade your package dependencies to the latest versions
|
||||
@ -42,72 +42,64 @@ dependencies:
|
||||
git:
|
||||
url: https://github.com/AppFlowy-IO/appflowy-board.git
|
||||
ref: a183c57
|
||||
# appflowy_editor: ^0.1.9
|
||||
appflowy_editor:
|
||||
# path: /Users/lucas.xu/Desktop/appflowy-editor
|
||||
git:
|
||||
url: https://github.com/LucasXu0/appflowy-editor.git
|
||||
ref: 09e91c
|
||||
url: https://github.com/AppFlowy-IO/appflowy-editor.git
|
||||
ref: 30ce149
|
||||
appflowy_popover:
|
||||
path: packages/appflowy_popover
|
||||
|
||||
# third party packages
|
||||
intl: ^0.17.0
|
||||
time: "^2.0.0"
|
||||
equatable: "^2.0.3"
|
||||
freezed_annotation: ^2.1.0
|
||||
get_it: "^7.1.3"
|
||||
flutter_bloc: "^8.0.1"
|
||||
intl: ^0.18.0
|
||||
time: ^2.1.3
|
||||
equatable: ^2.0.5
|
||||
freezed_annotation: ^2.2.0
|
||||
get_it: ^7.6.0
|
||||
flutter_bloc: ^8.1.3
|
||||
flutter_math_fork:
|
||||
git:
|
||||
url: https://github.com/LucasXu0/flutter_math_fork.git
|
||||
ref: master
|
||||
url: https://github.com/xazin/flutter_math_fork.git
|
||||
ref: de24059
|
||||
dartz: ^0.10.1
|
||||
provider: ^6.0.1
|
||||
path_provider: ^2.0.1
|
||||
sized_context: ^1.0.0+1
|
||||
styled_widget: "^0.3.1"
|
||||
provider: ^6.0.5
|
||||
path_provider: ^2.0.15
|
||||
sized_context: ^1.0.0+4
|
||||
styled_widget: ^0.4.1
|
||||
expandable: ^5.0.1
|
||||
flutter_colorpicker: ^1.0.3
|
||||
highlight: ^0.7.0
|
||||
package_info_plus: ^1.3.0
|
||||
url_launcher: ^6.0.2
|
||||
# file_picker: ^4.2.1
|
||||
package_info_plus: ^4.0.1
|
||||
url_launcher: ^6.1.11
|
||||
clipboard: ^0.1.3
|
||||
connectivity_plus: ^3.0.3
|
||||
connectivity_plus: ^4.0.1
|
||||
connectivity_plus_platform_interface: ^1.2.2
|
||||
easy_localization: ^3.0.0
|
||||
easy_localization: ^3.0.2
|
||||
textfield_tags: ^2.0.2
|
||||
# The following adds the Cupertino Icons font to your application.
|
||||
# Use with the CupertinoIcons class for iOS style icons.
|
||||
cupertino_icons: ^1.0.2
|
||||
device_info_plus: ^4.0.0
|
||||
fluttertoast: ^8.0.9
|
||||
table_calendar: ^3.0.5
|
||||
device_info_plus: ^9.0.1
|
||||
fluttertoast: ^8.2.2
|
||||
json_annotation: ^4.8.1
|
||||
table_calendar: ^3.0.9
|
||||
reorderables: ^0.6.0
|
||||
linked_scroll_controller: ^0.2.0
|
||||
hotkey_manager: ^0.1.7
|
||||
fixnum: ^1.0.1
|
||||
tuple: ^2.0.0
|
||||
fixnum: ^1.1.0
|
||||
protobuf: "2.0.0"
|
||||
charcode: ^1.3.1
|
||||
collection: ^1.16.0
|
||||
bloc: ^8.1.0
|
||||
textstyle_extensions: "2.0.0-nullsafety"
|
||||
shared_preferences: ^2.0.15
|
||||
google_fonts: ^4.0.3
|
||||
file_picker: <=5.0.0
|
||||
percent_indicator: ^4.0.1
|
||||
calendar_view: ^1.0.1
|
||||
window_manager: ^0.3.0
|
||||
http: ^0.13.5
|
||||
json_annotation: ^4.7.0
|
||||
path: ^1.8.2
|
||||
collection: ^1.17.1
|
||||
bloc: ^8.1.2
|
||||
shared_preferences: ^2.1.1
|
||||
google_fonts: ^4.0.5
|
||||
file_picker: ^5.3.1
|
||||
percent_indicator: ^4.2.3
|
||||
calendar_view: ^1.0.3
|
||||
window_manager: ^0.3.4
|
||||
http: ^1.0.0
|
||||
path: ^1.8.3
|
||||
mocktail: ^0.3.0
|
||||
archive: ^3.3.0
|
||||
flutter_svg: ^2.0.5
|
||||
archive: ^3.3.7
|
||||
flutter_svg: ^2.0.6
|
||||
nanoid: ^1.0.0
|
||||
supabase_flutter: ^1.9.1
|
||||
supabase_flutter: ^1.10.0
|
||||
envied: ^0.3.0+3
|
||||
|
||||
dev_dependencies:
|
||||
@ -117,12 +109,15 @@ dev_dependencies:
|
||||
sdk: flutter
|
||||
integration_test:
|
||||
sdk: flutter
|
||||
build_runner: ^2.3.3
|
||||
freezed: ^2.1.0+1
|
||||
bloc_test: ^9.0.2
|
||||
json_serializable: ^6.5.4
|
||||
build_runner: ^2.4.4
|
||||
freezed: ^2.3.4
|
||||
bloc_test: ^9.1.2
|
||||
json_serializable: ^6.7.0
|
||||
envied_generator: ^0.3.0+3
|
||||
|
||||
dependency_overrides:
|
||||
http: ^1.0.0
|
||||
|
||||
# The "flutter_lints" package below contains a set of recommended lints to
|
||||
# encourage good coding practices. The lint set provided by the package is
|
||||
# activated in the `analysis_options.yaml` file located at the root of your
|
||||
|
@ -102,8 +102,9 @@ class AppFlowyUnitTest {
|
||||
void _pathProviderInitialized() {
|
||||
const MethodChannel channel =
|
||||
MethodChannel('plugins.flutter.io/path_provider');
|
||||
channel.setMockMethodCallHandler((MethodCall methodCall) async {
|
||||
return ".";
|
||||
TestDefaultBinaryMessengerBinding.instance.defaultBinaryMessenger
|
||||
.setMockMethodCallHandler(channel, (MethodCall methodCall) async {
|
||||
return '.';
|
||||
});
|
||||
}
|
||||
|
||||
|
@ -38,7 +38,7 @@ RUN source ~/.cargo/env && \
|
||||
RUN sudo pacman -S --noconfirm git tar gtk3
|
||||
RUN curl -sSfL \
|
||||
--output flutter.tar.xz \
|
||||
https://storage.googleapis.com/flutter_infra_release/releases/stable/linux/flutter_linux_3.7.5-stable.tar.xz && \
|
||||
https://storage.googleapis.com/flutter_infra_release/releases/stable/linux/flutter_linux_3.10.1-stable.tar.xz && \
|
||||
tar -xf flutter.tar.xz && \
|
||||
rm flutter.tar.xz
|
||||
RUN flutter config --enable-linux-desktop
|
||||
|
@ -1,5 +1,5 @@
|
||||
echo 'Generating language files'
|
||||
cd appflowy_flutter
|
||||
|
||||
call flutter pub run easy_localization:generate -S assets/translations/
|
||||
call flutter pub run easy_localization:generate -f keys -o locale_keys.g.dart -S assets/translations/ -s en.json
|
||||
call dart run easy_localization:generate -S assets/translations/
|
||||
call dart run easy_localization:generate -f keys -o locale_keys.g.dart -S assets/translations/ -s en.json
|
@ -2,5 +2,5 @@
|
||||
#!/usr/bin/env fish
|
||||
echo 'Generating language files'
|
||||
cd appflowy_flutter
|
||||
flutter pub run easy_localization:generate -S assets/translations/
|
||||
flutter pub run easy_localization:generate -f keys -o locale_keys.g.dart -S assets/translations -s en.json
|
||||
dart run easy_localization:generate -S assets/translations/
|
||||
dart run easy_localization:generate -f keys -o locale_keys.g.dart -S assets/translations -s en.json
|
||||
|
@ -38,9 +38,9 @@ fi
|
||||
printMessage "Setting up Flutter"
|
||||
# Get the current Flutter version
|
||||
FLUTTER_VERSION=$(flutter --version | grep -oP 'Flutter \K\S+')
|
||||
# Check if the current version is 3.7.5
|
||||
if [ "$FLUTTER_VERSION" = "3.7.5" ]; then
|
||||
echo "Flutter version is already 3.7.5"
|
||||
# Check if the current version is 3.10.1
|
||||
if [ "$FLUTTER_VERSION" = "3.10.1" ]; then
|
||||
echo "Flutter version is already 3.10.1"
|
||||
else
|
||||
# Get the path to the Flutter SDK
|
||||
FLUTTER_PATH=$(which flutter)
|
||||
@ -49,12 +49,12 @@ else
|
||||
current_dir=$(pwd)
|
||||
|
||||
cd $FLUTTER_PATH
|
||||
# Use git to checkout version 3.7.5 of Flutter
|
||||
git checkout 3.7.5
|
||||
# Use git to checkout version 3.10.1 of Flutter
|
||||
git checkout 3.10.1
|
||||
# Get back to current working directory
|
||||
cd "$current_dir"
|
||||
|
||||
echo "Switched to Flutter version 3.7.5"
|
||||
echo "Switched to Flutter version 3.10.1"
|
||||
fi
|
||||
|
||||
# Enable linux desktop
|
||||
|
@ -41,9 +41,9 @@ printMessage "Setting up Flutter"
|
||||
|
||||
# Get the current Flutter version
|
||||
FLUTTER_VERSION=$(flutter --version | grep -oE 'Flutter [^ ]+' | grep -oE '[^ ]+$')
|
||||
# Check if the current version is 3.7.5
|
||||
if [ "$FLUTTER_VERSION" = "3.7.5" ]; then
|
||||
echo "Flutter version is already 3.7.5"
|
||||
# Check if the current version is 3.10.1
|
||||
if [ "$FLUTTER_VERSION" = "3.10.1" ]; then
|
||||
echo "Flutter version is already 3.10.1"
|
||||
else
|
||||
# Get the path to the Flutter SDK
|
||||
FLUTTER_PATH=$(which flutter)
|
||||
@ -52,12 +52,12 @@ else
|
||||
current_dir=$(pwd)
|
||||
|
||||
cd $FLUTTER_PATH
|
||||
# Use git to checkout version 3.7.5 of Flutter
|
||||
git checkout 3.7.5
|
||||
# Use git to checkout version 3.10.1 of Flutter
|
||||
git checkout 3.10.1
|
||||
# Get back to current working directory
|
||||
cd "$current_dir"
|
||||
|
||||
echo "Switched to Flutter version 3.7.5"
|
||||
echo "Switched to Flutter version 3.10.1"
|
||||
fi
|
||||
|
||||
# Enable linux desktop
|
||||
|
@ -48,9 +48,9 @@ fi
|
||||
printMessage "Setting up Flutter"
|
||||
# Get the current Flutter version
|
||||
FLUTTER_VERSION=$(flutter --version | grep -oP 'Flutter \K\S+')
|
||||
# Check if the current version is 3.7.5
|
||||
if [ "$FLUTTER_VERSION" = "3.7.5" ]; then
|
||||
echo "Flutter version is already 3.7.5"
|
||||
# Check if the current version is 3.10.1
|
||||
if [ "$FLUTTER_VERSION" = "3.10.1" ]; then
|
||||
echo "Flutter version is already 3.10.1"
|
||||
else
|
||||
# Get the path to the Flutter SDK
|
||||
FLUTTER_PATH=$(which flutter)
|
||||
@ -59,12 +59,12 @@ else
|
||||
current_dir=$(pwd)
|
||||
|
||||
cd $FLUTTER_PATH
|
||||
# Use git to checkout version 3.7.5 of Flutter
|
||||
git checkout 3.7.5
|
||||
# Use git to checkout version 3.10.1 of Flutter
|
||||
git checkout 3.10.1
|
||||
# Get back to current working directory
|
||||
cd "$current_dir"
|
||||
|
||||
echo "Switched to Flutter version 3.7.5"
|
||||
echo "Switched to Flutter version 3.10.1"
|
||||
fi
|
||||
|
||||
# Add pub cache and cargo to PATH
|
||||
|
@ -189,8 +189,8 @@ script = [
|
||||
cd appflowy_flutter
|
||||
flutter clean
|
||||
flutter packages pub get
|
||||
flutter packages pub run easy_localization:generate -S assets/translations/ -f keys -o locale_keys.g.dart -S assets/translations -s en.json
|
||||
flutter packages pub run build_runner build --delete-conflicting-outputs
|
||||
dart run easy_localization:generate -S assets/translations/ -f keys -o locale_keys.g.dart -S assets/translations -s en.json
|
||||
dart run build_runner build -d
|
||||
""",
|
||||
]
|
||||
|
||||
@ -201,8 +201,8 @@ script = [
|
||||
cd ./appflowy_flutter/
|
||||
exec cmd.exe /c flutter clean
|
||||
exec cmd.exe /c flutter packages pub get
|
||||
exec cmd.exe /c flutter packages pub run easy_localization:generate -S assets/translations/ -f keys -o locale_keys.g.dart -S assets/translations -s en.json
|
||||
exec cmd.exe /c flutter packages pub run build_runner build --delete-conflicting-outputs
|
||||
exec cmd.exe /c dart run easy_localization:generate -S assets/translations/ -f keys -o locale_keys.g.dart -S assets/translations -s en.json
|
||||
exec cmd.exe /c dart run build_runner build -d
|
||||
""",
|
||||
]
|
||||
|
||||
@ -211,8 +211,8 @@ script_runner = "@shell"
|
||||
script = [
|
||||
"""
|
||||
cd appflowy_flutter
|
||||
flutter packages pub run easy_localization:generate -S assets/translations/ -f keys -o locale_keys.g.dart -S assets/translations -s en.json
|
||||
flutter packages pub run build_runner build --delete-conflicting-outputs
|
||||
dart run easy_localization:generate -S assets/translations/ -f keys -o locale_keys.g.dart -S assets/translations -s en.json
|
||||
dart run build_runner build -d
|
||||
""",
|
||||
]
|
||||
|
||||
@ -221,7 +221,7 @@ script_runner = "@duckscript"
|
||||
script = [
|
||||
"""
|
||||
cd ./appflowy_flutter/
|
||||
exec cmd.exe /c flutter packages pub run easy_localization:generate -S assets/translations/ -f keys -o locale_keys.g.dart -S assets/translations -s en.json
|
||||
exec cmd.exe /c flutter packages pub run build_runner build --delete-conflicting-outputs
|
||||
exec cmd.exe /c dart run easy_localization:generate -S assets/translations/ -f keys -o locale_keys.g.dart -S assets/translations -s en.json
|
||||
exec cmd.exe /c dart run build_runner build -d
|
||||
""",
|
||||
]
|
||||
|
Loading…
Reference in New Issue
Block a user