Files
Tanami_App/lib/features/register/presentation/pages/register_screen.dart
2024-07-26 16:54:11 +05:30

40 lines
1.3 KiB
Dart

import 'package:flutter/material.dart';
import 'package:flutter_bloc/flutter_bloc.dart';
import 'package:tanami_app/core/utils/secure/secure_storage_service.dart';
import 'package:tanami_app/features/register/presentation/bloc/register_bloc.dart';
import '../../../../core/styles/app_color.dart';
import '../../../countrySelection/bloc/choose_country_bloc.dart';
import 'register_layout.dart';
class RegisterScreen extends StatelessWidget {
const RegisterScreen({super.key});
@override
Widget build(BuildContext context) {
final SharedPreferenceLocalData secureStorageService =
SharedPreferenceLocalData();
final radioBloc = context.read<RadioBloc>();
return WillPopScope(
onWillPop: () async {
radioBloc.resetSelection();
return true; // Allow the pop to happen
},
child: Scaffold(
backgroundColor: AppColor.plainWhite,
resizeToAvoidBottomInset: true,
body: MultiBlocProvider(
providers: [
BlocProvider(
// Create an instance of the OnboardingBloc
create: (context) =>
RegisterBloc(secureStorageService: secureStorageService),
),
],
child: const RegisterLayout(),
),
),
);
}
}