mirror of
https://github.com/SyncrowIOT/web.git
synced 2025-11-27 18:14:56 +00:00
changed Text style to use theme
This commit is contained in:
@ -109,7 +109,7 @@ class _CommunityStructureAreaState extends State<CommunityStructureArea> {
|
|||||||
children: [
|
children: [
|
||||||
CommunityStructureHeader(
|
CommunityStructureHeader(
|
||||||
communityName: widget.selectedCommunity?.name,
|
communityName: widget.selectedCommunity?.name,
|
||||||
isSave: widget.spaces.isNotEmpty,
|
isSave: spaces.isNotEmpty,
|
||||||
isEditingName: isEditingName,
|
isEditingName: isEditingName,
|
||||||
nameController: _nameController,
|
nameController: _nameController,
|
||||||
onSave: _saveSpaces,
|
onSave: _saveSpaces,
|
||||||
|
|||||||
@ -20,29 +20,40 @@ class SpaceContainerWidget extends StatelessWidget {
|
|||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
|
final theme = Theme.of(context);
|
||||||
|
|
||||||
return GestureDetector(
|
return GestureDetector(
|
||||||
onDoubleTap: onDoubleTap,
|
onDoubleTap: onDoubleTap,
|
||||||
onTap: onTap,
|
onTap: onTap,
|
||||||
child: Container(
|
child: Container(
|
||||||
width: 150,
|
width: 150,
|
||||||
height: 60,
|
height: 60,
|
||||||
decoration: BoxDecoration(
|
decoration: _containerDecoration(),
|
||||||
color: ColorsManager.whiteColors,
|
child: Row(
|
||||||
borderRadius: BorderRadius.circular(15),
|
children: [
|
||||||
boxShadow: [
|
_buildIconContainer(),
|
||||||
BoxShadow(
|
const SizedBox(width: 10),
|
||||||
color: Colors.grey.withOpacity(0.5),
|
Expanded(
|
||||||
spreadRadius: 2,
|
child: Text(
|
||||||
blurRadius: 5,
|
name,
|
||||||
offset: const Offset(0, 3), // shadow position
|
style: theme.textTheme.bodyLarge?.copyWith(
|
||||||
|
fontWeight: FontWeight.bold,
|
||||||
|
color: ColorsManager.blackColor,
|
||||||
|
),
|
||||||
|
overflow: TextOverflow.ellipsis, // Handle long names gracefully
|
||||||
|
),
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
child: Row(
|
),
|
||||||
children: [
|
);
|
||||||
Container(
|
}
|
||||||
|
|
||||||
|
/// Builds the icon container with the SVG asset.
|
||||||
|
Widget _buildIconContainer() {
|
||||||
|
return Container(
|
||||||
width: 40,
|
width: 40,
|
||||||
height: 60,
|
height: double.infinity,
|
||||||
decoration: const BoxDecoration(
|
decoration: const BoxDecoration(
|
||||||
color: ColorsManager.spaceColor,
|
color: ColorsManager.spaceColor,
|
||||||
borderRadius: BorderRadius.only(
|
borderRadius: BorderRadius.only(
|
||||||
@ -58,17 +69,21 @@ class SpaceContainerWidget extends StatelessWidget {
|
|||||||
height: 24,
|
height: 24,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
);
|
||||||
const SizedBox(width: 10),
|
}
|
||||||
Text(
|
|
||||||
name,
|
BoxDecoration _containerDecoration() {
|
||||||
style: const TextStyle(
|
return BoxDecoration(
|
||||||
fontWeight: FontWeight.bold,
|
color: ColorsManager.whiteColors,
|
||||||
fontSize: 16,
|
borderRadius: BorderRadius.circular(15),
|
||||||
),
|
boxShadow: [
|
||||||
|
BoxShadow(
|
||||||
|
color: Colors.grey.withOpacity(0.5),
|
||||||
|
spreadRadius: 2,
|
||||||
|
blurRadius: 5,
|
||||||
|
offset: const Offset(0, 3), // Shadow position
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
),
|
);
|
||||||
));
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user