restrict_spaceMemberUser_and_change_SignUpModel

This commit is contained in:
mohammad
2025-01-23 18:35:01 +03:00
parent 827585815b
commit 790479effb
20 changed files with 643 additions and 322 deletions

View File

@ -16,7 +16,7 @@ class CreateUnitWidget extends StatelessWidget {
TextEditingController textEditingController = TextEditingController();
return BlocConsumer<HomeCubit, HomeState>(
listener: (context, state) {
if (state is ActivationError) {}
// if (state is ActivationError) {}
},
builder: (context, state) {
return SingleChildScrollView(
@ -96,7 +96,11 @@ class CreateUnitWidget extends StatelessWidget {
textEditingController.text)) {
CustomSnackBar.displaySnackBar(
'Done successfully');
Navigator.of(context).pop();
Future.delayed(
const Duration(milliseconds: 500),
() {
Navigator.of(context).pop();
});
} else {
CustomSnackBar.displaySnackBar(
'Wrong code!');
@ -109,14 +113,14 @@ class CreateUnitWidget extends StatelessWidget {
],
),
),
state is ActivationError
? Text(
state.errMessage,
style: const TextStyle(
color: ColorsManager.red,
fontWeight: FontWeight.w400),
)
: const SizedBox()
// state is ActivationError
// ? Text(
// state.errMessage,
// style: const TextStyle(
// color: ColorsManager.red,
// fontWeight: FontWeight.w400),
// )
// : const SizedBox()
],
),
],
@ -136,42 +140,42 @@ class CreateUnitWidget extends StatelessWidget {
}
}
// return SizedBox(
// width: MediaQuery.sizeOf(context).width,
// height: MediaQuery.sizeOf(context).height,
// child: Column(
// mainAxisAlignment: MainAxisAlignment.center,
// children: [
// SvgPicture.asset(
// Assets.noUnitsIconDashboard,
// width: 100,
// height: 100,
// ),
// const SizedBox(
// height: 50,
// ),
// Flexible(
// child: GestureDetector(
// onTap: () {
// Navigator.pushNamed(context, Routes.createUnit);
// },
// child: Container(
// padding: const EdgeInsets.symmetric(horizontal: 34, vertical: 14),
// decoration: ShapeDecoration(
// color: const Color(0x99023DFE),
// shape: RoundedRectangleBorder(
// borderRadius: BorderRadius.circular(20),
// ),
// ),
// child: const TitleMedium(
// text: 'Create a unit',
// style: TextStyle(fontSize: 16, fontWeight: FontWeight.w400, color: Colors.white),
// ),
// ),
// ),
// ),
// ],
// ),
// );
// return SizedBox(
// width: MediaQuery.sizeOf(context).width,
// height: MediaQuery.sizeOf(context).height,
// child: Column(
// mainAxisAlignment: MainAxisAlignment.center,
// children: [
// SvgPicture.asset(
// Assets.noUnitsIconDashboard,
// width: 100,
// height: 100,
// ),
// const SizedBox(
// height: 50,
// ),
// Flexible(
// child: GestureDetector(
// onTap: () {
// Navigator.pushNamed(context, Routes.createUnit);
// },
// child: Container(
// padding: const EdgeInsets.symmetric(horizontal: 34, vertical: 14),
// decoration: ShapeDecoration(
// color: const Color(0x99023DFE),
// shape: RoundedRectangleBorder(
// borderRadius: BorderRadius.circular(20),
// ),
// ),
// child: const TitleMedium(
// text: 'Create a unit',
// style: TextStyle(fontSize: 16, fontWeight: FontWeight.w400, color: Colors.white),
// ),
// ),
// ),
// ),
// ],
// ),
// );
// }
// }