@@ -37,7 +37,7 @@ import 'package:provider/provider.dart';
3737class ChipFilterDemoScreen extends StatefulWidget {
3838 final String ? previousPageTitle;
3939
40- const ChipFilterDemoScreen ({super .key,this .previousPageTitle});
40+ const ChipFilterDemoScreen ({super .key, this .previousPageTitle});
4141
4242 @override
4343 State <StatefulWidget > createState () => _ChipFilterDemoScreenState ();
@@ -59,7 +59,11 @@ class _ChipFilterDemoScreenState extends State<ChipFilterDemoScreen> {
5959 child: ChipCustomization (
6060 key: _scaffoldKey,
6161 child: Padding (
62- padding: EdgeInsets .only (bottom: defaultTargetPlatform == TargetPlatform .android ? MediaQuery .of (context).viewPadding.bottom : OudsTheme .of (context).spaceScheme (context).paddingBlockNone),
62+ padding: EdgeInsets .only (
63+ bottom: defaultTargetPlatform == TargetPlatform .android
64+ ? MediaQuery .of (context).viewPadding.bottom
65+ : OudsTheme .of (context).spaceScheme (context).paddingBlockNone,
66+ ),
6367 child: Scaffold (
6468 bottomSheet: OudsSheetsBottom (
6569 onExpansionChanged: _onExpansionChanged,
@@ -70,7 +74,8 @@ class _ChipFilterDemoScreenState extends State<ChipFilterDemoScreen> {
7074 appBar: MainAppBar (
7175 title: context.l10n.app_components_filterChip_label,
7276 showBackButton: true ,
73- previousPageTitle: widget.previousPageTitle,),
77+ previousPageTitle: widget.previousPageTitle,
78+ ),
7479 body: ExcludeSemantics (
7580 excluding: ! _isBottomSheetExpanded,
7681 child: _Body (),
@@ -93,19 +98,24 @@ class _Body extends StatefulWidget {
9398class _BodyState extends State <_Body > {
9499 @override
95100 Widget build (BuildContext context) {
96- ThemeController ? themeController = Provider .of <ThemeController >(context, listen: false );
101+ ThemeController ? themeController = Provider .of <ThemeController >(
102+ context,
103+ listen: false ,
104+ );
97105 return DetailScreenDescription (
98106 description: context.l10n.app_components_chip_filterChip_description_text,
99107 widget: Column (
100108 children: [
101109 _ChipFilterDemo (),
102- SizedBox (height: themeController.currentTheme.spaceScheme (context).fixedMedium),
103- Code (
104- code: ChipFilterCodeGenerator .updateCode (context),
110+ SizedBox (
111+ height: themeController.currentTheme
112+ .spaceScheme (context)
113+ .fixedMedium,
105114 ),
115+ Code (code: ChipFilterCodeGenerator .updateCode (context)),
106116 ReferenceDesignVersionComponent (
107- version: OudsComponentVersion .chip ,
108- )
117+ version: OudsComponentVersion .filterChip ,
118+ ),
109119 ],
110120 ),
111121 );
@@ -134,18 +144,20 @@ class _ChipFilterDemoState extends State<_ChipFilterDemo> {
134144
135145 return LightDarkBox (
136146 child: OudsFilterChip (
137- label: ChipCustomizationUtils .getText (customizationState),
138- avatar: ChipCustomizationUtils .getIcon (customizationState, themeController! ),
139- selected: customizationState? .hasSelected,
140- onSelected: customizationState? .hasEnabled == true
141- ? (newValue) {
142- setState (
143- () {
144- customizationState? .hasSelected = newValue;
145- },
146- );
147- }
148- : null ),
147+ label: ChipCustomizationUtils .getText (customizationState),
148+ avatar: ChipCustomizationUtils .getIcon (
149+ customizationState,
150+ themeController! ,
151+ ),
152+ selected: customizationState? .hasSelected,
153+ onSelected: customizationState? .hasEnabled == true
154+ ? (newValue) {
155+ setState (() {
156+ customizationState? .hasSelected = newValue;
157+ });
158+ }
159+ : null ,
160+ ),
149161 );
150162 }
151163}
@@ -176,7 +188,9 @@ class _CustomizationContentState extends State<_CustomizationContent> {
176188
177189 @override
178190 Widget build (BuildContext context) {
179- final ChipCustomizationState ? customizationState = ChipCustomization .of (context);
191+ final ChipCustomizationState ? customizationState = ChipCustomization .of (
192+ context,
193+ );
180194
181195 return CustomizableSection (
182196 children: [
@@ -212,7 +226,7 @@ class _CustomizationContentState extends State<_CustomizationContent> {
212226 text: customizationState.labelText,
213227 focusNode: labelFocus,
214228 fieldType: FieldType .label,
215- )
229+ ),
216230 ],
217231 );
218232 }
0 commit comments