mirror of
https://github.com/AppFlowy-IO/AppFlowy.git
synced 2025-07-23 09:01:21 +00:00
17 lines
460 B
Dart
Executable File
17 lines
460 B
Dart
Executable File
import 'package:app_flowy/plugins/grid/application/field/field_controller.dart';
|
|
import 'sizes.dart';
|
|
|
|
class GridLayout {
|
|
static double headerWidth(List<GridFieldContext> 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;
|
|
}
|
|
}
|