-
-
Notifications
You must be signed in to change notification settings - Fork 47
/
unlock_with_donation_text.dart
32 lines (30 loc) · 1.09 KB
/
unlock_with_donation_text.dart
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
import 'package:flutter/material.dart';
import 'package:shiori/generated/l10n.dart';
import 'package:shiori/presentation/donations/donations_bottom_sheet.dart';
import 'package:shiori/presentation/shared/styles.dart';
class UnlockWithDonationText extends StatelessWidget {
final bool canShowDonationDialog;
const UnlockWithDonationText({super.key, required this.canShowDonationDialog});
@override
Widget build(BuildContext context) {
final s = S.of(context);
final theme = Theme.of(context);
return GestureDetector(
onTap: !canShowDonationDialog
? null
: () => showModalBottomSheet(
context: context,
shape: Styles.modalBottomSheetShape,
isDismissible: true,
isScrollControlled: true,
builder: (ctx) => const DonationsBottomSheet(),
),
child: Text(
s.unlockedWithDonation,
overflow: TextOverflow.ellipsis,
maxLines: 2,
style: theme.textTheme.caption!.copyWith(color: theme.primaryColor, fontStyle: FontStyle.italic),
),
);
}
}