Untitled
unknown
plain_text
5 months ago
4.2 kB
3
Indexable
import 'package:Buildeffective/src/model/property_info_response.dart'; import 'package:Buildeffective/src/screens/homeguide_screen/space_dashboard_screen.dart'; import 'package:Buildeffective/src/screens/homeguide_screen/widget/upload_image_place_holder.dart'; import 'package:Buildeffective/src/screens/splash/splash_screen.dart'; import 'package:Buildeffective/src/ui_component/common_cached_image.dart'; import 'package:Buildeffective/src/utils/comman_export.dart'; import 'package:flutter/material.dart'; import 'package:flutter_mobx/flutter_mobx.dart'; import 'package:flutter_svg/flutter_svg.dart'; import 'package:nb_utils/nb_utils.dart'; class HeaderComponent extends StatelessWidget { final MyProperty ownProperty; final bool? isTablet; const HeaderComponent({ super.key, required this.ownProperty, this.isTablet, }); @override Widget build(BuildContext context) { return Stack( // fit: StackFit.expand, children: [ Observer(builder: (context) { return CommonCachedImage( imageUrl: homeGuideViewModel.uploadedImage, height: SplashScreen.isMobileDevice ? context.height() * 0.48 : context.height() * 0.5, width: context.width(), isCircle: false, boxFit: BoxFit.cover, placeHolder: UploadImagePlaceHolder(isTablet: isTablet), ).cornerRadiusWithClipRRectOnly(bottomLeft: 20, bottomRight: 20); }), Positioned( bottom: 20, right: SplashScreen.isMobileDevice ? 16 : null, left: 16, child: Container( padding: SplashScreen.isMobileDevice ? EdgeInsets.only(left: 20, top: 20, right: 20, bottom: 20) : EdgeInsets.all(16), decoration: BoxDecoration( color: Colors.white, boxShadow: defaultBoxShadow(blurRadius: 2, spreadRadius: 1), borderRadius: radius(14), ), child: Column( crossAxisAlignment: CrossAxisAlignment.start, mainAxisSize: MainAxisSize.min, children: [ Text(ownProperty.name.validate(), style: BETextStyles.titleWithDarkBlueColor), 12.height, Row( mainAxisAlignment: MainAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start, mainAxisSize: SplashScreen.isMobileDevice ? MainAxisSize.max : MainAxisSize.min, children: [ CommonCachedImage( imageUrl: ownProperty.attachmentDocs.validate().isNotEmpty ? ownProperty.attachmentDocs?.first.originalUrl.validate() : null, height: 66, width: 66, isCircle: false, placeHolder: Container( height: 66, width: 66, alignment: Alignment.center, decoration: BoxDecoration(color: Color.fromRGBO(242, 242, 242, 1)), child: SvgPicture.asset(ResImages.ic_empty_address_icon, height: 38, width: 38), ), ).cornerRadiusWithClipRRect(6), 8.width, Column( crossAxisAlignment: CrossAxisAlignment.start, mainAxisAlignment: MainAxisAlignment.start, mainAxisSize: MainAxisSize.min, children: [ Text(ownProperty.propertyType.validate(), style: BETextStyles.MediumTextStyleWithDarkBlueColor), 6.height, Text( ownProperty.addressText.validate(), style: BETextStyles.InfoTextStyleWithDarkBlueColor, maxLines: 2, overflow: TextOverflow.ellipsis, ), ], ).expand(flex: SplashScreen.isMobileDevice ? 1 : 0), ], ) ], ), ), ), ], ); } }
Editor is loading...
Leave a Comment