forked from eatvio/eatvio_app
38 lines
1.4 KiB
Dart
38 lines
1.4 KiB
Dart
import 'package:eatvio_app/core/theme/custom_text_style.dart';
|
|
import 'package:eatvio_app/core/theme/theme_helper.dart';
|
|
import 'package:eatvio_app/core/widgets/main_background_bouble.dart';
|
|
import 'package:flutter/material.dart';
|
|
|
|
class ExpandableBouble extends StatelessWidget {
|
|
const ExpandableBouble({super.key, required this.title, required this.children, this.initiallyExpanded = false});
|
|
final String title;
|
|
final List<Widget> children;
|
|
final bool initiallyExpanded;
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
return AnimatedSize(
|
|
duration: const Duration(seconds: 1),
|
|
child: MainBackgroundBouble(
|
|
child: Theme(
|
|
data: Theme.of(context).copyWith(dividerColor: Colors.transparent),
|
|
child: Material(
|
|
color: Colors.transparent,
|
|
child: ExpansionTile(
|
|
initiallyExpanded: initiallyExpanded,
|
|
expandedCrossAxisAlignment: CrossAxisAlignment.start,
|
|
expandedAlignment: Alignment.bottomLeft,
|
|
tilePadding: const EdgeInsets.symmetric(horizontal: 16),
|
|
childrenPadding: const EdgeInsets.symmetric(horizontal: 16),
|
|
title: Text(
|
|
title,
|
|
style: TextStyles.headingXLSemibold.copyWith(color: appTheme.black),
|
|
),
|
|
children: children,
|
|
),
|
|
),
|
|
),
|
|
),
|
|
);
|
|
}
|
|
}
|