mirror of
https://github.com/SyncrowIOT/web.git
synced 2025-07-10 07:07:19 +00:00
36 lines
952 B
Dart
36 lines
952 B
Dart
import 'package:flutter/material.dart';
|
|
import 'package:syncrow_web/pages/space_tree/view/custom_expansion.dart';
|
|
|
|
class CommunityTileSpaceTree extends StatelessWidget {
|
|
final String title;
|
|
final List<Widget>? children;
|
|
final bool isExpanded;
|
|
final bool isSelected;
|
|
final Function(String, bool) onExpansionChanged;
|
|
final Function() onItemSelected;
|
|
|
|
const CommunityTileSpaceTree({
|
|
super.key,
|
|
required this.title,
|
|
required this.isExpanded,
|
|
required this.onExpansionChanged,
|
|
required this.onItemSelected,
|
|
required this.isSelected,
|
|
this.children,
|
|
});
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
return CustomExpansionTileSpaceTree(
|
|
title: title,
|
|
initiallyExpanded: isExpanded,
|
|
isSelected: isSelected,
|
|
onExpansionChanged: (bool expanded) {
|
|
onExpansionChanged(title, expanded);
|
|
},
|
|
onItemSelected: onItemSelected,
|
|
children: children ?? [],
|
|
);
|
|
}
|
|
}
|