You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
fluffychat/lib/pangea/widgets/subscription/subscription_paywall.dart

58 lines
1.7 KiB
Dart

// Flutter imports:
import 'package:fluffychat/pangea/controllers/pangea_controller.dart';
import 'package:fluffychat/pangea/widgets/subscription/subscription_options.dart';
import 'package:flutter/material.dart';
import 'package:flutter_gen/gen_l10n/l10n.dart';
class SubscriptionPaywall extends StatelessWidget {
final PangeaController pangeaController;
const SubscriptionPaywall({
super.key,
required this.pangeaController,
});
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
centerTitle: true,
leading: const CloseButton(),
title: Text(
L10n.of(context)!.getAccess,
style: const TextStyle(fontSize: 20),
),
),
body: SingleChildScrollView(
child: Padding(
padding: const EdgeInsets.all(20),
child: Column(
mainAxisSize: MainAxisSize.min,
children: [
if (pangeaController.matrixState.client.rooms.length > 1) ...[
Text(
L10n.of(context)!.welcomeBack,
textAlign: TextAlign.center,
style: const TextStyle(fontSize: 16),
),
const SizedBox(height: 20),
],
Text(
L10n.of(context)!.subscriptionDesc,
textAlign: TextAlign.center,
style: const TextStyle(fontSize: 16),
),
const SizedBox(height: 40),
Center(
child: SubscriptionOptions(
pangeaController: pangeaController,
),
),
],
),
),
),
);
}
}