Added join home page

This commit is contained in:
Mohammad Salameh
2024-04-23 20:19:43 +03:00
parent 3a41a7118d
commit 8550e81b4e
2 changed files with 65 additions and 1 deletions

View File

@ -3,6 +3,7 @@ import 'package:flutter_bloc/flutter_bloc.dart';
import 'package:syncrow_app/features/auth/bloc/auth_cubit.dart';
import 'package:syncrow_app/features/menu/bloc/menu_cubit.dart';
import 'package:syncrow_app/features/menu/view/widgets/home%20management/create_home_view.dart';
import 'package:syncrow_app/features/menu/view/widgets/join_home/join_home_view.dart';
import 'package:syncrow_app/features/menu/view/widgets/menu_list.dart';
import 'package:syncrow_app/features/menu/view/widgets/profile/profile_tab.dart';
import 'package:syncrow_app/features/shared_widgets/default_container.dart';
@ -92,7 +93,7 @@ List<Map<String, Object>> menuSections = [
{
'title': 'Join a Home',
'Icon': Assets.homeManagementIconsJoinAHome,
'page': null
'page': const JoinHomeView()
},
{
'title': 'Manage Your Home',

View File

@ -0,0 +1,63 @@
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:flutter_svg/flutter_svg.dart';
import 'package:syncrow_app/features/shared_widgets/default_container.dart';
import 'package:syncrow_app/features/shared_widgets/default_scaffold.dart';
import 'package:syncrow_app/features/shared_widgets/text_widgets/body_medium.dart';
import 'package:syncrow_app/generated/assets.dart';
import 'package:syncrow_app/utils/context_extension.dart';
class JoinHomeView extends StatelessWidget {
const JoinHomeView({super.key});
@override
Widget build(BuildContext context) {
return DefaultScaffold(
title: "Join a Home",
child: Column(
children: [
SvgPicture.asset(
Assets.homeManagementIconsJoinAHome,
width: 70,
height: 70,
),
const Padding(
padding: EdgeInsets.symmetric(
vertical: 30,
),
child: BodyMedium(
textAlign: TextAlign.center,
text:
'Please contact with the\nadministration to get an invitation\n(Menu → Manage your Home → Add Member)'),
),
DefaultContainer(
padding: const EdgeInsets.symmetric(
vertical: 5,
),
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Flexible(
child: TextField(
decoration: InputDecoration(
hintText: 'Invitatoin code',
hintStyle:
context.bodyMedium.copyWith(color: Colors.grey),
border: InputBorder.none,
),
),
),
IconButton(
onPressed: () {},
icon: const Icon(
Icons.arrow_right_alt,
),
),
],
),
),
],
),
);
}
}