fix: padding issue with the select tags (#3929)

* fix: padding issue with the select tags

* chore: better solution from Lucas
This commit is contained in:
Richard Shiue 2023-11-13 21:41:25 +08:00 committed by GitHub
parent 7de2131431
commit e788c71602
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 10 additions and 8 deletions

View File

@ -3,10 +3,8 @@ import 'package:appflowy_backend/protobuf/flowy-database2/select_option.pb.dart'
import 'package:flowy_infra/theme_extension.dart';
import 'package:flowy_infra/size.dart';
import 'package:flowy_infra_ui/flowy_infra_ui.dart';
import 'package:flowy_infra_ui/style_widget/hover.dart';
import 'package:flowy_infra_ui/style_widget/icon_button.dart';
import 'package:flowy_infra_ui/style_widget/text.dart';
import 'package:flowy_infra_ui/widget/spacing.dart';
import 'package:flutter/material.dart';
import 'package:easy_localization/easy_localization.dart';
import 'package:appflowy/generated/locale_keys.g.dart';
@ -93,7 +91,7 @@ class SelectOptionTag extends StatelessWidget {
@override
Widget build(BuildContext context) {
EdgeInsets padding =
const EdgeInsets.symmetric(vertical: 1.5, horizontal: 8.0);
const EdgeInsets.symmetric(vertical: 2, horizontal: 8.0);
if (onRemove != null) {
padding = padding.copyWith(right: 2.0);
}

View File

@ -1,3 +1,5 @@
import 'dart:io';
import 'package:flutter/material.dart';
class FlowyText extends StatelessWidget {
@ -89,10 +91,12 @@ class FlowyText extends StatelessWidget {
maxLines: maxLines,
textAlign: textAlign,
overflow: overflow ?? TextOverflow.clip,
textHeightBehavior: const TextHeightBehavior(
applyHeightToFirstAscent: false,
applyHeightToLastDescent: false,
),
textHeightBehavior: Platform.isAndroid || Platform.isIOS
? const TextHeightBehavior(
applyHeightToFirstAscent: false,
applyHeightToLastDescent: false,
)
: null,
style: Theme.of(context).textTheme.bodyMedium!.copyWith(
fontSize: fontSize,
fontWeight: fontWeight,