From 009ede7d081b5d4dea38d45753fc06113e9ec502 Mon Sep 17 00:00:00 2001 From: mohammad Date: Tue, 18 Feb 2025 12:37:00 +0300 Subject: [PATCH] overwrite dialog and progress indicator and success dialog --- assets/icons/success_icon.svg | 3 + .../ac/view/ac_device_control.dart | 10 +- .../space_tree/view/space_tree_view.dart | 169 +++++++++--- .../models/space_template_model.dart | 2 +- .../dialog/confirm_overwrite_dialog.dart | 12 +- .../widgets/dialog/custom_loading_dialog.dart | 43 +-- .../link_space_model_spaces_dialog.dart | 255 ++++++++++-------- .../dialog/linking_attention_dialog.dart | 1 - .../widgets/dialog/linking_successful.dart | 33 +++ .../widgets/dialog/overwrite_dialog.dart | 8 +- lib/services/space_mana_api.dart | 1 - lib/utils/constants/assets.dart | 3 +- 12 files changed, 337 insertions(+), 203 deletions(-) create mode 100644 assets/icons/success_icon.svg create mode 100644 lib/pages/spaces_management/space_model/widgets/dialog/linking_successful.dart diff --git a/assets/icons/success_icon.svg b/assets/icons/success_icon.svg new file mode 100644 index 00000000..6f5dbf9e --- /dev/null +++ b/assets/icons/success_icon.svg @@ -0,0 +1,3 @@ + + + diff --git a/lib/pages/device_managment/ac/view/ac_device_control.dart b/lib/pages/device_managment/ac/view/ac_device_control.dart index 5197d722..071344d7 100644 --- a/lib/pages/device_managment/ac/view/ac_device_control.dart +++ b/lib/pages/device_managment/ac/view/ac_device_control.dart @@ -24,7 +24,8 @@ class AcDeviceControlsView extends StatelessWidget with HelperResponsiveLayout { final isLarge = isLargeScreenSize(context); final isMedium = isMediumScreenSize(context); return BlocProvider( - create: (context) => AcBloc(deviceId: device.uuid!)..add(AcFetchDeviceStatusEvent(device.uuid!)), + create: (context) => AcBloc(deviceId: device.uuid!) + ..add(AcFetchDeviceStatusEvent(device.uuid!)), child: BlocBuilder( builder: (context, state) { if (state is ACStatusLoaded) { @@ -98,7 +99,8 @@ class AcDeviceControlsView extends StatelessWidget with HelperResponsiveLayout { ), Text( 'h', - style: context.textTheme.bodySmall!.copyWith(color: ColorsManager.blackColor), + style: context.textTheme.bodySmall! + .copyWith(color: ColorsManager.blackColor), ), Text( '30', @@ -107,7 +109,9 @@ class AcDeviceControlsView extends StatelessWidget with HelperResponsiveLayout { fontWeight: FontWeight.bold, ), ), - Text('m', style: context.textTheme.bodySmall!.copyWith(color: ColorsManager.blackColor)), + Text('m', + style: context.textTheme.bodySmall! + .copyWith(color: ColorsManager.blackColor)), IconButton( padding: const EdgeInsets.all(0), onPressed: () {}, diff --git a/lib/pages/space_tree/view/space_tree_view.dart b/lib/pages/space_tree/view/space_tree_view.dart index de9d088e..3954f200 100644 --- a/lib/pages/space_tree/view/space_tree_view.dart +++ b/lib/pages/space_tree/view/space_tree_view.dart @@ -1,5 +1,6 @@ import 'package:flutter/material.dart'; import 'package:flutter_bloc/flutter_bloc.dart'; +import 'package:flutter_svg/svg.dart'; import 'package:syncrow_web/common/widgets/search_bar.dart'; import 'package:syncrow_web/pages/space_tree/bloc/space_tree_bloc.dart'; import 'package:syncrow_web/pages/space_tree/bloc/space_tree_event.dart'; @@ -8,11 +9,14 @@ import 'package:syncrow_web/pages/space_tree/view/custom_expansion.dart'; import 'package:syncrow_web/pages/spaces_management/all_spaces/model/community_model.dart'; import 'package:syncrow_web/pages/spaces_management/all_spaces/model/space_model.dart'; import 'package:syncrow_web/utils/color_manager.dart'; +import 'package:syncrow_web/utils/constants/assets.dart'; +import 'package:syncrow_web/utils/extension/build_context_x.dart'; import 'package:syncrow_web/utils/style.dart'; class SpaceTreeView extends StatefulWidget { + final bool? isSide; final Function onSelect; - const SpaceTreeView({required this.onSelect, super.key}); + const SpaceTreeView({required this.onSelect, this.isSide, super.key}); @override State createState() => _SpaceTreeViewState(); @@ -29,20 +33,77 @@ class _SpaceTreeViewState extends State { @override Widget build(BuildContext context) { - return BlocBuilder(builder: (context, state) { - List list = state.isSearching ? state.filteredCommunity : state.communityList; + return BlocBuilder( + builder: (context, state) { + List list = + state.isSearching ? state.filteredCommunity : state.communityList; return Container( height: MediaQuery.sizeOf(context).height, - decoration: subSectionContainerDecoration, + decoration: + widget.isSide == true ? subSectionContainerDecoration : null, child: state is SpaceTreeLoadingState ? const Center(child: CircularProgressIndicator()) : Column( children: [ - CustomSearchBar( - onSearchChanged: (query) { - context.read().add(SearchQueryEvent(query)); - }, - ), + widget.isSide == true + ? Container( + decoration: const BoxDecoration( + color: ColorsManager.circleRolesBackground, + borderRadius: BorderRadius.only( + topRight: Radius.circular(20), + topLeft: Radius.circular(20)), + ), + child: Padding( + padding: const EdgeInsets.all(8.0), + child: Row( + children: [ + Expanded( + child: Container( + decoration: BoxDecoration( + borderRadius: const BorderRadius.all( + Radius.circular(20)), + border: Border.all( + color: ColorsManager.grayBorder)), + child: TextFormField( + style: + const TextStyle(color: Colors.black), + onChanged: (value) { + context + .read() + .add(SearchQueryEvent(value)); + }, + decoration: textBoxDecoration(radios: 20)! + .copyWith( + fillColor: Colors.white, + suffixIcon: Padding( + padding: + const EdgeInsets.only(right: 16), + child: SvgPicture.asset( + Assets.textFieldSearch, + width: 24, + height: 24, + ), + ), + hintStyle: context.textTheme.bodyMedium + ?.copyWith( + fontWeight: FontWeight.w400, + fontSize: 12, + color: ColorsManager.textGray), + ), + ), + ), + ), + ], + ), + ), + ) + : CustomSearchBar( + onSearchChanged: (query) { + context + .read() + .add(SearchQueryEvent(query)); + }, + ), const SizedBox(height: 16), Expanded( child: ListView( @@ -56,14 +117,18 @@ class _SpaceTreeViewState extends State { ? Center( child: Text( 'No results found', - style: Theme.of(context).textTheme.bodySmall!.copyWith( + style: Theme.of(context) + .textTheme + .bodySmall! + .copyWith( color: ColorsManager.lightGrayColor, fontWeight: FontWeight.w400, ), ), ) : Scrollbar( - scrollbarOrientation: ScrollbarOrientation.left, + scrollbarOrientation: + ScrollbarOrientation.left, thumbVisibility: true, controller: _scrollController, child: Padding( @@ -73,47 +138,68 @@ class _SpaceTreeViewState extends State { shrinkWrap: true, children: list .map( - (community) => CustomExpansionTileSpaceTree( + (community) => + CustomExpansionTileSpaceTree( title: community.name, - isSelected: state.selectedCommunities + isSelected: state + .selectedCommunities .contains(community.uuid), - isSoldCheck: state.selectedCommunities + isSoldCheck: state + .selectedCommunities .contains(community.uuid), onExpansionChanged: () { context .read() - .add(OnCommunityExpanded(community.uuid)); + .add(OnCommunityExpanded( + community.uuid)); }, - isExpanded: state.expandedCommunities + isExpanded: state + .expandedCommunities .contains(community.uuid), onItemSelected: () { - context.read().add( - OnCommunitySelected( - community.uuid, community.spaces)); + context + .read() + .add(OnCommunitySelected( + community.uuid, + community.spaces)); widget.onSelect(); }, - children: community.spaces.map((space) { + children: + community.spaces.map((space) { return CustomExpansionTileSpaceTree( title: space.name, - isExpanded: - state.expandedSpaces.contains(space.uuid), + isExpanded: state + .expandedSpaces + .contains(space.uuid), onItemSelected: () { - context.read().add( - OnSpaceSelected(community.uuid, - space.uuid ?? '', space.children)); + context + .read() + .add(OnSpaceSelected( + community.uuid, + space.uuid ?? '', + space.children)); widget.onSelect(); }, onExpansionChanged: () { - context.read().add( - OnSpaceExpanded( - community.uuid, space.uuid ?? '')); + context + .read() + .add(OnSpaceExpanded( + community.uuid, + space.uuid ?? '')); }, - isSelected: - state.selectedSpaces.contains(space.uuid) || - state.soldCheck.contains(space.uuid), - isSoldCheck: state.soldCheck.contains(space.uuid), + isSelected: state + .selectedSpaces + .contains( + space.uuid) || + state.soldCheck + .contains(space.uuid), + isSoldCheck: state.soldCheck + .contains(space.uuid), children: _buildNestedSpaces( - context, state, space, community.uuid), + context, + state, + space, + community.uuid), ); }).toList(), ), @@ -195,23 +281,24 @@ class _SpaceTreeViewState extends State { }); } - List _buildNestedSpaces( - BuildContext context, SpaceTreeState state, SpaceModel space, String communityId) { + List _buildNestedSpaces(BuildContext context, SpaceTreeState state, + SpaceModel space, String communityId) { return space.children.map((child) { return CustomExpansionTileSpaceTree( - isSelected: - state.selectedSpaces.contains(child.uuid) || state.soldCheck.contains(child.uuid), + isSelected: state.selectedSpaces.contains(child.uuid) || + state.soldCheck.contains(child.uuid), isSoldCheck: state.soldCheck.contains(child.uuid), title: child.name, isExpanded: state.expandedSpaces.contains(child.uuid), onItemSelected: () { - context - .read() - .add(OnSpaceSelected(communityId, child.uuid ?? '', child.children)); + context.read().add( + OnSpaceSelected(communityId, child.uuid ?? '', child.children)); widget.onSelect(); }, onExpansionChanged: () { - context.read().add(OnSpaceExpanded(communityId, child.uuid ?? '')); + context + .read() + .add(OnSpaceExpanded(communityId, child.uuid ?? '')); }, children: _buildNestedSpaces(context, state, child, communityId), ); diff --git a/lib/pages/spaces_management/space_model/models/space_template_model.dart b/lib/pages/spaces_management/space_model/models/space_template_model.dart index aca986bf..3323fe6e 100644 --- a/lib/pages/spaces_management/space_model/models/space_template_model.dart +++ b/lib/pages/spaces_management/space_model/models/space_template_model.dart @@ -11,7 +11,7 @@ class SpaceTemplateModel extends Equatable { List? subspaceModels; final List? tags; String internalId; - DateTime? createdAt; + String? createdAt; @override List get props => [modelName, subspaceModels, tags]; diff --git a/lib/pages/spaces_management/space_model/widgets/dialog/confirm_overwrite_dialog.dart b/lib/pages/spaces_management/space_model/widgets/dialog/confirm_overwrite_dialog.dart index 7e7c5641..ba1d261d 100644 --- a/lib/pages/spaces_management/space_model/widgets/dialog/confirm_overwrite_dialog.dart +++ b/lib/pages/spaces_management/space_model/widgets/dialog/confirm_overwrite_dialog.dart @@ -1,4 +1,5 @@ import 'package:flutter/material.dart'; +import 'package:syncrow_web/pages/spaces_management/space_model/widgets/dialog/linking_successful.dart'; import 'package:syncrow_web/utils/color_manager.dart'; class ConfirmOverwriteDialog extends StatelessWidget { @@ -56,7 +57,16 @@ class ConfirmOverwriteDialog extends StatelessWidget { const SizedBox(width: 10), Expanded( child: ElevatedButton( - onPressed: () {}, + onPressed: () { + Navigator.pop(context); + + showDialog( + context: context, + builder: (BuildContext dialogContext) { + return const LinkingSuccessful(); + }, + ); + }, style: ElevatedButton.styleFrom( padding: const EdgeInsets.symmetric(vertical: 14), backgroundColor: ColorsManager.secondaryColor, diff --git a/lib/pages/spaces_management/space_model/widgets/dialog/custom_loading_dialog.dart b/lib/pages/spaces_management/space_model/widgets/dialog/custom_loading_dialog.dart index 2d50d93b..e0260887 100644 --- a/lib/pages/spaces_management/space_model/widgets/dialog/custom_loading_dialog.dart +++ b/lib/pages/spaces_management/space_model/widgets/dialog/custom_loading_dialog.dart @@ -1,42 +1,7 @@ import 'dart:math'; import 'package:flutter/material.dart'; +import 'package:syncrow_web/pages/spaces_management/space_model/widgets/dialog/linking_successful.dart'; -void showCustomLoadingDialog(BuildContext context) { - showDialog( - context: context, - barrierDismissible: false, // Prevent closing by tapping outside - builder: (BuildContext context) { - Future.delayed(Duration(seconds: 3), () { - Navigator.of(context).pop(); // Auto-close after 3 seconds - }); - - return Dialog( - shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(20)), - elevation: 10, - backgroundColor: Colors.white, - child: Padding( - padding: EdgeInsets.symmetric(vertical: 30, horizontal: 50), - child: Column( - mainAxisSize: MainAxisSize.min, - children: [ - // Custom loader - CustomLoadingIndicator(), - SizedBox(height: 20), - Text( - "Linking in progress", - style: TextStyle( - fontSize: 16, - fontWeight: FontWeight.w500, - color: Colors.black87, - ), - ), - ], - ), - ), - ); - }, - ); -} class CustomLoadingIndicator extends StatefulWidget { @override @@ -52,8 +17,8 @@ class _CustomLoadingIndicatorState extends State super.initState(); _controller = AnimationController( vsync: this, - duration: Duration(seconds: 1), // Rotation speed - )..repeat(); // Infinite animation + duration: const Duration(seconds: 1), + )..repeat(); } @override @@ -71,7 +36,7 @@ class _CustomLoadingIndicatorState extends State animation: _controller, builder: (context, child) { return Transform.rotate( - angle: _controller.value * 2 * pi, // Full rotation + angle: _controller.value * 2 * pi, child: CustomPaint( painter: LoadingPainter(), ), diff --git a/lib/pages/spaces_management/space_model/widgets/dialog/link_space_model_spaces_dialog.dart b/lib/pages/spaces_management/space_model/widgets/dialog/link_space_model_spaces_dialog.dart index ff38152e..abcbedd8 100644 --- a/lib/pages/spaces_management/space_model/widgets/dialog/link_space_model_spaces_dialog.dart +++ b/lib/pages/spaces_management/space_model/widgets/dialog/link_space_model_spaces_dialog.dart @@ -1,11 +1,9 @@ import 'package:flutter/material.dart'; -import 'package:flutter_svg/svg.dart'; -import 'package:syncrow_web/pages/roles_and_permission/users_page/add_user_dialog/view/build_tree_view.dart'; +import 'package:syncrow_web/pages/space_tree/view/space_tree_view.dart'; import 'package:syncrow_web/pages/spaces_management/space_model/models/space_template_model.dart'; +import 'package:syncrow_web/pages/spaces_management/space_model/widgets/dialog/confirm_overwrite_dialog.dart'; +import 'package:syncrow_web/pages/spaces_management/space_model/widgets/dialog/custom_loading_dialog.dart'; import 'package:syncrow_web/utils/color_manager.dart'; -import 'package:syncrow_web/utils/constants/assets.dart'; -import 'package:syncrow_web/utils/extension/build_context_x.dart'; -import 'package:syncrow_web/utils/style.dart'; class LinkSpaceModelSpacesDialog extends StatelessWidget { final SpaceTemplateModel spaceModel; @@ -16,114 +14,69 @@ class LinkSpaceModelSpacesDialog extends StatelessWidget { @override Widget build(BuildContext context) { return AlertDialog( + contentPadding: EdgeInsets.zero, shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(20)), backgroundColor: Colors.white, - contentPadding: const EdgeInsets.all(20), content: SizedBox( width: MediaQuery.of(context).size.width * 0.4, child: Column( mainAxisSize: MainAxisSize.min, crossAxisAlignment: CrossAxisAlignment.start, children: [ - // Title - const Center( - child: Text( - "Link Space Model to Spaces", - style: TextStyle( - fontSize: 18, - fontWeight: FontWeight.bold, - color: Colors.blueAccent, - ), - ), - ), - const Divider(), - const SizedBox(height: 16), - - // Details Section - _buildDetailRow("Space model name:", spaceModel.modelName), - _buildDetailRow("Creation date and time:", spaceModel.modelName), - _buildDetailRow("Created by:", "Admin"), - const SizedBox(height: 12), - - // Link to Section - const Text( - "Link to:", - style: TextStyle(fontWeight: FontWeight.bold), - ), - const Text( - "Please select all the spaces where you would like to link the Routine.", - style: TextStyle(fontSize: 12, color: Colors.grey), - ), - - const SizedBox(height: 8), - - // Spaces List Expanded( - child: SizedBox( + child: Padding( + padding: const EdgeInsets.all(15.0), child: Column( + mainAxisSize: MainAxisSize.min, + crossAxisAlignment: CrossAxisAlignment.start, children: [ - Expanded( - flex: 2, - child: Container( - decoration: const BoxDecoration( - color: ColorsManager.circleRolesBackground, - borderRadius: BorderRadius.only( - topRight: Radius.circular(20), - topLeft: Radius.circular(20)), - ), - child: Padding( - padding: const EdgeInsets.all(8.0), - child: Row( - children: [ - Expanded( - child: Container( - decoration: BoxDecoration( - borderRadius: const BorderRadius.all( - Radius.circular(20)), - border: Border.all( - color: ColorsManager.grayBorder)), - child: TextFormField( - style: const TextStyle(color: Colors.black), - // controller: _blocRole.firstNameController, - onChanged: (value) { - // _blocRole.add(SearchAnode( - // nodes: _blocRole.updatedCommunities, - // searchTerm: value)); - }, - decoration: - textBoxDecoration(radios: 20)!.copyWith( - fillColor: Colors.white, - suffixIcon: Padding( - padding: - const EdgeInsets.only(right: 16), - child: SvgPicture.asset( - Assets.textFieldSearch, - width: 24, - height: 24, - ), - ), - hintStyle: context.textTheme.bodyMedium - ?.copyWith( - fontWeight: FontWeight.w400, - fontSize: 12, - color: ColorsManager.textGray), - ), - ), - ), - ), - ], - ), + const Center( + child: Text( + "Link Space Model to Spaces", + style: TextStyle( + fontSize: 18, + fontWeight: FontWeight.bold, + color: Colors.blueAccent, ), ), ), + const Divider(), + const SizedBox(height: 16), + _buildDetailRow("Space model name:", + spaceModel.modelName), + _buildDetailRow("Creation date and time:", + spaceModel.createdAt.toString()), + _buildDetailRow("Created by:", "Admin"), + const SizedBox(height: 12), + const Text( + "Link to:", + style: TextStyle(fontWeight: FontWeight.bold), + ), + const Text( + "Please select all the spaces where you would like to link the Routine.", + style: TextStyle(fontSize: 12, color: Colors.grey), + ), + const SizedBox(height: 8), Expanded( - flex: 7, - child: Container( - color: ColorsManager.circleRolesBackground, - padding: const EdgeInsets.all(8.0), - child: Container( - color: ColorsManager.whiteColors, - child: TreeView(userId: '')))) + child: SizedBox( + child: Column( + children: [ + Expanded( + flex: 7, + child: Container( + color: ColorsManager.whiteColors, + child: SpaceTreeView( + isSide: true, onSelect: () { + + })) + ) + ], + ), + ), + ), + const SizedBox( + height: 20, + ), ], ), ), @@ -131,14 +84,98 @@ class LinkSpaceModelSpacesDialog extends StatelessWidget { // Buttons Row( - mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [ - _buildButton("Cancel", Colors.grey, () { - Navigator.of(context).pop(); - }), - _buildButton("Confirm", Colors.blueAccent, () { - Navigator.of(context).pop(); - }), + Expanded( + child: Container( + height: 50, + decoration: const BoxDecoration( + border: Border( + right: BorderSide( + color: ColorsManager.grayColor, + width: 0.5, + ), + top: BorderSide( + color: ColorsManager.grayColor, + width: 1, + ), + ), + ), + child: _buildButton("Cancel", Colors.grey, () { + Navigator.of(context).pop(); + }), + ), + ), + Expanded( + child: Container( + height: 50, + decoration: const BoxDecoration( + border: Border( + left: BorderSide( + color: ColorsManager.grayColor, + width: 0.5, + ), + top: BorderSide( + color: ColorsManager.grayColor, + width: 1.0, + ), + ), + ), + child: _buildButton( + "Confirm", ColorsManager.onSecondaryColor, () { + showDialog( + context: context, + barrierDismissible: false, + builder: (BuildContext context) { + return Dialog( + shape: RoundedRectangleBorder( + borderRadius: BorderRadius.circular(20)), + elevation: 10, + backgroundColor: Colors.white, + child: Padding( + padding: const EdgeInsets.symmetric( + vertical: 30, horizontal: 50), + child: Column( + mainAxisSize: MainAxisSize.min, + children: [ + CustomLoadingIndicator(), + const SizedBox(height: 20), + const Text( + "Linking in progress", + style: TextStyle( + fontSize: 16, + fontWeight: FontWeight.w500, + color: Colors.black87, + ), + ), + ], + ), + ), + ); + }, + ).then( + (value) {}, + ); + Future.delayed(const Duration(seconds: 3), () { + Navigator.of(context).pop(); + Navigator.of(context).pop(); + + // showDialog( + // context: context, + // builder: (BuildContext dialogContext) { + // return const LinkingSuccessful(); + // }, + // ); + + showDialog( + context: context, + builder: (BuildContext dialogContext) { + return const ConfirmOverwriteDialog(); + }, + ); + }); + }), + ), + ), ], ), ], @@ -176,14 +213,10 @@ class LinkSpaceModelSpacesDialog extends StatelessWidget { Widget _buildButton(String text, Color color, VoidCallback onPressed) { return TextButton( onPressed: onPressed, - style: TextButton.styleFrom( - padding: EdgeInsets.symmetric(horizontal: 20, vertical: 12), - backgroundColor: color.withOpacity(0.2), - shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(8)), - ), child: Text( text, - style: TextStyle(color: color, fontWeight: FontWeight.bold), + style: + TextStyle(color: color, fontWeight: FontWeight.w400, fontSize: 14), ), ); } diff --git a/lib/pages/spaces_management/space_model/widgets/dialog/linking_attention_dialog.dart b/lib/pages/spaces_management/space_model/widgets/dialog/linking_attention_dialog.dart index a0807dba..15d92029 100644 --- a/lib/pages/spaces_management/space_model/widgets/dialog/linking_attention_dialog.dart +++ b/lib/pages/spaces_management/space_model/widgets/dialog/linking_attention_dialog.dart @@ -67,7 +67,6 @@ class LinkingAttentionDialog extends StatelessWidget { .textTheme .bodyMedium ?.copyWith(fontWeight: FontWeight.w400, fontSize: 16), - ), ), ), diff --git a/lib/pages/spaces_management/space_model/widgets/dialog/linking_successful.dart b/lib/pages/spaces_management/space_model/widgets/dialog/linking_successful.dart new file mode 100644 index 00000000..6a228fc1 --- /dev/null +++ b/lib/pages/spaces_management/space_model/widgets/dialog/linking_successful.dart @@ -0,0 +1,33 @@ +import 'package:flutter/material.dart'; +import 'package:flutter_svg/flutter_svg.dart'; +import 'package:syncrow_web/utils/color_manager.dart'; +import 'package:syncrow_web/utils/constants/assets.dart'; + +class LinkingSuccessful extends StatelessWidget { + const LinkingSuccessful({super.key}); + + @override + Widget build(BuildContext context) { + return AlertDialog( + backgroundColor: ColorsManager.whiteColors, + title: Center( + child: SvgPicture.asset( + Assets.successIcon, + )), + content: Column( + mainAxisSize: MainAxisSize.min, + crossAxisAlignment: CrossAxisAlignment.center, + children: [ + Text( + 'Linking successful', + style: Theme.of(context) + .textTheme + .bodyMedium + ?.copyWith(fontWeight: FontWeight.w400, fontSize: 18), + ), + const SizedBox(height: 25), + ], + ), + ); + } +} diff --git a/lib/pages/spaces_management/space_model/widgets/dialog/overwrite_dialog.dart b/lib/pages/spaces_management/space_model/widgets/dialog/overwrite_dialog.dart index 3d207968..8659b7b5 100644 --- a/lib/pages/spaces_management/space_model/widgets/dialog/overwrite_dialog.dart +++ b/lib/pages/spaces_management/space_model/widgets/dialog/overwrite_dialog.dart @@ -3,7 +3,7 @@ import 'package:flutter/material.dart'; void showOverwriteDialog(BuildContext context) { showDialog( context: context, - barrierDismissible: false, // Prevent closing by tapping outside + barrierDismissible: false, builder: (BuildContext context) { return Container( child: Dialog( @@ -19,7 +19,7 @@ void showOverwriteDialog(BuildContext context) { mainAxisSize: MainAxisSize.min, children: [ // Title - Text( + const Text( "Overwrite", style: TextStyle( fontSize: 22, @@ -30,7 +30,7 @@ void showOverwriteDialog(BuildContext context) { SizedBox(height: 15), // Description - Text( + const Text( "Are you sure you want to overwrite?", style: TextStyle(fontSize: 16, fontWeight: FontWeight.w500), textAlign: TextAlign.center, @@ -70,7 +70,7 @@ void showOverwriteDialog(BuildContext context) { fontWeight: FontWeight.w500, ), ), - ), + ), ), SizedBox(width: 10), diff --git a/lib/services/space_mana_api.dart b/lib/services/space_mana_api.dart index 788b9455..c4877c98 100644 --- a/lib/services/space_mana_api.dart +++ b/lib/services/space_mana_api.dart @@ -281,7 +281,6 @@ class CommunitySpaceManagementApi { .replaceAll('{communityId}', communityId) .replaceAll('{projectId}', TempConst.projectId), expectedResponseModel: (json) { - print('json space=$json'); final spaceModels = (json['data'] as List) .map((spaceJson) => SpaceModel.fromJson(spaceJson)) .toList(); diff --git a/lib/utils/constants/assets.dart b/lib/utils/constants/assets.dart index e1b7658b..79efdaaf 100644 --- a/lib/utils/constants/assets.dart +++ b/lib/utils/constants/assets.dart @@ -405,5 +405,6 @@ class Assets { static const String deleteSpaceLinkIcon = 'assets/icons/delete_space_link_icon.svg'; static const String spaceLinkIcon = 'assets/icons/space_link_icon.svg'; + static const String successIcon = 'assets/icons/success_icon.svg'; + } -//space_link_icon.svg