1use waft_animation::AnimationStyle;
4use waft_embedder::{Clip, Color};
5use waft_foundation::{App, DiagnosticsProperty};
6use waft_painting::{AlignmentGeometry, ColorProperty, EdgeInsetsGeometry, ShapeBorderRef};
7use waft_widgets::{BuildContext, InheritedTheme, InheritedWidget, IntoWidget, KeyRef, WidgetRef};
8
9use crate::theme::Theme;
10
11#[derive(Clone, Debug, Default)]
37pub struct ExpansionTileThemeData {
38 pub background_color: Option<Color>,
40
41 pub collapsed_background_color: Option<Color>,
43
44 pub tile_padding: Option<EdgeInsetsGeometry>,
46
47 pub expanded_alignment: Option<AlignmentGeometry>,
49
50 pub children_padding: Option<EdgeInsetsGeometry>,
52
53 pub icon_color: Option<Color>,
55
56 pub collapsed_icon_color: Option<Color>,
58
59 pub text_color: Option<Color>,
61
62 pub collapsed_text_color: Option<Color>,
64
65 pub shape: Option<ShapeBorderRef>,
67
68 pub collapsed_shape: Option<ShapeBorderRef>,
70
71 pub clip_behavior: Option<Clip>,
73
74 pub expansion_animation_style: Option<AnimationStyle>,
76}
77
78crate::theme_data_getters::theme_data_getters! {
79 pub trait ExpansionTileThemeDataGetters for ExpansionTileThemeData, fields: expansion_tile_theme_data {
83 background_color: Option<Color>,
84 collapsed_background_color: Option<Color>,
85 tile_padding: Option<EdgeInsetsGeometry>,
86 expanded_alignment: Option<AlignmentGeometry>,
87 children_padding: Option<EdgeInsetsGeometry>,
88 icon_color: Option<Color>,
89 collapsed_icon_color: Option<Color>,
90 text_color: Option<Color>,
91 collapsed_text_color: Option<Color>,
92 shape: Option<ShapeBorderRef>,
93 collapsed_shape: Option<ShapeBorderRef>,
94 clip_behavior: Option<Clip>,
95 expansion_animation_style: Option<AnimationStyle>,
96 }
97}
98
99impl ExpansionTileThemeData {
100 pub fn new() -> ExpansionTileThemeData {
103 ExpansionTileThemeData::default()
104 }
105
106 pub fn background_color(mut self, background_color: Color) -> ExpansionTileThemeData {
108 self.background_color = Some(background_color);
109 self
110 }
111
112 pub fn collapsed_background_color(
114 mut self,
115 collapsed_background_color: Color,
116 ) -> ExpansionTileThemeData {
117 self.collapsed_background_color = Some(collapsed_background_color);
118 self
119 }
120
121 pub fn tile_padding(
123 mut self,
124 tile_padding: impl Into<EdgeInsetsGeometry>,
125 ) -> ExpansionTileThemeData {
126 self.tile_padding = Some(tile_padding.into());
127 self
128 }
129
130 pub fn expanded_alignment(
132 mut self,
133 expanded_alignment: impl Into<AlignmentGeometry>,
134 ) -> ExpansionTileThemeData {
135 self.expanded_alignment = Some(expanded_alignment.into());
136 self
137 }
138
139 pub fn children_padding(
141 mut self,
142 children_padding: impl Into<EdgeInsetsGeometry>,
143 ) -> ExpansionTileThemeData {
144 self.children_padding = Some(children_padding.into());
145 self
146 }
147
148 pub fn icon_color(mut self, icon_color: Color) -> ExpansionTileThemeData {
150 self.icon_color = Some(icon_color);
151 self
152 }
153
154 pub fn collapsed_icon_color(mut self, collapsed_icon_color: Color) -> ExpansionTileThemeData {
156 self.collapsed_icon_color = Some(collapsed_icon_color);
157 self
158 }
159
160 pub fn text_color(mut self, text_color: Color) -> ExpansionTileThemeData {
162 self.text_color = Some(text_color);
163 self
164 }
165
166 pub fn collapsed_text_color(mut self, collapsed_text_color: Color) -> ExpansionTileThemeData {
168 self.collapsed_text_color = Some(collapsed_text_color);
169 self
170 }
171
172 pub fn shape(mut self, shape: impl Into<ShapeBorderRef>) -> ExpansionTileThemeData {
174 self.shape = Some(shape.into());
175 self
176 }
177
178 pub fn collapsed_shape(
180 mut self,
181 collapsed_shape: impl Into<ShapeBorderRef>,
182 ) -> ExpansionTileThemeData {
183 self.collapsed_shape = Some(collapsed_shape.into());
184 self
185 }
186
187 pub fn clip_behavior(mut self, clip_behavior: Clip) -> ExpansionTileThemeData {
189 self.clip_behavior = Some(clip_behavior);
190 self
191 }
192
193 pub fn expansion_animation_style(
195 mut self,
196 expansion_animation_style: AnimationStyle,
197 ) -> ExpansionTileThemeData {
198 self.expansion_animation_style = Some(expansion_animation_style);
199 self
200 }
201
202 pub fn copy_with(&self) -> ExpansionTileThemeData {
208 self.clone()
209 }
210
211 pub fn lerp(
213 a: Option<&ExpansionTileThemeData>,
214 b: Option<&ExpansionTileThemeData>,
215 t: f64,
216 ) -> Option<ExpansionTileThemeData> {
217 match (a, b) {
218 (None, None) => return None,
219 (Some(a), Some(b)) if std::ptr::eq(a, b) => return Some(a.clone()),
220 _ => {}
221 }
222 Some(ExpansionTileThemeData {
223 background_color: Color::lerp(
224 a.and_then(|a| a.background_color),
225 b.and_then(|b| b.background_color),
226 t,
227 ),
228 collapsed_background_color: Color::lerp(
229 a.and_then(|a| a.collapsed_background_color),
230 b.and_then(|b| b.collapsed_background_color),
231 t,
232 ),
233 tile_padding: EdgeInsetsGeometry::lerp(
234 a.and_then(|a| a.tile_padding),
235 b.and_then(|b| b.tile_padding),
236 t,
237 ),
238 expanded_alignment: AlignmentGeometry::lerp(
239 a.and_then(|a| a.expanded_alignment),
240 b.and_then(|b| b.expanded_alignment),
241 t,
242 ),
243 children_padding: EdgeInsetsGeometry::lerp(
244 a.and_then(|a| a.children_padding),
245 b.and_then(|b| b.children_padding),
246 t,
247 ),
248 icon_color: Color::lerp(
249 a.and_then(|a| a.icon_color),
250 b.and_then(|b| b.icon_color),
251 t,
252 ),
253 collapsed_icon_color: Color::lerp(
254 a.and_then(|a| a.collapsed_icon_color),
255 b.and_then(|b| b.collapsed_icon_color),
256 t,
257 ),
258 text_color: Color::lerp(
259 a.and_then(|a| a.text_color),
260 b.and_then(|b| b.text_color),
261 t,
262 ),
263 collapsed_text_color: Color::lerp(
264 a.and_then(|a| a.collapsed_text_color),
265 b.and_then(|b| b.collapsed_text_color),
266 t,
267 ),
268 shape: ShapeBorderRef::lerp(
269 a.and_then(|a| a.shape.as_ref()),
270 b.and_then(|b| b.shape.as_ref()),
271 t,
272 ),
273 collapsed_shape: ShapeBorderRef::lerp(
274 a.and_then(|a| a.collapsed_shape.as_ref()),
275 b.and_then(|b| b.collapsed_shape.as_ref()),
276 t,
277 ),
278 clip_behavior: pick(a, b, t, |theme| theme.clip_behavior),
279 expansion_animation_style: pick(a, b, t, |theme| {
280 theme.expansion_animation_style.clone()
281 }),
282 })
283 }
284}
285
286fn pick<T>(
288 a: Option<&ExpansionTileThemeData>,
289 b: Option<&ExpansionTileThemeData>,
290 t: f64,
291 field: impl Fn(&ExpansionTileThemeData) -> Option<T>,
292) -> Option<T> {
293 if t < 0.5 {
294 a.and_then(&field)
295 } else {
296 b.and_then(&field)
297 }
298}
299
300impl PartialEq for ExpansionTileThemeData {
301 fn eq(&self, other: &ExpansionTileThemeData) -> bool {
302 if std::ptr::eq(self, other) {
303 return true;
304 }
305 other.background_color == self.background_color
306 && other.collapsed_background_color == self.collapsed_background_color
307 && other.tile_padding == self.tile_padding
308 && other.expanded_alignment == self.expanded_alignment
309 && other.children_padding == self.children_padding
310 && other.icon_color == self.icon_color
311 && other.collapsed_icon_color == self.collapsed_icon_color
312 && other.text_color == self.text_color
313 && other.collapsed_text_color == self.collapsed_text_color
314 && other.shape == self.shape
315 && other.collapsed_shape == self.collapsed_shape
316 && other.clip_behavior == self.clip_behavior
317 && other.expansion_animation_style == self.expansion_animation_style
318 }
319}
320
321#[derive(Debug)]
329pub struct ExpansionTileTheme {
330 pub key: Option<KeyRef>,
331 pub data: ExpansionTileThemeData,
334 pub child: WidgetRef,
335}
336
337impl ExpansionTileTheme {
338 #[cfg_attr(debug_assertions, track_caller)]
340 pub fn new<K>(data: ExpansionTileThemeData, child: impl IntoWidget<K>) -> ExpansionTileTheme {
341 ExpansionTileTheme {
342 key: None,
343 data,
344 child: child.into_widget(),
345 }
346 }
347
348 pub fn key(mut self, key: KeyRef) -> ExpansionTileTheme {
350 self.key = Some(key);
351 self
352 }
353
354 pub fn of(app: &mut App, context: BuildContext) -> ExpansionTileThemeData {
365 match context.depend_on_inherited_widget_of_exact_type::<ExpansionTileTheme>(app) {
366 Some(inherited_theme) => inherited_theme.data.clone(),
367 None => Theme::of(app, context).expansion_tile_theme.clone(),
368 }
369 }
370}
371
372impl InheritedTheme for ExpansionTileTheme {
373 fn wrap(&self, _app: &mut App, _context: BuildContext, child: WidgetRef) -> WidgetRef {
374 ExpansionTileTheme::new(self.data.clone(), child).into_widget()
375 }
376}
377
378impl InheritedWidget for ExpansionTileTheme {
379 fn key(&self) -> Option<&KeyRef> {
380 self.key.as_ref()
381 }
382
383 fn child(&self) -> &WidgetRef {
384 &self.child
385 }
386
387 fn update_should_notify(&self, old_widget: &ExpansionTileTheme) -> bool {
388 self.data != old_widget.data
389 }
390
391 fn as_inherited_theme(&self) -> Option<&dyn InheritedTheme> {
392 Some(self)
393 }
394}
395
396fn expansion_animation_style(value: &AnimationStyle) -> String {
398 let mut properties = Vec::new();
399 if let Some(curve) = &value.curve {
400 properties.push(format!("curve: {curve:?}"));
401 }
402 if let Some(duration) = &value.duration {
403 properties.push(format!(
404 "duration: {}",
405 waft_embedder::SignedDuration::from(*duration)
406 ));
407 }
408 if let Some(curve) = &value.reverse_curve {
409 properties.push(format!("reverseCurve: {curve:?}"));
410 }
411 if let Some(duration) = &value.reverse_duration {
412 properties.push(format!(
413 "reverseDuration: {}",
414 waft_embedder::SignedDuration::from(*duration)
415 ));
416 }
417 let identity = waft_foundation::describe_identity(
418 "AnimationStyle",
419 value as *const AnimationStyle as *const () as usize as u64,
420 );
421 if properties.is_empty() {
422 identity
423 } else {
424 format!("{identity}({})", properties.join(", "))
425 }
426}
427
428impl waft_foundation::Diagnosticable for ExpansionTileThemeData {
429 fn debug_fill_properties(&self, properties: &mut waft_foundation::DiagnosticPropertiesBuilder) {
430 properties
431 .add(ColorProperty::new("backgroundColor", self.background_color).default_value(None));
432 properties.add(
433 ColorProperty::new("collapsedBackgroundColor", self.collapsed_background_color)
434 .default_value(None),
435 );
436 properties.add(
437 DiagnosticsProperty::<EdgeInsetsGeometry>::new("tilePadding", self.tile_padding)
438 .default_value(None),
439 );
440 properties.add(
441 DiagnosticsProperty::<AlignmentGeometry>::new(
442 "expandedAlignment",
443 self.expanded_alignment,
444 )
445 .default_value(None),
446 );
447 properties.add(
448 DiagnosticsProperty::<EdgeInsetsGeometry>::new(
449 "childrenPadding",
450 self.children_padding,
451 )
452 .default_value(None),
453 );
454 properties.add(ColorProperty::new("iconColor", self.icon_color).default_value(None));
455 properties.add(
456 ColorProperty::new("collapsedIconColor", self.collapsed_icon_color).default_value(None),
457 );
458 properties.add(ColorProperty::new("textColor", self.text_color).default_value(None));
459 properties.add(
460 ColorProperty::new("collapsedTextColor", self.collapsed_text_color).default_value(None),
461 );
462 properties.add(
463 DiagnosticsProperty::<ShapeBorderRef>::new("shape", self.shape.clone())
464 .default_value(None),
465 );
466 properties.add(
467 DiagnosticsProperty::<ShapeBorderRef>::new(
468 "collapsedShape",
469 self.collapsed_shape.clone(),
470 )
471 .default_value(None),
472 );
473 properties.add(
474 DiagnosticsProperty::<waft_foundation::DartEnum<Clip>>::new(
475 "clipBehavior",
476 self.clip_behavior.map(waft_foundation::DartEnum),
477 )
478 .default_value(None),
479 );
480 properties.add(
481 DiagnosticsProperty::<String>::new(
482 "expansionAnimationStyle",
483 self.expansion_animation_style
484 .as_ref()
485 .map(expansion_animation_style),
486 )
487 .default_value(None),
488 );
489 }
490}
491
492impl std::fmt::Display for ExpansionTileThemeData {
493 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
494 f.write_str(&waft_foundation::Diagnosticable::to_string(self))
495 }
496}
497
498#[cfg(test)]
499mod tests {
500 use waft_animation::Curves;
501 use waft_embedder::Color;
502 use waft_painting::{Alignment, Border, BorderSide, EdgeInsets};
503 use waft_widgets::{Center, GlobalKey, Text};
504
505 use waft_widgets::testing::{WidgetTester, find, test_widgets};
506
507 use super::*;
508 use crate::colors::Colors;
509 use crate::expansion_tile::ExpansionTile;
510 use crate::expansion_tile::tests::{
511 animation_style_case, expand_more_rect, last_padding_rect, list_tile_rect, probe, pump_app,
512 sized, test_icon, test_text, tile_material,
513 };
514 use crate::material::Material;
515 use crate::theme_data::ThemeData;
516
517 #[test]
519 fn expansion_tile_theme_data_copy_with_equality_basics() {
520 assert_eq!(
521 ExpansionTileThemeData::new(),
522 ExpansionTileThemeData::new().copy_with()
523 );
524 }
525
526 #[test]
528 fn expansion_tile_theme_data_lerp_special_cases() {
529 assert_eq!(ExpansionTileThemeData::lerp(None, None, 0.0), None);
530 let data = ExpansionTileThemeData::new();
531 assert_eq!(
533 ExpansionTileThemeData::lerp(Some(&data), Some(&data), 0.5),
534 Some(data.clone())
535 );
536 }
537
538 #[test]
540 fn expansion_tile_theme_data_defaults() {
541 let theme = ExpansionTileThemeData::new();
542 assert_eq!(theme.background_color, None);
543 assert_eq!(theme.collapsed_background_color, None);
544 assert_eq!(theme.tile_padding, None);
545 assert_eq!(theme.expanded_alignment, None);
546 assert_eq!(theme.children_padding, None);
547 assert_eq!(theme.icon_color, None);
548 assert_eq!(theme.collapsed_icon_color, None);
549 assert_eq!(theme.text_color, None);
550 assert_eq!(theme.collapsed_text_color, None);
551 assert!(theme.shape.is_none());
552 assert!(theme.collapsed_shape.is_none());
553 assert_eq!(theme.clip_behavior, None);
554 assert_eq!(theme.expansion_animation_style, None);
555 }
556
557 fn vertical_border(color: Color) -> Border {
559 let side = BorderSide {
560 color,
561 ..BorderSide::default()
562 };
563 Border {
564 top: side,
565 bottom: side,
566 ..Border::default()
567 }
568 }
569
570 fn icon_color() -> Color {
571 Colors::GREEN.primary()
572 }
573
574 fn collapsed_icon_color() -> Color {
575 Colors::BLUE.primary()
576 }
577
578 const TEXT_COLOR: Color = Colors::BLACK;
579 const COLLAPSED_TEXT_COLOR: Color = Colors::WHITE;
580
581 fn full_theme(clip_behavior: Clip) -> ExpansionTileThemeData {
583 ExpansionTileThemeData::new()
584 .background_color(Colors::ORANGE.primary())
585 .collapsed_background_color(Colors::RED.primary())
586 .tile_padding(EdgeInsets::from_ltrb(8.0, 12.0, 4.0, 10.0))
587 .expanded_alignment(Alignment::CENTER_RIGHT)
588 .children_padding(EdgeInsets::all(20.0))
589 .icon_color(icon_color())
590 .collapsed_icon_color(collapsed_icon_color())
591 .text_color(TEXT_COLOR)
592 .collapsed_text_color(COLLAPSED_TEXT_COLOR)
593 .shape(vertical_border(Colors::RED.primary()))
594 .collapsed_shape(vertical_border(Colors::GREEN.primary()))
595 .clip_behavior(clip_behavior)
596 }
597
598 fn assert_tile_padding(tester: &WidgetTester, title: &str) {
601 let title_rect = tester.get_rect(find::text(title));
602 let trailing_rect = expand_more_rect(tester);
603 let list_tile_rect = list_tile_rect(tester);
604 let taller_widget = if title_rect.height() > trailing_rect.height() {
605 title_rect
606 } else {
607 trailing_rect
608 };
609
610 assert_eq!(list_tile_rect.left, title_rect.left - 8.0);
612 assert_eq!(list_tile_rect.right, trailing_rect.right + 4.0);
613
614 let remaining_height = 56.0 - taller_widget.height();
616 assert_eq!(
617 list_tile_rect.top,
618 taller_widget.top - remaining_height / 2.0 - 12.0
619 );
620 assert_eq!(
621 list_tile_rect.bottom,
622 taller_widget.bottom + remaining_height / 2.0 + 10.0
623 );
624 }
625
626 fn boxed(shape: Border) -> Option<ShapeBorderRef> {
627 Some(ShapeBorderRef::new(shape))
628 }
629
630 #[test]
632 fn expansion_tile_theme_collapsed() {
633 test_widgets(|tester| {
634 let icon = probe();
635 let text = probe();
636 let clip_behavior = Clip::AntiAlias;
637
638 pump_app(
639 tester,
640 |app| {
641 ThemeData::builder()
642 .expansion_tile_theme(full_theme(clip_behavior))
643 .build(app)
644 },
645 Material::new().child(
646 Center::new().child(
647 ExpansionTile::new(test_text("Collapsed Tile", &text))
648 .trailing(test_icon(&icon))
649 .children([Text::new("Tile 1").into_widget()]),
650 ),
651 ),
652 );
653
654 let (shape, color, material_clip_behavior) = tile_material(tester);
658
659 assert_eq!(material_clip_behavior, clip_behavior);
661
662 assert_eq!(color, Some(Colors::RED.primary()));
665
666 assert_tile_padding(tester, "Collapsed Tile");
667
668 assert_eq!(icon.get(), Some(collapsed_icon_color()));
670 assert_eq!(text.get(), Some(COLLAPSED_TEXT_COLOR));
672 assert_eq!(shape, boxed(vertical_border(Colors::GREEN.primary())));
674 });
675 }
676
677 #[test]
679 fn expansion_tile_theme_expanded() {
680 test_widgets(|tester| {
681 let icon = probe();
682 let text = probe();
683 let clip_behavior = Clip::None;
684
685 pump_app(
686 tester,
687 |app| {
688 ThemeData::builder()
689 .expansion_tile_theme(full_theme(clip_behavior))
690 .build(app)
691 },
692 Material::new().child(
693 Center::new().child(
694 ExpansionTile::new(test_text("Expanded Tile", &text))
695 .initially_expanded(true)
696 .trailing(test_icon(&icon))
697 .children([Text::new("Tile 1").into_widget()]),
698 ),
699 ),
700 );
701
702 let (shape, color, material_clip_behavior) = tile_material(tester);
706 assert_eq!(color, Some(Colors::ORANGE.primary()));
708
709 assert_tile_padding(tester, "Expanded Tile");
710
711 assert_eq!(icon.get(), Some(icon_color()));
713 assert_eq!(text.get(), Some(TEXT_COLOR));
715 assert_eq!(shape, boxed(vertical_border(Colors::RED.primary())));
717 assert_eq!(material_clip_behavior, clip_behavior);
719
720 let child = find::text("Tile 1").evaluate(tester);
722 assert_eq!(child.len(), 1, "one \"Tile 1\"");
723 let child_rect = tester.get_rect(child[0]);
724 assert_eq!(child_rect.right, 800.0 - 20.0);
725 assert_eq!(child_rect.left, 800.0 - child_rect.width() - 20.0);
726
727 let padding_rect = last_padding_rect(tester);
729 assert_eq!(child_rect.top, padding_rect.top + 20.0);
730 assert_eq!(child_rect.left, padding_rect.left + 20.0);
731 assert_eq!(child_rect.right, padding_rect.right - 20.0);
732 assert_eq!(child_rect.bottom, padding_rect.bottom - 20.0);
733 });
734 }
735
736 #[test]
738 fn override_expansion_tile_animation_using_expansion_tile_theme_data_animation_style() {
739 test_widgets(|tester| {
740 animation_style_case(
741 tester,
742 |tester, key: &GlobalKey, animation_style| {
743 let mut expansion_tile_theme = ExpansionTileThemeData::new();
744 expansion_tile_theme.expansion_animation_style = animation_style;
745 pump_app(
746 tester,
747 |app| {
748 ThemeData::builder()
749 .expansion_tile_theme(expansion_tile_theme)
750 .build(app)
751 },
752 Material::new().child(
753 Center::new().child(
754 ExpansionTile::new(test_text("title", &probe()))
755 .key(key.clone().into())
756 .children([sized(100.0, 100.0)]),
757 ),
758 ),
759 );
760 },
761 false,
762 );
763 });
764 }
765 #[test]
767 fn a_expansion_tile_theme_data_describes_nothing_by_default() {
768 assert_eq!(
769 waft_widgets::testing::describe_properties(|properties| {
770 waft_foundation::Diagnosticable::debug_fill_properties(
771 &ExpansionTileThemeData::new(),
772 properties,
773 )
774 }),
775 Vec::<String>::new()
776 );
777 }
778
779 #[test]
781 fn an_assigned_expansion_tile_theme_describes_every_property() {
782 let theme = ExpansionTileThemeData::new()
783 .background_color(Color::new(0xff000000))
784 .collapsed_background_color(Color::new(0xff6f83fc))
785 .tile_padding(EdgeInsetsGeometry::all(20.0))
786 .expanded_alignment(AlignmentGeometry::BOTTOM_CENTER)
787 .children_padding(EdgeInsetsGeometry::all(10.0))
788 .icon_color(Color::new(0xffa7c61c))
789 .collapsed_icon_color(Color::new(0xffdd0b1f))
790 .text_color(Color::new(0xffffffff))
791 .collapsed_text_color(Color::new(0xff522bab))
792 .shape(Border::default())
793 .collapsed_shape(Border::default())
794 .clip_behavior(Clip::AntiAlias)
795 .expansion_animation_style(AnimationStyle::new(
796 Some(Curves::ease_in_out()),
797 None,
798 None,
799 None,
800 ));
801 let description = waft_widgets::testing::describe_properties(|properties| {
802 waft_foundation::Diagnosticable::debug_fill_properties(&theme, properties)
803 });
804 let description: Vec<String> = description
805 .iter()
806 .map(|line| waft_rendering::testing::ignoring_hash_codes(line))
807 .collect();
808 assert_eq!(
809 description,
810 [
811 format!("backgroundColor: {}", Color::new(0xff000000)),
812 format!(
813 "collapsedBackgroundColor: {}",
814 Color::new(0xff6f83fc)
815 ),
816 "tilePadding: EdgeInsets.all(20.0)".to_string(),
817 "expandedAlignment: Alignment.bottomCenter".to_string(),
818 "childrenPadding: EdgeInsets.all(10.0)".to_string(),
819 format!("iconColor: {}", Color::new(0xffa7c61c)),
820 format!("collapsedIconColor: {}", Color::new(0xffdd0b1f)),
821 format!("textColor: {}", Color::new(0xffffffff)),
822 format!("collapsedTextColor: {}", Color::new(0xff522bab)),
823 "shape: Border.all(BorderSide(width: 0.0, style: none))".to_string(),
824 "collapsedShape: Border.all(BorderSide(width: 0.0, style: none))".to_string(),
825 "clipBehavior: Clip.antiAlias".to_string(),
826 "expansionAnimationStyle: AnimationStyle#00000(curve: Cubic(0.42, 0.00, 0.58, 1.00))"
827 .to_string(),
828 ]
829 );
830 }
831}