fix: multi scrollview warning

This commit is contained in:
appflowy 2022-08-13 11:57:14 +08:00
parent 28e77ae68c
commit f6263f758f
6 changed files with 16 additions and 5 deletions

View File

@ -207,3 +207,8 @@ class BoardColumnItem extends AFColumnItem {
@override
String get id => row.id;
}
class CreateCardItem extends AFColumnItem {
@override
String get id => '$CreateCardItem';
}

View File

@ -89,8 +89,8 @@ class BoardDataController {
);
}
void createRow() {
_gridFFIService.createRow();
Future<Either<RowPB, FlowyError>> createRow() {
return _gridFFIService.createRow();
}
Future<void> dispose() async {

View File

@ -31,7 +31,7 @@ class BoardPluginBuilder implements PluginBuilder {
class BoardPluginConfig implements PluginConfig {
@override
bool get creatable => true;
bool get creatable => false;
}
class BoardPlugin extends Plugin {

View File

@ -54,10 +54,11 @@ class BoardContent extends StatelessWidget {
padding: const EdgeInsets.symmetric(vertical: 10, horizontal: 20),
child: AFBoard(
key: UniqueKey(),
scrollController: ScrollController(),
dataController: context.read<BoardBloc>().boardDataController,
headerBuilder: _buildHeader,
footBuilder: _buildFooter,
cardBuilder: _buildCard,
cardBuilder: (_, data) => _buildCard(context, data),
columnConstraints: const BoxConstraints.tightFor(width: 240),
config: AFBoardConfig(
columnBackgroundColor: HexColor.fromHex('#F7F8FC'),

View File

@ -3,6 +3,7 @@ import 'package:app_flowy/plugins/board/application/card/card_data_controller.da
import 'package:app_flowy/plugins/grid/application/cell/cell_service/cell_service.dart';
import 'package:flowy_infra/image.dart';
import 'package:flowy_infra/theme.dart';
import 'package:flowy_sdk/log.dart';
import 'package:flutter/material.dart';
import 'package:flutter_bloc/flutter_bloc.dart';
import 'card_cell_builder.dart';
@ -79,6 +80,6 @@ class _CardMoreOption extends StatelessWidget with CardAccessory {
@override
void onTap(BuildContext context) {
print('show options');
Log.debug('show options');
}
}

View File

@ -46,6 +46,8 @@ class AFBoard extends StatelessWidget {
///
final BoardPhantomController phantomController;
final ScrollController? scrollController;
final AFBoardConfig config;
AFBoard({
@ -54,6 +56,7 @@ class AFBoard extends StatelessWidget {
this.background,
this.footBuilder,
this.headerBuilder,
this.scrollController,
this.columnConstraints = const BoxConstraints(maxWidth: 200),
this.config = const AFBoardConfig(),
Key? key,
@ -69,6 +72,7 @@ class AFBoard extends StatelessWidget {
return BoardContent(
config: config,
dataController: dataController,
scrollController: scrollController,
background: background,
delegate: phantomController,
columnConstraints: columnConstraints,