mirror of
https://github.com/AppFlowy-IO/AppFlowy.git
synced 2024-08-30 18:12:39 +00:00
chore: use theme.of(context) text theme in FlowyText (#1463)
This commit is contained in:
@ -40,8 +40,7 @@ class BlankPagePlugin extends Plugin {
|
|||||||
|
|
||||||
class BlankPagePluginDisplay extends PluginDisplay with NavigationItem {
|
class BlankPagePluginDisplay extends PluginDisplay with NavigationItem {
|
||||||
@override
|
@override
|
||||||
Widget get leftBarItem =>
|
Widget get leftBarItem => FlowyText.medium(LocaleKeys.blankPageTitle.tr());
|
||||||
FlowyText.medium(LocaleKeys.blankPageTitle.tr(), fontSize: 12);
|
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget buildWidget(PluginContext context) => const BlankPage();
|
Widget buildWidget(PluginContext context) => const BlankPage();
|
||||||
|
@ -7,7 +7,6 @@ import 'package:app_flowy/plugins/grid/presentation/widgets/toolbar/grid_propert
|
|||||||
import 'package:appflowy_popover/appflowy_popover.dart';
|
import 'package:appflowy_popover/appflowy_popover.dart';
|
||||||
import 'package:easy_localization/easy_localization.dart';
|
import 'package:easy_localization/easy_localization.dart';
|
||||||
import 'package:flowy_infra/image.dart';
|
import 'package:flowy_infra/image.dart';
|
||||||
import 'package:flowy_infra/size.dart';
|
|
||||||
import 'package:flowy_infra_ui/style_widget/button.dart';
|
import 'package:flowy_infra_ui/style_widget/button.dart';
|
||||||
import 'package:flowy_infra_ui/style_widget/scrolling/styled_list.dart';
|
import 'package:flowy_infra_ui/style_widget/scrolling/styled_list.dart';
|
||||||
import 'package:flowy_infra_ui/style_widget/text.dart';
|
import 'package:flowy_infra_ui/style_widget/text.dart';
|
||||||
@ -105,10 +104,7 @@ class _SettingItem extends StatelessWidget {
|
|||||||
height: 30,
|
height: 30,
|
||||||
child: FlowyButton(
|
child: FlowyButton(
|
||||||
isSelected: isSelected,
|
isSelected: isSelected,
|
||||||
text: FlowyText.medium(
|
text: FlowyText.medium(action.title()),
|
||||||
action.title(),
|
|
||||||
fontSize: FontSizes.s12,
|
|
||||||
),
|
|
||||||
onTap: () {
|
onTap: () {
|
||||||
context
|
context
|
||||||
.read<BoardSettingBloc>()
|
.read<BoardSettingBloc>()
|
||||||
|
@ -91,7 +91,6 @@ class SelectOptionTag extends StatelessWidget {
|
|||||||
pressElevation: 1,
|
pressElevation: 1,
|
||||||
label: FlowyText.medium(
|
label: FlowyText.medium(
|
||||||
name,
|
name,
|
||||||
fontSize: 12,
|
|
||||||
overflow: TextOverflow.clip,
|
overflow: TextOverflow.clip,
|
||||||
),
|
),
|
||||||
selectedColor: color,
|
selectedColor: color,
|
||||||
|
@ -190,7 +190,6 @@ class _Title extends StatelessWidget {
|
|||||||
padding: const EdgeInsets.symmetric(horizontal: 6),
|
padding: const EdgeInsets.symmetric(horizontal: 6),
|
||||||
child: FlowyText.medium(
|
child: FlowyText.medium(
|
||||||
LocaleKeys.grid_selectOption_panelTitle.tr(),
|
LocaleKeys.grid_selectOption_panelTitle.tr(),
|
||||||
fontSize: 12,
|
|
||||||
color: Theme.of(context).hintColor,
|
color: Theme.of(context).hintColor,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
@ -208,7 +207,6 @@ class _CreateOptionCell extends StatelessWidget {
|
|||||||
children: [
|
children: [
|
||||||
FlowyText.medium(
|
FlowyText.medium(
|
||||||
LocaleKeys.grid_selectOption_create.tr(),
|
LocaleKeys.grid_selectOption_create.tr(),
|
||||||
fontSize: 12,
|
|
||||||
color: Theme.of(context).hintColor,
|
color: Theme.of(context).hintColor,
|
||||||
),
|
),
|
||||||
const HSpace(10),
|
const HSpace(10),
|
||||||
|
@ -174,7 +174,6 @@ class FieldCellButton extends StatelessWidget {
|
|||||||
),
|
),
|
||||||
text: FlowyText.medium(
|
text: FlowyText.medium(
|
||||||
text,
|
text,
|
||||||
fontSize: 12,
|
|
||||||
maxLines: maxLines,
|
maxLines: maxLines,
|
||||||
overflow: TextOverflow.ellipsis,
|
overflow: TextOverflow.ellipsis,
|
||||||
),
|
),
|
||||||
|
@ -78,7 +78,6 @@ class _EditFieldButton extends StatelessWidget {
|
|||||||
child: FlowyButton(
|
child: FlowyButton(
|
||||||
text: FlowyText.medium(
|
text: FlowyText.medium(
|
||||||
LocaleKeys.grid_field_editProperty.tr(),
|
LocaleKeys.grid_field_editProperty.tr(),
|
||||||
fontSize: 12,
|
|
||||||
),
|
),
|
||||||
onTap: onTap,
|
onTap: onTap,
|
||||||
),
|
),
|
||||||
@ -150,7 +149,6 @@ class FieldActionCell extends StatelessWidget {
|
|||||||
return FlowyButton(
|
return FlowyButton(
|
||||||
text: FlowyText.medium(
|
text: FlowyText.medium(
|
||||||
action.title(),
|
action.title(),
|
||||||
fontSize: 12,
|
|
||||||
color: enable ? null : Theme.of(context).disabledColor,
|
color: enable ? null : Theme.of(context).disabledColor,
|
||||||
),
|
),
|
||||||
onTap: () {
|
onTap: () {
|
||||||
|
@ -66,7 +66,6 @@ class _FieldEditorState extends State<FieldEditor> {
|
|||||||
children: [
|
children: [
|
||||||
FlowyText.medium(
|
FlowyText.medium(
|
||||||
LocaleKeys.grid_field_editProperty.tr(),
|
LocaleKeys.grid_field_editProperty.tr(),
|
||||||
fontSize: 12,
|
|
||||||
),
|
),
|
||||||
const VSpace(10),
|
const VSpace(10),
|
||||||
_FieldNameTextField(popoverMutex: popoverMutex),
|
_FieldNameTextField(popoverMutex: popoverMutex),
|
||||||
@ -223,7 +222,6 @@ class _DeleteFieldButton extends StatelessWidget {
|
|||||||
Widget button = FlowyButton(
|
Widget button = FlowyButton(
|
||||||
text: FlowyText.medium(
|
text: FlowyText.medium(
|
||||||
LocaleKeys.grid_field_delete.tr(),
|
LocaleKeys.grid_field_delete.tr(),
|
||||||
fontSize: 12,
|
|
||||||
color: enable ? null : Theme.of(context).disabledColor,
|
color: enable ? null : Theme.of(context).disabledColor,
|
||||||
),
|
),
|
||||||
onTap: () => onDeleted?.call(),
|
onTap: () => onDeleted?.call(),
|
||||||
|
@ -61,7 +61,7 @@ class FieldTypeCell extends StatelessWidget {
|
|||||||
return SizedBox(
|
return SizedBox(
|
||||||
height: GridSize.typeOptionItemHeight,
|
height: GridSize.typeOptionItemHeight,
|
||||||
child: FlowyButton(
|
child: FlowyButton(
|
||||||
text: FlowyText.medium(fieldType.title(), fontSize: 12),
|
text: FlowyText.medium(fieldType.title()),
|
||||||
onTap: () => onSelectField(fieldType),
|
onTap: () => onSelectField(fieldType),
|
||||||
leftIcon: svgWidget(
|
leftIcon: svgWidget(
|
||||||
fieldType.iconName(),
|
fieldType.iconName(),
|
||||||
|
@ -111,7 +111,6 @@ class _SwitchFieldButton extends StatelessWidget {
|
|||||||
return FlowyButton(
|
return FlowyButton(
|
||||||
text: FlowyText.medium(
|
text: FlowyText.medium(
|
||||||
bloc.state.field.fieldType.title(),
|
bloc.state.field.fieldType.title(),
|
||||||
fontSize: 12,
|
|
||||||
),
|
),
|
||||||
margin: const EdgeInsets.symmetric(horizontal: 6, vertical: 2),
|
margin: const EdgeInsets.symmetric(horizontal: 6, vertical: 2),
|
||||||
leftIcon: svgWidget(
|
leftIcon: svgWidget(
|
||||||
|
@ -178,10 +178,7 @@ class CreateFieldButton extends StatelessWidget {
|
|||||||
constraints: BoxConstraints.loose(const Size(240, 600)),
|
constraints: BoxConstraints.loose(const Size(240, 600)),
|
||||||
child: FlowyButton(
|
child: FlowyButton(
|
||||||
radius: BorderRadius.zero,
|
radius: BorderRadius.zero,
|
||||||
text: FlowyText.medium(
|
text: FlowyText.medium(LocaleKeys.grid_field_newColumn.tr()),
|
||||||
LocaleKeys.grid_field_newColumn.tr(),
|
|
||||||
fontSize: 12,
|
|
||||||
),
|
|
||||||
hoverColor: AFThemeExtension.of(context).lightGreyHover,
|
hoverColor: AFThemeExtension.of(context).lightGreyHover,
|
||||||
onTap: () {},
|
onTap: () {},
|
||||||
leftIcon: svgWidget(
|
leftIcon: svgWidget(
|
||||||
|
@ -122,8 +122,7 @@ class DateFormatButton extends StatelessWidget {
|
|||||||
return SizedBox(
|
return SizedBox(
|
||||||
height: GridSize.typeOptionItemHeight,
|
height: GridSize.typeOptionItemHeight,
|
||||||
child: FlowyButton(
|
child: FlowyButton(
|
||||||
text: FlowyText.medium(LocaleKeys.grid_field_dateFormat.tr(),
|
text: FlowyText.medium(LocaleKeys.grid_field_dateFormat.tr()),
|
||||||
fontSize: 12),
|
|
||||||
margin: GridSize.typeOptionContentInsets,
|
margin: GridSize.typeOptionContentInsets,
|
||||||
onTap: onTap,
|
onTap: onTap,
|
||||||
onHover: onHover,
|
onHover: onHover,
|
||||||
@ -149,8 +148,7 @@ class TimeFormatButton extends StatelessWidget {
|
|||||||
return SizedBox(
|
return SizedBox(
|
||||||
height: GridSize.typeOptionItemHeight,
|
height: GridSize.typeOptionItemHeight,
|
||||||
child: FlowyButton(
|
child: FlowyButton(
|
||||||
text: FlowyText.medium(LocaleKeys.grid_field_timeFormat.tr(),
|
text: FlowyText.medium(LocaleKeys.grid_field_timeFormat.tr()),
|
||||||
fontSize: 12),
|
|
||||||
margin: GridSize.typeOptionContentInsets,
|
margin: GridSize.typeOptionContentInsets,
|
||||||
onTap: onTap,
|
onTap: onTap,
|
||||||
onHover: onHover,
|
onHover: onHover,
|
||||||
@ -177,8 +175,7 @@ class _IncludeTimeButton extends StatelessWidget {
|
|||||||
padding: GridSize.typeOptionContentInsets,
|
padding: GridSize.typeOptionContentInsets,
|
||||||
child: Row(
|
child: Row(
|
||||||
children: [
|
children: [
|
||||||
FlowyText.medium(LocaleKeys.grid_field_includeTime.tr(),
|
FlowyText.medium(LocaleKeys.grid_field_includeTime.tr()),
|
||||||
fontSize: 12),
|
|
||||||
const Spacer(),
|
const Spacer(),
|
||||||
Toggle(
|
Toggle(
|
||||||
value: includeTime,
|
value: includeTime,
|
||||||
@ -254,7 +251,7 @@ class DateFormatCell extends StatelessWidget {
|
|||||||
return SizedBox(
|
return SizedBox(
|
||||||
height: GridSize.typeOptionItemHeight,
|
height: GridSize.typeOptionItemHeight,
|
||||||
child: FlowyButton(
|
child: FlowyButton(
|
||||||
text: FlowyText.medium(dateFormat.title(), fontSize: 12),
|
text: FlowyText.medium(dateFormat.title()),
|
||||||
rightIcon: checkmark,
|
rightIcon: checkmark,
|
||||||
onTap: () => onSelected(dateFormat),
|
onTap: () => onSelected(dateFormat),
|
||||||
),
|
),
|
||||||
@ -336,7 +333,7 @@ class TimeFormatCell extends StatelessWidget {
|
|||||||
return SizedBox(
|
return SizedBox(
|
||||||
height: GridSize.typeOptionItemHeight,
|
height: GridSize.typeOptionItemHeight,
|
||||||
child: FlowyButton(
|
child: FlowyButton(
|
||||||
text: FlowyText.medium(timeFormat.title(), fontSize: 12),
|
text: FlowyText.medium(timeFormat.title()),
|
||||||
rightIcon: checkmark,
|
rightIcon: checkmark,
|
||||||
onTap: () => onSelected(timeFormat),
|
onTap: () => onSelected(timeFormat),
|
||||||
),
|
),
|
||||||
|
@ -72,12 +72,10 @@ class NumberTypeOptionWidget extends TypeOptionWidget {
|
|||||||
),
|
),
|
||||||
text: Row(
|
text: Row(
|
||||||
children: [
|
children: [
|
||||||
FlowyText.medium(LocaleKeys.grid_field_numberFormat.tr(),
|
FlowyText.medium(LocaleKeys.grid_field_numberFormat.tr()),
|
||||||
fontSize: 12),
|
|
||||||
// const HSpace(6),
|
// const HSpace(6),
|
||||||
const Spacer(),
|
const Spacer(),
|
||||||
FlowyText.regular(state.typeOption.format.title(),
|
FlowyText.regular(state.typeOption.format.title()),
|
||||||
fontSize: 12),
|
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
@ -173,7 +171,7 @@ class NumberFormatCell extends StatelessWidget {
|
|||||||
return SizedBox(
|
return SizedBox(
|
||||||
height: GridSize.typeOptionItemHeight,
|
height: GridSize.typeOptionItemHeight,
|
||||||
child: FlowyButton(
|
child: FlowyButton(
|
||||||
text: FlowyText.medium(format.title(), fontSize: 12),
|
text: FlowyText.medium(format.title()),
|
||||||
onTap: () => onSelected(format),
|
onTap: () => onSelected(format),
|
||||||
rightIcon: checkmark,
|
rightIcon: checkmark,
|
||||||
),
|
),
|
||||||
|
@ -72,7 +72,6 @@ class OptionTitle extends StatelessWidget {
|
|||||||
List<Widget> children = [
|
List<Widget> children = [
|
||||||
FlowyText.medium(
|
FlowyText.medium(
|
||||||
LocaleKeys.grid_field_optionTitle.tr(),
|
LocaleKeys.grid_field_optionTitle.tr(),
|
||||||
fontSize: 12,
|
|
||||||
color: Theme.of(context).hintColor,
|
color: Theme.of(context).hintColor,
|
||||||
)
|
)
|
||||||
];
|
];
|
||||||
@ -101,7 +100,6 @@ class _OptionTitleButton extends StatelessWidget {
|
|||||||
child: FlowyButton(
|
child: FlowyButton(
|
||||||
text: FlowyText.medium(
|
text: FlowyText.medium(
|
||||||
LocaleKeys.grid_field_addOption.tr(),
|
LocaleKeys.grid_field_addOption.tr(),
|
||||||
fontSize: 12,
|
|
||||||
textAlign: TextAlign.center,
|
textAlign: TextAlign.center,
|
||||||
),
|
),
|
||||||
onTap: () {
|
onTap: () {
|
||||||
@ -232,8 +230,7 @@ class _AddOptionButton extends StatelessWidget {
|
|||||||
return SizedBox(
|
return SizedBox(
|
||||||
height: GridSize.typeOptionItemHeight,
|
height: GridSize.typeOptionItemHeight,
|
||||||
child: FlowyButton(
|
child: FlowyButton(
|
||||||
text: FlowyText.medium(LocaleKeys.grid_field_addSelectOption.tr(),
|
text: FlowyText.medium(LocaleKeys.grid_field_addSelectOption.tr()),
|
||||||
fontSize: 12),
|
|
||||||
onTap: () {
|
onTap: () {
|
||||||
context
|
context
|
||||||
.read<SelectOptionTypeOptionBloc>()
|
.read<SelectOptionTypeOptionBloc>()
|
||||||
|
@ -1,7 +1,6 @@
|
|||||||
import 'package:app_flowy/plugins/grid/application/field/type_option/edit_select_option_bloc.dart';
|
import 'package:app_flowy/plugins/grid/application/field/type_option/edit_select_option_bloc.dart';
|
||||||
import 'package:app_flowy/plugins/grid/presentation/widgets/cell/select_option_cell/extension.dart';
|
import 'package:app_flowy/plugins/grid/presentation/widgets/cell/select_option_cell/extension.dart';
|
||||||
import 'package:flowy_infra/image.dart';
|
import 'package:flowy_infra/image.dart';
|
||||||
import 'package:flowy_infra/size.dart';
|
|
||||||
import 'package:flowy_infra_ui/style_widget/button.dart';
|
import 'package:flowy_infra_ui/style_widget/button.dart';
|
||||||
import 'package:flowy_infra_ui/style_widget/scrolling/styled_list.dart';
|
import 'package:flowy_infra_ui/style_widget/scrolling/styled_list.dart';
|
||||||
import 'package:flowy_infra_ui/style_widget/text.dart';
|
import 'package:flowy_infra_ui/style_widget/text.dart';
|
||||||
@ -86,8 +85,7 @@ class _DeleteTag extends StatelessWidget {
|
|||||||
return SizedBox(
|
return SizedBox(
|
||||||
height: GridSize.typeOptionItemHeight,
|
height: GridSize.typeOptionItemHeight,
|
||||||
child: FlowyButton(
|
child: FlowyButton(
|
||||||
text: FlowyText.medium(LocaleKeys.grid_selectOption_deleteTag.tr(),
|
text: FlowyText.medium(LocaleKeys.grid_selectOption_deleteTag.tr()),
|
||||||
fontSize: 12),
|
|
||||||
leftIcon: svgWidget(
|
leftIcon: svgWidget(
|
||||||
"grid/delete",
|
"grid/delete",
|
||||||
color: Theme.of(context).colorScheme.onSurface,
|
color: Theme.of(context).colorScheme.onSurface,
|
||||||
@ -145,7 +143,6 @@ class SelectOptionColorList extends StatelessWidget {
|
|||||||
height: GridSize.typeOptionItemHeight,
|
height: GridSize.typeOptionItemHeight,
|
||||||
child: FlowyText.medium(
|
child: FlowyText.medium(
|
||||||
LocaleKeys.grid_selectOption_colorPanelTitle.tr(),
|
LocaleKeys.grid_selectOption_colorPanelTitle.tr(),
|
||||||
fontSize: FontSizes.s12,
|
|
||||||
textAlign: TextAlign.left,
|
textAlign: TextAlign.left,
|
||||||
color: Theme.of(context).hintColor,
|
color: Theme.of(context).hintColor,
|
||||||
),
|
),
|
||||||
@ -195,7 +192,7 @@ class _SelectOptionColorCell extends StatelessWidget {
|
|||||||
return SizedBox(
|
return SizedBox(
|
||||||
height: GridSize.typeOptionItemHeight,
|
height: GridSize.typeOptionItemHeight,
|
||||||
child: FlowyButton(
|
child: FlowyButton(
|
||||||
text: FlowyText.medium(color.optionName(), fontSize: 12),
|
text: FlowyText.medium(color.optionName()),
|
||||||
leftIcon: colorIcon,
|
leftIcon: colorIcon,
|
||||||
rightIcon: checkmark,
|
rightIcon: checkmark,
|
||||||
onTap: () {
|
onTap: () {
|
||||||
|
@ -60,7 +60,6 @@ class _RowActionCell extends StatelessWidget {
|
|||||||
child: FlowyButton(
|
child: FlowyButton(
|
||||||
text: FlowyText.medium(
|
text: FlowyText.medium(
|
||||||
action.title(),
|
action.title(),
|
||||||
fontSize: 12,
|
|
||||||
color: action.enable() ? null : Theme.of(context).disabledColor,
|
color: action.enable() ? null : Theme.of(context).disabledColor,
|
||||||
),
|
),
|
||||||
onTap: () {
|
onTap: () {
|
||||||
|
@ -198,10 +198,7 @@ class _CreateFieldButtonState extends State<_CreateFieldButton> {
|
|||||||
height: 40,
|
height: 40,
|
||||||
decoration: _makeBoxDecoration(context),
|
decoration: _makeBoxDecoration(context),
|
||||||
child: FlowyButton(
|
child: FlowyButton(
|
||||||
text: FlowyText.medium(
|
text: FlowyText.medium(LocaleKeys.grid_field_newColumn.tr()),
|
||||||
LocaleKeys.grid_field_newColumn.tr(),
|
|
||||||
fontSize: 12,
|
|
||||||
),
|
|
||||||
hoverColor: AFThemeExtension.of(context).lightGreyHover,
|
hoverColor: AFThemeExtension.of(context).lightGreyHover,
|
||||||
onTap: () {},
|
onTap: () {},
|
||||||
leftIcon: svgWidget("home/add"),
|
leftIcon: svgWidget("home/add"),
|
||||||
|
@ -81,7 +81,7 @@ class _GridGroupCell extends StatelessWidget {
|
|||||||
return SizedBox(
|
return SizedBox(
|
||||||
height: GridSize.typeOptionItemHeight,
|
height: GridSize.typeOptionItemHeight,
|
||||||
child: FlowyButton(
|
child: FlowyButton(
|
||||||
text: FlowyText.medium(fieldContext.name, fontSize: 12),
|
text: FlowyText.medium(fieldContext.name),
|
||||||
leftIcon: svgWidget(
|
leftIcon: svgWidget(
|
||||||
fieldContext.fieldType.iconName(),
|
fieldContext.fieldType.iconName(),
|
||||||
color: Theme.of(context).colorScheme.onSurface,
|
color: Theme.of(context).colorScheme.onSurface,
|
||||||
|
@ -118,7 +118,7 @@ class _GridPropertyCell extends StatelessWidget {
|
|||||||
offset: const Offset(20, 0),
|
offset: const Offset(20, 0),
|
||||||
constraints: BoxConstraints.loose(const Size(240, 400)),
|
constraints: BoxConstraints.loose(const Size(240, 400)),
|
||||||
child: FlowyButton(
|
child: FlowyButton(
|
||||||
text: FlowyText.medium(fieldContext.name, fontSize: 12),
|
text: FlowyText.medium(fieldContext.name),
|
||||||
leftIcon: svgWidget(
|
leftIcon: svgWidget(
|
||||||
fieldContext.fieldType.iconName(),
|
fieldContext.fieldType.iconName(),
|
||||||
color: Theme.of(context).colorScheme.onSurface,
|
color: Theme.of(context).colorScheme.onSurface,
|
||||||
|
@ -100,7 +100,6 @@ class _SettingItem extends StatelessWidget {
|
|||||||
isSelected: isSelected,
|
isSelected: isSelected,
|
||||||
text: FlowyText.medium(
|
text: FlowyText.medium(
|
||||||
action.title(),
|
action.title(),
|
||||||
fontSize: 12,
|
|
||||||
color: action.enable() ? null : Theme.of(context).disabledColor,
|
color: action.enable() ? null : Theme.of(context).disabledColor,
|
||||||
),
|
),
|
||||||
onTap: () {
|
onTap: () {
|
||||||
|
@ -39,7 +39,7 @@ class MenuTrash extends StatelessWidget {
|
|||||||
),
|
),
|
||||||
),
|
),
|
||||||
const HSpace(6),
|
const HSpace(6),
|
||||||
FlowyText.medium(LocaleKeys.trash_text.tr(), fontSize: 12),
|
FlowyText.medium(LocaleKeys.trash_text.tr()),
|
||||||
],
|
],
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
@ -25,14 +25,17 @@ class TrashCell extends StatelessWidget {
|
|||||||
return Row(
|
return Row(
|
||||||
children: [
|
children: [
|
||||||
SizedBox(
|
SizedBox(
|
||||||
width: TrashSizes.fileNameWidth,
|
width: TrashSizes.fileNameWidth,
|
||||||
child: FlowyText(object.name, fontSize: 12)),
|
child: FlowyText(object.name),
|
||||||
|
),
|
||||||
SizedBox(
|
SizedBox(
|
||||||
width: TrashSizes.lashModifyWidth,
|
width: TrashSizes.lashModifyWidth,
|
||||||
child: FlowyText(dateFormatter(object.modifiedTime), fontSize: 12)),
|
child: FlowyText(dateFormatter(object.modifiedTime)),
|
||||||
|
),
|
||||||
SizedBox(
|
SizedBox(
|
||||||
width: TrashSizes.createTimeWidth,
|
width: TrashSizes.createTimeWidth,
|
||||||
child: FlowyText(dateFormatter(object.createTime), fontSize: 12)),
|
child: FlowyText(dateFormatter(object.createTime)),
|
||||||
|
),
|
||||||
const Spacer(),
|
const Spacer(),
|
||||||
FlowyIconButton(
|
FlowyIconButton(
|
||||||
width: 26,
|
width: 26,
|
||||||
|
@ -57,7 +57,6 @@ class TrashHeader extends StatelessWidget {
|
|||||||
width: item.width,
|
width: item.width,
|
||||||
child: FlowyText(
|
child: FlowyText(
|
||||||
item.title,
|
item.title,
|
||||||
fontSize: 12,
|
|
||||||
color: Theme.of(context).disabledColor,
|
color: Theme.of(context).disabledColor,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
@ -49,8 +49,7 @@ class TrashPlugin extends Plugin {
|
|||||||
|
|
||||||
class TrashPluginDisplay extends PluginDisplay {
|
class TrashPluginDisplay extends PluginDisplay {
|
||||||
@override
|
@override
|
||||||
Widget get leftBarItem =>
|
Widget get leftBarItem => FlowyText.medium(LocaleKeys.trash_text.tr());
|
||||||
FlowyText.medium(LocaleKeys.trash_text.tr(), fontSize: 12);
|
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget? get rightBarItem => null;
|
Widget? get rightBarItem => null;
|
||||||
|
@ -4,6 +4,7 @@ import 'package:app_flowy/plugins/trash/src/trash_header.dart';
|
|||||||
import 'package:app_flowy/startup/startup.dart';
|
import 'package:app_flowy/startup/startup.dart';
|
||||||
import 'package:easy_localization/easy_localization.dart';
|
import 'package:easy_localization/easy_localization.dart';
|
||||||
import 'package:flowy_infra/image.dart';
|
import 'package:flowy_infra/image.dart';
|
||||||
|
import 'package:flowy_infra/size.dart';
|
||||||
import 'package:flowy_infra_ui/style_widget/button.dart';
|
import 'package:flowy_infra_ui/style_widget/button.dart';
|
||||||
import 'package:flowy_infra_ui/style_widget/scrolling/styled_list.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_scroll_bar.dart';
|
||||||
@ -86,12 +87,14 @@ class _TrashPageState extends State<TrashPage> {
|
|||||||
child: Row(
|
child: Row(
|
||||||
crossAxisAlignment: CrossAxisAlignment.stretch,
|
crossAxisAlignment: CrossAxisAlignment.stretch,
|
||||||
children: [
|
children: [
|
||||||
FlowyText.semibold(LocaleKeys.trash_text.tr()),
|
FlowyText.semibold(
|
||||||
|
LocaleKeys.trash_text.tr(),
|
||||||
|
fontSize: FontSizes.s16,
|
||||||
|
),
|
||||||
const Spacer(),
|
const Spacer(),
|
||||||
IntrinsicWidth(
|
IntrinsicWidth(
|
||||||
child: FlowyButton(
|
child: FlowyButton(
|
||||||
text: FlowyText.medium(LocaleKeys.trash_restoreAll.tr(),
|
text: FlowyText.medium(LocaleKeys.trash_restoreAll.tr()),
|
||||||
fontSize: 12),
|
|
||||||
leftIcon: svgWidget(
|
leftIcon: svgWidget(
|
||||||
'editor/restore',
|
'editor/restore',
|
||||||
color: Theme.of(context).colorScheme.onSurface,
|
color: Theme.of(context).colorScheme.onSurface,
|
||||||
@ -104,8 +107,7 @@ class _TrashPageState extends State<TrashPage> {
|
|||||||
const HSpace(6),
|
const HSpace(6),
|
||||||
IntrinsicWidth(
|
IntrinsicWidth(
|
||||||
child: FlowyButton(
|
child: FlowyButton(
|
||||||
text: FlowyText.medium(LocaleKeys.trash_deleteAll.tr(),
|
text: FlowyText.medium(LocaleKeys.trash_deleteAll.tr()),
|
||||||
fontSize: 12),
|
|
||||||
leftIcon: svgWidget(
|
leftIcon: svgWidget(
|
||||||
'editor/delete',
|
'editor/delete',
|
||||||
color: Theme.of(context).colorScheme.onSurface,
|
color: Theme.of(context).colorScheme.onSurface,
|
||||||
|
@ -100,7 +100,6 @@ class SignUpPrompt extends StatelessWidget {
|
|||||||
children: [
|
children: [
|
||||||
FlowyText.medium(
|
FlowyText.medium(
|
||||||
LocaleKeys.signIn_dontHaveAnAccount.tr(),
|
LocaleKeys.signIn_dontHaveAnAccount.tr(),
|
||||||
fontSize: FontSizes.s12,
|
|
||||||
color: Theme.of(context).hintColor,
|
color: Theme.of(context).hintColor,
|
||||||
),
|
),
|
||||||
TextButton(
|
TextButton(
|
||||||
|
@ -169,7 +169,6 @@ class AppActionList extends StatelessWidget {
|
|||||||
selector: (state) => state.app,
|
selector: (state) => state.app,
|
||||||
builder: (context, app) => FlowyText.medium(
|
builder: (context, app) => FlowyText.medium(
|
||||||
app.name,
|
app.name,
|
||||||
fontSize: 12,
|
|
||||||
overflow: TextOverflow.ellipsis,
|
overflow: TextOverflow.ellipsis,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
@ -87,7 +87,6 @@ class ViewSectionItem extends StatelessWidget {
|
|||||||
Expanded(
|
Expanded(
|
||||||
child: FlowyText.regular(
|
child: FlowyText.regular(
|
||||||
state.view.name,
|
state.view.name,
|
||||||
fontSize: 12,
|
|
||||||
overflow: TextOverflow.ellipsis,
|
overflow: TextOverflow.ellipsis,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
@ -67,7 +67,6 @@ class MenuUser extends StatelessWidget {
|
|||||||
}
|
}
|
||||||
return FlowyText.medium(
|
return FlowyText.medium(
|
||||||
name,
|
name,
|
||||||
fontSize: FontSizes.s12,
|
|
||||||
overflow: TextOverflow.ellipsis,
|
overflow: TextOverflow.ellipsis,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
@ -191,7 +191,10 @@ class EllipsisNaviItem extends NavigationItem {
|
|||||||
});
|
});
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget get leftBarItem => const FlowyText.medium('...');
|
Widget get leftBarItem => FlowyText.medium(
|
||||||
|
'...',
|
||||||
|
fontSize: FontSizes.s16,
|
||||||
|
);
|
||||||
|
|
||||||
@override
|
@override
|
||||||
NavigationCallback get action => (id) {};
|
NavigationCallback get action => (id) {};
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
import 'package:app_flowy/startup/startup.dart';
|
import 'package:app_flowy/startup/startup.dart';
|
||||||
|
import 'package:flowy_infra/size.dart';
|
||||||
import 'package:flowy_infra_ui/style_widget/text.dart';
|
import 'package:flowy_infra_ui/style_widget/text.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:fluttertoast/fluttertoast.dart';
|
import 'package:fluttertoast/fluttertoast.dart';
|
||||||
@ -16,7 +17,11 @@ class FlowyMessageToast extends StatelessWidget {
|
|||||||
),
|
),
|
||||||
child: Padding(
|
child: Padding(
|
||||||
padding: const EdgeInsets.symmetric(horizontal: 12, vertical: 6),
|
padding: const EdgeInsets.symmetric(horizontal: 12, vertical: 6),
|
||||||
child: FlowyText.medium(message, color: Colors.white),
|
child: FlowyText.medium(
|
||||||
|
message,
|
||||||
|
color: Colors.white,
|
||||||
|
fontSize: FontSizes.s16,
|
||||||
|
),
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
import 'package:app_flowy/startup/startup.dart';
|
import 'package:app_flowy/startup/startup.dart';
|
||||||
|
import 'package:flowy_infra/size.dart';
|
||||||
import 'package:flowy_infra_ui/style_widget/text.dart';
|
import 'package:flowy_infra_ui/style_widget/text.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:app_flowy/workspace/application/user/settings_user_bloc.dart';
|
import 'package:app_flowy/workspace/application/user/settings_user_bloc.dart';
|
||||||
@ -93,7 +94,10 @@ class _CurrentIcon extends StatelessWidget {
|
|||||||
context: context,
|
context: context,
|
||||||
builder: (BuildContext context) {
|
builder: (BuildContext context) {
|
||||||
return SimpleDialog(
|
return SimpleDialog(
|
||||||
title: const FlowyText.medium('Select an Icon'),
|
title: FlowyText.medium(
|
||||||
|
'Select an Icon',
|
||||||
|
fontSize: FontSizes.s16,
|
||||||
|
),
|
||||||
children: <Widget>[
|
children: <Widget>[
|
||||||
SizedBox(
|
SizedBox(
|
||||||
height: 300, width: 300, child: IconGallery(_setIcon))
|
height: 300, width: 300, child: IconGallery(_setIcon))
|
||||||
|
@ -46,8 +46,11 @@ class _CreateTextFieldDialog extends State<NavigatorTextFieldDialog> {
|
|||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
children: <Widget>[
|
children: <Widget>[
|
||||||
...[
|
...[
|
||||||
FlowyText.medium(widget.title,
|
FlowyText.medium(
|
||||||
color: Theme.of(context).disabledColor),
|
widget.title,
|
||||||
|
color: Theme.of(context).disabledColor,
|
||||||
|
fontSize: FontSizes.s16,
|
||||||
|
),
|
||||||
VSpace(Insets.sm * 1.5),
|
VSpace(Insets.sm * 1.5),
|
||||||
],
|
],
|
||||||
FlowyFormTextInput(
|
FlowyFormTextInput(
|
||||||
@ -117,6 +120,7 @@ class _CreateFlowyAlertDialog extends State<NavigatorAlertDialog> {
|
|||||||
...[
|
...[
|
||||||
FlowyText.medium(
|
FlowyText.medium(
|
||||||
widget.title,
|
widget.title,
|
||||||
|
fontSize: FontSizes.s16,
|
||||||
color: Theme.of(context).disabledColor,
|
color: Theme.of(context).disabledColor,
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
@ -164,13 +168,16 @@ class NavigatorOkCancelDialog extends StatelessWidget {
|
|||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
children: <Widget>[
|
children: <Widget>[
|
||||||
if (title != null) ...[
|
if (title != null) ...[
|
||||||
FlowyText.medium(title!.toUpperCase()),
|
FlowyText.medium(
|
||||||
|
title!.toUpperCase(),
|
||||||
|
fontSize: FontSizes.s16,
|
||||||
|
),
|
||||||
VSpace(Insets.sm * 1.5),
|
VSpace(Insets.sm * 1.5),
|
||||||
Container(
|
Container(
|
||||||
color: Theme.of(context).colorScheme.surfaceVariant, height: 1),
|
color: Theme.of(context).colorScheme.surfaceVariant, height: 1),
|
||||||
VSpace(Insets.m * 1.5),
|
VSpace(Insets.m * 1.5),
|
||||||
],
|
],
|
||||||
FlowyText.medium(message, fontSize: FontSizes.s12),
|
FlowyText.medium(message),
|
||||||
SizedBox(height: Insets.l),
|
SizedBox(height: Insets.l),
|
||||||
OkCancelButton(
|
OkCancelButton(
|
||||||
onOkPressed: () {
|
onOkPressed: () {
|
||||||
|
@ -3,7 +3,6 @@ import 'package:app_flowy/workspace/presentation/home/toast.dart';
|
|||||||
import 'package:app_flowy/workspace/presentation/widgets/pop_up_action.dart';
|
import 'package:app_flowy/workspace/presentation/widgets/pop_up_action.dart';
|
||||||
import 'package:appflowy_popover/appflowy_popover.dart';
|
import 'package:appflowy_popover/appflowy_popover.dart';
|
||||||
import 'package:easy_localization/easy_localization.dart';
|
import 'package:easy_localization/easy_localization.dart';
|
||||||
import 'package:flowy_infra/size.dart';
|
|
||||||
import 'package:flowy_infra_ui/style_widget/button.dart';
|
import 'package:flowy_infra_ui/style_widget/button.dart';
|
||||||
import 'package:flowy_infra_ui/style_widget/text.dart';
|
import 'package:flowy_infra_ui/style_widget/text.dart';
|
||||||
import 'package:flowy_infra_ui/widget/spacing.dart';
|
import 'package:flowy_infra_ui/widget/spacing.dart';
|
||||||
@ -125,7 +124,6 @@ class FlowyVersionDescription extends CustomActionCell {
|
|||||||
if (snapshot.hasError) {
|
if (snapshot.hasError) {
|
||||||
return FlowyText(
|
return FlowyText(
|
||||||
"Error: ${snapshot.error}",
|
"Error: ${snapshot.error}",
|
||||||
fontSize: FontSizes.s12,
|
|
||||||
color: Theme.of(context).disabledColor,
|
color: Theme.of(context).disabledColor,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
@ -148,7 +146,6 @@ class FlowyVersionDescription extends CustomActionCell {
|
|||||||
const VSpace(6),
|
const VSpace(6),
|
||||||
FlowyText(
|
FlowyText(
|
||||||
"$appName $version.$buildNumber",
|
"$appName $version.$buildNumber",
|
||||||
fontSize: FontSizes.s12,
|
|
||||||
color: Theme.of(context).hintColor,
|
color: Theme.of(context).hintColor,
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
@ -171,7 +168,7 @@ class BubbleActionWrapper extends ActionCell {
|
|||||||
|
|
||||||
BubbleActionWrapper(this.inner);
|
BubbleActionWrapper(this.inner);
|
||||||
@override
|
@override
|
||||||
Widget? icon(Color iconColor) => FlowyText.regular(inner.emoji, fontSize: 12);
|
Widget? icon(Color iconColor) => FlowyText.regular(inner.emoji);
|
||||||
|
|
||||||
@override
|
@override
|
||||||
String get name => inner.name;
|
String get name => inner.name;
|
||||||
|
@ -127,7 +127,6 @@ class ActionCellWidget<T extends PopoverAction> extends StatelessWidget {
|
|||||||
Expanded(
|
Expanded(
|
||||||
child: FlowyText.medium(
|
child: FlowyText.medium(
|
||||||
actionCell.name,
|
actionCell.name,
|
||||||
fontSize: 12,
|
|
||||||
overflow: TextOverflow.visible,
|
overflow: TextOverflow.visible,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
@ -1,11 +1,10 @@
|
|||||||
import 'package:flowy_infra/text_style.dart';
|
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
|
|
||||||
class FlowyText extends StatelessWidget {
|
class FlowyText extends StatelessWidget {
|
||||||
final String title;
|
final String title;
|
||||||
final TextOverflow? overflow;
|
final TextOverflow? overflow;
|
||||||
final double fontSize;
|
final double? fontSize;
|
||||||
final FontWeight fontWeight;
|
final FontWeight? fontWeight;
|
||||||
final TextAlign? textAlign;
|
final TextAlign? textAlign;
|
||||||
final int? maxLines;
|
final int? maxLines;
|
||||||
final Color? color;
|
final Color? color;
|
||||||
@ -14,28 +13,28 @@ class FlowyText extends StatelessWidget {
|
|||||||
this.title, {
|
this.title, {
|
||||||
Key? key,
|
Key? key,
|
||||||
this.overflow = TextOverflow.clip,
|
this.overflow = TextOverflow.clip,
|
||||||
this.fontSize = 16,
|
this.fontSize,
|
||||||
this.fontWeight = FontWeight.w400,
|
this.fontWeight,
|
||||||
this.textAlign,
|
this.textAlign,
|
||||||
this.color,
|
this.color,
|
||||||
this.maxLines = 1,
|
this.maxLines = 1,
|
||||||
}) : super(key: key);
|
}) : super(key: key);
|
||||||
|
|
||||||
const FlowyText.semibold(
|
const FlowyText.regular(
|
||||||
this.title, {
|
this.title, {
|
||||||
Key? key,
|
Key? key,
|
||||||
this.fontSize = 16,
|
this.fontSize,
|
||||||
this.overflow,
|
this.overflow,
|
||||||
this.color,
|
this.color,
|
||||||
this.textAlign,
|
this.textAlign,
|
||||||
this.maxLines = 1,
|
this.maxLines = 1,
|
||||||
}) : fontWeight = FontWeight.w600,
|
}) : fontWeight = FontWeight.w400,
|
||||||
super(key: key);
|
super(key: key);
|
||||||
|
|
||||||
const FlowyText.medium(
|
const FlowyText.medium(
|
||||||
this.title, {
|
this.title, {
|
||||||
Key? key,
|
Key? key,
|
||||||
this.fontSize = 16,
|
this.fontSize,
|
||||||
this.overflow,
|
this.overflow,
|
||||||
this.color,
|
this.color,
|
||||||
this.textAlign,
|
this.textAlign,
|
||||||
@ -43,15 +42,15 @@ class FlowyText extends StatelessWidget {
|
|||||||
}) : fontWeight = FontWeight.w500,
|
}) : fontWeight = FontWeight.w500,
|
||||||
super(key: key);
|
super(key: key);
|
||||||
|
|
||||||
const FlowyText.regular(
|
const FlowyText.semibold(
|
||||||
this.title, {
|
this.title, {
|
||||||
Key? key,
|
Key? key,
|
||||||
this.fontSize = 16,
|
this.fontSize,
|
||||||
this.overflow,
|
this.overflow,
|
||||||
this.color,
|
this.color,
|
||||||
this.textAlign,
|
this.textAlign,
|
||||||
this.maxLines = 1,
|
this.maxLines = 1,
|
||||||
}) : fontWeight = FontWeight.w400,
|
}) : fontWeight = FontWeight.w600,
|
||||||
super(key: key);
|
super(key: key);
|
||||||
|
|
||||||
@override
|
@override
|
||||||
@ -61,11 +60,11 @@ class FlowyText extends StatelessWidget {
|
|||||||
maxLines: maxLines,
|
maxLines: maxLines,
|
||||||
textAlign: textAlign,
|
textAlign: textAlign,
|
||||||
overflow: overflow ?? TextOverflow.clip,
|
overflow: overflow ?? TextOverflow.clip,
|
||||||
style: TextStyles.general(
|
style: Theme.of(context).textTheme.bodyMedium!.copyWith(
|
||||||
fontSize: fontSize,
|
fontSize: fontSize,
|
||||||
fontWeight: fontWeight,
|
fontWeight: fontWeight,
|
||||||
color: color,
|
color: color,
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
import 'package:flowy_infra/size.dart';
|
import 'package:flowy_infra/size.dart';
|
||||||
import 'package:flowy_infra/text_style.dart';
|
import 'package:flowy_infra_ui/style_widget/text.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
|
|
||||||
class RoundedTextButton extends StatelessWidget {
|
class RoundedTextButton extends StatelessWidget {
|
||||||
@ -44,12 +44,10 @@ class RoundedTextButton extends StatelessWidget {
|
|||||||
child: SizedBox.expand(
|
child: SizedBox.expand(
|
||||||
child: TextButton(
|
child: TextButton(
|
||||||
onPressed: onPressed,
|
onPressed: onPressed,
|
||||||
child: Text(
|
child: FlowyText.medium(
|
||||||
title ?? '',
|
title ?? '',
|
||||||
style: TextStyles.general(
|
fontSize: fontSize,
|
||||||
fontSize: fontSize,
|
color: textColor,
|
||||||
color: textColor,
|
|
||||||
),
|
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
Reference in New Issue
Block a user