Skip to content

Commit

Permalink
パフォーマンスを改善(主にiOSでの重さの解消のため)
Browse files Browse the repository at this point in the history
  • Loading branch information
kaboc committed Sep 23, 2023
1 parent 55e5a19 commit 39f47d1
Showing 1 changed file with 12 additions and 10 deletions.
22 changes: 12 additions & 10 deletions lib/core/components/section_header.dart
Original file line number Diff line number Diff line change
Expand Up @@ -32,16 +32,18 @@ final class SectionHeader extends StatelessWidget {
Widget build(BuildContext context) {
final component = Align(
alignment: Alignment.centerLeft,
child: ShaderMask(
shaderCallback: gradient.createShader,
blendMode: BlendMode.srcIn,
child: Padding(
// NOTE: Text Widget の描画範囲から外れて文字やブラーが見切れてしまうため、現状は左右に余白を設けている
padding: const EdgeInsets.all(_blurRadius),
child: Text(
text,
style: style.copyWith(
color: Colors.white,
child: RepaintBoundary(
child: ShaderMask(
shaderCallback: gradient.createShader,
blendMode: BlendMode.srcIn,
child: Padding(
// NOTE: Text Widget の描画範囲から外れて文字やブラーが見切れてしまうため、現状は左右に余白を設けている
padding: const EdgeInsets.all(_blurRadius),
child: Text(
text,
style: style.copyWith(
color: Colors.white,
),
),
),
),
Expand Down

0 comments on commit 39f47d1

Please sign in to comment.