45 lines
1.4 KiB
Dart
45 lines
1.4 KiB
Dart
import 'package:flutter/material.dart';
|
|
import 'package:flutter_bloc/flutter_bloc.dart';
|
|
|
|
import '../../../../core/styles/app_color.dart';
|
|
import '../../../../core/styles/app_text.dart';
|
|
import '../../../../core/utils/secure/secure_storage_service.dart';
|
|
import '../../../../shared/components/appbar_widget.dart';
|
|
import '../bloc/pin_bloc.dart';
|
|
import 'pin_layout.dart';
|
|
|
|
class PinScreen extends StatelessWidget {
|
|
final String fromScreen;
|
|
const PinScreen({super.key, required this.fromScreen});
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
final secureStorageService = SecureStorageService();
|
|
return Scaffold(
|
|
backgroundColor: AppColor.plainWhite,
|
|
appBar: fromScreen == "register" || fromScreen == "reset-pin"
|
|
? AppBarWidget(
|
|
height: 75,
|
|
titleTxt: fromScreen == "reset-pin"
|
|
? AppText.changePinCode
|
|
: AppText.createPinCode,
|
|
showLeading: fromScreen == "reset-pin" ? true : false,
|
|
)
|
|
: null,
|
|
resizeToAvoidBottomInset: true,
|
|
body: MultiBlocProvider(
|
|
providers: [
|
|
BlocProvider(
|
|
// Create an instance of the OnboardingBloc
|
|
create: (context) =>
|
|
PinBloc(secureStorageService: secureStorageService),
|
|
),
|
|
],
|
|
child: PinLayout(
|
|
fromScreen: fromScreen,
|
|
),
|
|
),
|
|
);
|
|
}
|
|
}
|