diff --git a/lib/features/app_layout/view/app_layout.dart b/lib/features/app_layout/view/app_layout.dart index cdb1725..35602e1 100644 --- a/lib/features/app_layout/view/app_layout.dart +++ b/lib/features/app_layout/view/app_layout.dart @@ -6,6 +6,8 @@ import 'package:syncrow_app/features/app_layout/bloc/home_cubit.dart'; import 'package:syncrow_app/features/app_layout/view/widgets/app_body.dart'; import 'package:syncrow_app/features/app_layout/view/widgets/default_app_bar.dart'; import 'package:syncrow_app/features/app_layout/view/widgets/default_nav_bar.dart'; +import 'package:syncrow_app/features/devices/view/widgets/smart_door/smart_linkage_view.dart'; +import 'package:syncrow_app/utils/helpers/custom_page_route.dart'; import 'package:syncrow_app/utils/resource_manager/color_manager.dart'; class AppLayout extends StatelessWidget { @@ -24,15 +26,22 @@ class AppLayout extends StatelessWidget { ), child: SafeArea( child: Scaffold( - backgroundColor: ColorsManager.backgroundColor, - extendBodyBehindAppBar: true, - extendBody: true, - appBar: HomeCubit.getInstance().spaces != null - ? const DefaultAppBar() - : null, - body: const AppBody(), - bottomNavigationBar: const DefaultNavBar(), - ), + backgroundColor: ColorsManager.backgroundColor, + extendBodyBehindAppBar: true, + extendBody: true, + appBar: HomeCubit.getInstance().spaces != null + ? const DefaultAppBar() + : null, + body: const AppBody(), + bottomNavigationBar: const DefaultNavBar(), + floatingActionButton: FloatingActionButton( + onPressed: () { + Navigator.of(context).push(CustomPageRoute( + builder: (context) => const SmartLinkgeView())); + }, + backgroundColor: ColorsManager.primaryColor, + child: const Icon(Icons.refresh), + )), ), ); }, diff --git a/lib/features/devices/view/widgets/smart_door/smart_linkage_view.dart b/lib/features/devices/view/widgets/smart_door/smart_linkage_view.dart index b3f2d25..54c10cf 100644 --- a/lib/features/devices/view/widgets/smart_door/smart_linkage_view.dart +++ b/lib/features/devices/view/widgets/smart_door/smart_linkage_view.dart @@ -1,12 +1,14 @@ import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; -import 'package:flutter/widgets.dart'; import 'package:flutter_svg/flutter_svg.dart'; +import 'package:syncrow_app/features/shared_widgets/default_button.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_large.dart'; +import 'package:syncrow_app/features/shared_widgets/text_widgets/body_medium.dart'; import 'package:syncrow_app/features/shared_widgets/text_widgets/body_small.dart'; import 'package:syncrow_app/generated/assets.dart'; +import 'package:syncrow_app/utils/resource_manager/color_manager.dart'; class SmartLinkgeView extends StatelessWidget { const SmartLinkgeView({super.key}); @@ -90,6 +92,16 @@ class SmartLinkgeView extends StatelessWidget { ], ), ), + const Spacer(), + DefaultContainer( + onTap: () {}, + padding: const EdgeInsets.symmetric(horizontal: 50, vertical: 10), + color: ColorsManager.primaryColorWithOpacity, + child: const BodyMedium( + text: 'Custom linkage Type', + fontColor: Colors.white, + ), + ), ], ), ); diff --git a/lib/features/shared_widgets/default_button.dart b/lib/features/shared_widgets/default_button.dart index 05bcf7d..09ad431 100644 --- a/lib/features/shared_widgets/default_button.dart +++ b/lib/features/shared_widgets/default_button.dart @@ -15,15 +15,18 @@ class DefaultButton extends StatelessWidget { this.customButtonStyle, this.backgroundColor, this.foregroundColor, + this.borderRadius, + this.height, + this.padding, }); final void Function()? onPressed; final Widget child; - + final double? height; final bool isSecondary; - + final double? borderRadius; final bool enabled; - + final double? padding; final bool isDone; final bool isLoading; @@ -65,21 +68,21 @@ class DefaultButton extends StatelessWidget { }), shape: MaterialStateProperty.all( RoundedRectangleBorder( - borderRadius: BorderRadius.circular(20), + borderRadius: BorderRadius.circular(borderRadius ?? 20), ), ), fixedSize: MaterialStateProperty.all( const Size.fromHeight(50), ), padding: MaterialStateProperty.all( - const EdgeInsets.all(10), + EdgeInsets.all(padding ?? 10), ), minimumSize: MaterialStateProperty.all( const Size.fromHeight(50), ), ), child: SizedBox( - height: 50, + height: height ?? 50, child: Center( child: isLoading ? const SizedBox.square(