mirror of
https://github.com/AppFlowy-IO/AppFlowy.git
synced 2024-08-30 18:12:39 +00:00
feat: row count widget added
This commit is contained in:
parent
04b06659f4
commit
d955b6ef7e
1
frontend/app_flowy/.gitignore
vendored
1
frontend/app_flowy/.gitignore
vendored
@ -65,3 +65,4 @@ windows/flutter/dart_ffi/
|
||||
**/**/*.so
|
||||
**/**/Brewfile.lock.json
|
||||
**/.sandbox
|
||||
**/.vscode/
|
@ -1,14 +1,18 @@
|
||||
import 'package:app_flowy/startup/startup.dart';
|
||||
import 'package:app_flowy/workspace/application/grid/grid_bloc.dart';
|
||||
import 'package:app_flowy/workspace/application/grid/row/row_service.dart';
|
||||
import 'package:flowy_infra/size.dart';
|
||||
import 'package:flowy_infra/theme.dart';
|
||||
import 'package:flowy_infra_ui/style_widget/scrolling/styled_list.dart';
|
||||
import 'package:flowy_infra_ui/style_widget/scrolling/styled_scroll_bar.dart';
|
||||
import 'package:flowy_infra_ui/style_widget/scrolling/styled_scrollview.dart';
|
||||
import 'package:flowy_infra_ui/style_widget/text.dart';
|
||||
import 'package:flowy_infra_ui/widget/error_page.dart';
|
||||
import 'package:flowy_sdk/protobuf/flowy-folder/view.pb.dart';
|
||||
import 'package:flutter_bloc/flutter_bloc.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:linked_scroll_controller/linked_scroll_controller.dart';
|
||||
import 'package:provider/provider.dart';
|
||||
import 'controller/grid_scroll.dart';
|
||||
import 'layout/layout.dart';
|
||||
import 'layout/sizes.dart';
|
||||
@ -250,6 +254,8 @@ class _GridFooter extends StatelessWidget {
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
final rowCount = context.watch<GridBloc>().state.rowInfos.length;
|
||||
final theme = context.watch<AppTheme>();
|
||||
return SliverPadding(
|
||||
padding: const EdgeInsets.only(bottom: 200),
|
||||
sliver: SliverToBoxAdapter(
|
||||
@ -260,7 +266,14 @@ class _GridFooter extends StatelessWidget {
|
||||
child: Row(
|
||||
children: [
|
||||
SizedBox(width: GridSize.leadingHeaderPadding),
|
||||
Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
const SizedBox(width: 120, child: GridAddRowButton()),
|
||||
const SizedBox(height: 30),
|
||||
_rowCountTextWidget(theme: theme,count: rowCount)
|
||||
],
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
@ -268,4 +281,19 @@ class _GridFooter extends StatelessWidget {
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
Widget _rowCountTextWidget({required AppTheme theme, required int count}){
|
||||
return Row(
|
||||
mainAxisAlignment: MainAxisAlignment.start,
|
||||
children: [
|
||||
FlowyText.regular('Count : ',
|
||||
fontSize: 13,
|
||||
color: theme.shader3,
|
||||
),
|
||||
FlowyText.regular(count.toString(),
|
||||
fontSize: 13,
|
||||
),
|
||||
],
|
||||
);
|
||||
}
|
||||
}
|
||||
|
@ -5,7 +5,7 @@ class GridSize {
|
||||
|
||||
static double get scrollBarSize => 12 * scale;
|
||||
static double get headerHeight => 40 * scale;
|
||||
static double get footerHeight => 40 * scale;
|
||||
static double get footerHeight => 100 * scale;
|
||||
static double get leadingHeaderPadding => 50 * scale;
|
||||
static double get trailHeaderPadding => 140 * scale;
|
||||
static double get headerContainerPadding => 0 * scale;
|
||||
|
Loading…
Reference in New Issue
Block a user