Skip to content

Commit

Permalink
[Presentation] Allow tapping on the whole 'todayAscensionMaterials' text
Browse files Browse the repository at this point in the history
  • Loading branch information
Wolfteam committed Nov 13, 2022
1 parent d49f62b commit 09f94dc
Showing 1 changed file with 16 additions and 12 deletions.
28 changes: 16 additions & 12 deletions lib/presentation/home/widgets/sliver_today_main_title.dart
@@ -1,4 +1,3 @@
import 'package:flutter/gestures.dart';
import 'package:flutter/material.dart';
import 'package:flutter_bloc/flutter_bloc.dart';
import 'package:shiori/application/bloc.dart';
Expand All @@ -22,17 +21,22 @@ class SliverTodayMainTitle extends StatelessWidget {
loading: (_) => const Loading(useScaffold: false),
loaded: (state) => Container(
margin: Styles.edgeInsetHorizontal16,
child: RichText(
text: TextSpan(
text: s.todayAscensionMaterials,
style: theme.textTheme.headline6!.copyWith(fontWeight: FontWeight.bold),
children: <TextSpan>[
TextSpan(
text: ' [ ${state.dayName} ]',
style: theme.textTheme.caption,
recognizer: TapGestureRecognizer()..onTap = () => _openDayWeekDialog(state.day, context),
),
],
child: GestureDetector(
onTap: () => _openDayWeekDialog(state.day, context),
child: RichText(
maxLines: 2,
overflow: TextOverflow.ellipsis,
softWrap: false,
text: TextSpan(
text: s.todayAscensionMaterials,
style: theme.textTheme.headline6!.copyWith(fontWeight: FontWeight.bold),
children: <TextSpan>[
TextSpan(
text: ' [ ${state.dayName} ]',
style: theme.textTheme.caption,
),
],
),
),
),
),
Expand Down

0 comments on commit 09f94dc

Please sign in to comment.