-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: [MDS-450] Accordion functionality fixes (#89)
- Loading branch information
Showing
12 changed files
with
411 additions
and
268 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
import 'package:flutter/foundation.dart'; | ||
import 'package:flutter/material.dart'; | ||
|
||
import 'package:moon_design/src/theme/shadows.dart'; | ||
|
||
@immutable | ||
class MoonAccordionItemShadows extends ThemeExtension<MoonAccordionItemShadows> with DiagnosticableTreeMixin { | ||
static final light = MoonAccordionItemShadows( | ||
shadows: MoonShadows.light.sm, | ||
); | ||
|
||
static final dark = MoonAccordionItemShadows( | ||
shadows: MoonShadows.dark.sm, | ||
); | ||
|
||
/// Accordion item shadows. | ||
final List<BoxShadow> shadows; | ||
|
||
const MoonAccordionItemShadows({ | ||
required this.shadows, | ||
}); | ||
|
||
@override | ||
MoonAccordionItemShadows copyWith({List<BoxShadow>? shadows}) { | ||
return MoonAccordionItemShadows( | ||
shadows: shadows ?? this.shadows, | ||
); | ||
} | ||
|
||
@override | ||
MoonAccordionItemShadows lerp(ThemeExtension<MoonAccordionItemShadows>? other, double t) { | ||
if (other is! MoonAccordionItemShadows) return this; | ||
|
||
return MoonAccordionItemShadows( | ||
shadows: BoxShadow.lerpList(shadows, other.shadows, t)!, | ||
); | ||
} | ||
|
||
@override | ||
void debugFillProperties(DiagnosticPropertiesBuilder properties) { | ||
super.debugFillProperties(properties); | ||
properties | ||
..add(DiagnosticsProperty("type", "MoonAccordionItemShadows")) | ||
..add(DiagnosticsProperty<List<BoxShadow>>("shadows", shadows)); | ||
} | ||
} |
Oops, something went wrong.