|
1 | 1 | import 'package:flutter/material.dart';
|
2 | 2 | import 'package:flutter/services.dart';
|
3 | 3 | import 'package:flutter_bloc/flutter_bloc.dart';
|
| 4 | +import 'package:ht_main/app/bloc/app_bloc.dart'; // Added |
| 5 | +import 'package:ht_main/app/config/config.dart'; // Added for AppEnvironment |
4 | 6 | import 'package:ht_main/authentication/bloc/authentication_bloc.dart';
|
5 | 7 | import 'package:ht_main/l10n/l10n.dart';
|
6 | 8 | import 'package:ht_main/shared/constants/app_spacing.dart';
|
@@ -72,6 +74,30 @@ class EmailCodeVerificationPage extends StatelessWidget {
|
72 | 74 | ), // Softer color
|
73 | 75 | textAlign: TextAlign.center,
|
74 | 76 | ),
|
| 77 | + // Display demo code if in demo environment |
| 78 | + BlocSelector<AppBloc, AppState, AppEnvironment?>( |
| 79 | + selector: (state) => state.environment, |
| 80 | + builder: (context, environment) { |
| 81 | + if (environment == AppEnvironment.demo) { |
| 82 | + return Column( |
| 83 | + children: [ |
| 84 | + const SizedBox(height: AppSpacing.md), |
| 85 | + Text( |
| 86 | + l10n.demoVerificationCodeMessage( |
| 87 | + '123456', |
| 88 | + ), // Demo code |
| 89 | + style: textTheme.bodyMedium?.copyWith( |
| 90 | + color: colorScheme.secondary, |
| 91 | + fontWeight: FontWeight.bold, |
| 92 | + ), |
| 93 | + textAlign: TextAlign.center, |
| 94 | + ), |
| 95 | + ], |
| 96 | + ); |
| 97 | + } |
| 98 | + return const SizedBox.shrink(); |
| 99 | + }, |
| 100 | + ), |
75 | 101 | const SizedBox(
|
76 | 102 | height: AppSpacing.xl,
|
77 | 103 | ), // Increased spacing
|
|
0 commit comments