From 61df3848e4db5c17621394b67a6a26dcf3f0011f Mon Sep 17 00:00:00 2001 From: appflowy Date: Tue, 9 Aug 2022 10:03:42 +0800 Subject: [PATCH] chore: update appflowy_board pub.dev config --- .../packages/appflowy_board/CHANGELOG.md | 3 ++ .../packages/appflowy_board/README.md | 2 +- .../example/lib/multi_board_list_example.dart | 35 ++++++++++--------- .../src/widgets/reorder_flex/drag_target.dart | 2 +- .../widgets/reorder_flex/reorder_flex.dart | 8 ++--- .../packages/appflowy_board/pubspec.yaml | 6 ++-- 6 files changed, 30 insertions(+), 26 deletions(-) diff --git a/frontend/app_flowy/packages/appflowy_board/CHANGELOG.md b/frontend/app_flowy/packages/appflowy_board/CHANGELOG.md index 7cf059202f..76f33711b1 100644 --- a/frontend/app_flowy/packages/appflowy_board/CHANGELOG.md +++ b/frontend/app_flowy/packages/appflowy_board/CHANGELOG.md @@ -1,3 +1,6 @@ +# 0.0.4 +* fix some bugs + # 0.0.3 * Support customize UI * Update example diff --git a/frontend/app_flowy/packages/appflowy_board/README.md b/frontend/app_flowy/packages/appflowy_board/README.md index 893bc3ed64..b33c4d7883 100644 --- a/frontend/app_flowy/packages/appflowy_board/README.md +++ b/frontend/app_flowy/packages/appflowy_board/README.md @@ -7,7 +7,7 @@ The **appflowy_board** is a package that is used in [AppFlowy](https://github.co ## Getting Started

- +

```dart diff --git a/frontend/app_flowy/packages/appflowy_board/example/lib/multi_board_list_example.dart b/frontend/app_flowy/packages/appflowy_board/example/lib/multi_board_list_example.dart index 3edb32c3bf..d692a6fe20 100644 --- a/frontend/app_flowy/packages/appflowy_board/example/lib/multi_board_list_example.dart +++ b/frontend/app_flowy/packages/appflowy_board/example/lib/multi_board_list_example.dart @@ -99,22 +99,25 @@ class _MultiBoardListExampleState extends State { } if (item is RichTextItem) { - return Padding( - padding: const EdgeInsets.all(20), - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Text( - item.title, - style: const TextStyle(fontSize: 14), - textAlign: TextAlign.left, - ), - const SizedBox(height: 10), - Text( - item.subtitle, - style: const TextStyle(fontSize: 12, color: Colors.grey), - ) - ], + return Align( + alignment: Alignment.centerLeft, + child: Padding( + padding: const EdgeInsets.all(20), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Text( + item.title, + style: const TextStyle(fontSize: 14), + textAlign: TextAlign.left, + ), + const SizedBox(height: 10), + Text( + item.subtitle, + style: const TextStyle(fontSize: 12, color: Colors.grey), + ) + ], + ), ), ); } diff --git a/frontend/app_flowy/packages/appflowy_board/lib/src/widgets/reorder_flex/drag_target.dart b/frontend/app_flowy/packages/appflowy_board/lib/src/widgets/reorder_flex/drag_target.dart index ea8cc91fab..a6a09a9770 100644 --- a/frontend/app_flowy/packages/appflowy_board/lib/src/widgets/reorder_flex/drag_target.dart +++ b/frontend/app_flowy/packages/appflowy_board/lib/src/widgets/reorder_flex/drag_target.dart @@ -187,7 +187,7 @@ class _ReorderDragTargetState clipBehavior: Clip.hardEdge, child: ConstrainedBox( constraints: constraints, - child: Opacity(opacity: 0.6, child: child), + child: Opacity(opacity: 0.3, child: child), ), ), ); diff --git a/frontend/app_flowy/packages/appflowy_board/lib/src/widgets/reorder_flex/reorder_flex.dart b/frontend/app_flowy/packages/appflowy_board/lib/src/widgets/reorder_flex/reorder_flex.dart index 6354b25c33..27af28d778 100644 --- a/frontend/app_flowy/packages/appflowy_board/lib/src/widgets/reorder_flex/reorder_flex.dart +++ b/frontend/app_flowy/packages/appflowy_board/lib/src/widgets/reorder_flex/reorder_flex.dart @@ -33,7 +33,7 @@ abstract class ReoderFlexItem { class ReorderFlexConfig { /// The opacity of the dragging widget - final double draggingWidgetOpacity = 0.2; + final double draggingWidgetOpacity = 0.3; // How long an animation to reorder an element final Duration reorderAnimationDuration = const Duration(milliseconds: 250); @@ -499,16 +499,14 @@ class ReorderFlexState extends State switch (widget.direction) { case Axis.horizontal: return Row( - mainAxisSize: MainAxisSize.min, - crossAxisAlignment: CrossAxisAlignment.stretch, + crossAxisAlignment: CrossAxisAlignment.start, mainAxisAlignment: widget.mainAxisAlignment, children: children, ); case Axis.vertical: default: return Column( - mainAxisSize: MainAxisSize.min, - crossAxisAlignment: CrossAxisAlignment.stretch, + crossAxisAlignment: CrossAxisAlignment.start, mainAxisAlignment: widget.mainAxisAlignment, children: children, ); diff --git a/frontend/app_flowy/packages/appflowy_board/pubspec.yaml b/frontend/app_flowy/packages/appflowy_board/pubspec.yaml index 92b1782ea0..962fc8be80 100644 --- a/frontend/app_flowy/packages/appflowy_board/pubspec.yaml +++ b/frontend/app_flowy/packages/appflowy_board/pubspec.yaml @@ -1,8 +1,8 @@ name: appflowy_board -description: A new Flutter package project. -version: 0.0.3 +description: AppFlowy board implementation. +version: 0.0.4 homepage: https://github.com/AppFlowy-IO/AppFlowy -repository: https://github.com/AppFlowy-IO/AppFlowy +repository: https://github.com/AppFlowy-IO/AppFlowy/tree/main/frontend/app_flowy/packages/appflowy_board environment: sdk: ">=2.17.0 <3.0.0"