chore: use theme.of(context) text theme in board (#1453)

This commit is contained in:
Richard Shiue 2022-11-17 16:48:48 +08:00 committed by GitHub
parent fc10ee2d6b
commit d7f14db6ab
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 7 deletions

View File

@ -2,7 +2,6 @@ import 'package:app_flowy/plugins/board/application/card/board_text_cell_bloc.da
import 'package:app_flowy/plugins/grid/application/cell/cell_service/cell_service.dart';
import 'package:app_flowy/plugins/grid/presentation/widgets/cell/cell_builder.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_bloc/flutter_bloc.dart';
@ -153,7 +152,7 @@ class _BoardTextCellState extends State<BoardTextCell> {
onChanged: (value) => focusChanged(),
onEditingComplete: () => focusNode.unfocus(),
maxLines: null,
style: TextStyles.body1.size(FontSizes.s14),
style: Theme.of(context).textTheme.bodyMedium!.size(FontSizes.s14),
decoration: InputDecoration(
// Magic number 4 makes the textField take up the same space as FlowyText
contentPadding: EdgeInsets.symmetric(

View File

@ -1,7 +1,6 @@
import 'package:app_flowy/plugins/board/application/card/board_url_cell_bloc.dart';
import 'package:app_flowy/plugins/grid/application/cell/cell_service/cell_service.dart';
import 'package:flowy_infra/size.dart';
import 'package:flowy_infra/text_style.dart';
import 'package:flutter/material.dart';
import 'package:flutter_bloc/flutter_bloc.dart';
import 'package:textstyle_extensions/textstyle_extensions.dart';
@ -54,10 +53,12 @@ class _BoardUrlCellState extends State<BoardUrlCell> {
textAlign: TextAlign.left,
text: TextSpan(
text: state.content,
style: TextStyles.general(
fontSize: FontSizes.s14,
color: Theme.of(context).colorScheme.onPrimaryContainer,
).underline,
style: Theme.of(context)
.textTheme
.bodyMedium!
.size(FontSizes.s14)
.textColor(Theme.of(context).colorScheme.primary)
.underline,
),
),
),