mirror of
https://github.com/AppFlowy-IO/AppFlowy.git
synced 2025-07-26 18:39:52 +00:00
13 lines
411 B
Dart
Executable File
13 lines
411 B
Dart
Executable File
import 'package:flowy_sdk/protobuf/flowy-grid/field_entities.pb.dart';
|
|
import 'sizes.dart';
|
|
|
|
class GridLayout {
|
|
static double headerWidth(List<GridFieldPB> fields) {
|
|
if (fields.isEmpty) return 0;
|
|
|
|
final fieldsWidth = fields.map((field) => field.width.toDouble()).reduce((value, element) => value + element);
|
|
|
|
return fieldsWidth + GridSize.leadingHeaderPadding + GridSize.trailHeaderPadding;
|
|
}
|
|
}
|