Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions app/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
## [Unreleased](https://github.com/Orange-OpenSource/ouds-flutter/compare/1.3.0...develop)
### Added
### Changed
- [DemoApp][Library] update tokens 2.4.0 ([#726](https://github.com/Orange-OpenSource/ouds-flutter/issues/726))

### Fixed

## [1.3.0](https://github.com/Orange-OpenSource/ouds-flutter/compare/1.2.0...1.3.0) - 2026-05-08
Expand Down
60 changes: 37 additions & 23 deletions app/lib/ui/components/chip/chip_filter_demo_sreen.dart
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ import 'package:provider/provider.dart';
class ChipFilterDemoScreen extends StatefulWidget {
final String? previousPageTitle;

const ChipFilterDemoScreen({super.key,this.previousPageTitle});
const ChipFilterDemoScreen({super.key, this.previousPageTitle});

@override
State<StatefulWidget> createState() => _ChipFilterDemoScreenState();
Expand All @@ -59,7 +59,11 @@ class _ChipFilterDemoScreenState extends State<ChipFilterDemoScreen> {
child: ChipCustomization(
key: _scaffoldKey,
child: Padding(
padding: EdgeInsets.only(bottom: defaultTargetPlatform == TargetPlatform.android ? MediaQuery.of(context).viewPadding.bottom : OudsTheme.of(context).spaceScheme(context).paddingBlockNone),
padding: EdgeInsets.only(
bottom: defaultTargetPlatform == TargetPlatform.android
? MediaQuery.of(context).viewPadding.bottom
: OudsTheme.of(context).spaceScheme(context).paddingBlockNone,
),
child: Scaffold(
bottomSheet: OudsSheetsBottom(
onExpansionChanged: _onExpansionChanged,
Expand All @@ -70,7 +74,8 @@ class _ChipFilterDemoScreenState extends State<ChipFilterDemoScreen> {
appBar: MainAppBar(
title: context.l10n.app_components_filterChip_label,
showBackButton: true,
previousPageTitle: widget.previousPageTitle,),
previousPageTitle: widget.previousPageTitle,
),
body: ExcludeSemantics(
excluding: !_isBottomSheetExpanded,
child: _Body(),
Expand All @@ -93,19 +98,24 @@ class _Body extends StatefulWidget {
class _BodyState extends State<_Body> {
@override
Widget build(BuildContext context) {
ThemeController? themeController = Provider.of<ThemeController>(context, listen: false);
ThemeController? themeController = Provider.of<ThemeController>(
context,
listen: false,
);
return DetailScreenDescription(
description: context.l10n.app_components_chip_filterChip_description_text,
widget: Column(
children: [
_ChipFilterDemo(),
SizedBox(height: themeController.currentTheme.spaceScheme(context).fixedMedium),
Code(
code: ChipFilterCodeGenerator.updateCode(context),
SizedBox(
height: themeController.currentTheme
.spaceScheme(context)
.fixedMedium,
),
Code(code: ChipFilterCodeGenerator.updateCode(context)),
ReferenceDesignVersionComponent(
version: OudsComponentVersion.chip,
)
version: OudsComponentVersion.filterChip,
),
],
),
);
Expand Down Expand Up @@ -134,18 +144,20 @@ class _ChipFilterDemoState extends State<_ChipFilterDemo> {

return LightDarkBox(
child: OudsFilterChip(
label: ChipCustomizationUtils.getText(customizationState),
avatar: ChipCustomizationUtils.getIcon(customizationState, themeController!),
selected: customizationState?.hasSelected,
onSelected: customizationState?.hasEnabled == true
? (newValue) {
setState(
() {
customizationState?.hasSelected = newValue;
},
);
}
: null),
label: ChipCustomizationUtils.getText(customizationState),
avatar: ChipCustomizationUtils.getIcon(
customizationState,
themeController!,
),
selected: customizationState?.hasSelected,
onSelected: customizationState?.hasEnabled == true
? (newValue) {
setState(() {
customizationState?.hasSelected = newValue;
});
}
: null,
),
);
}
}
Expand Down Expand Up @@ -176,7 +188,9 @@ class _CustomizationContentState extends State<_CustomizationContent> {

@override
Widget build(BuildContext context) {
final ChipCustomizationState? customizationState = ChipCustomization.of(context);
final ChipCustomizationState? customizationState = ChipCustomization.of(
context,
);

return CustomizableSection(
children: [
Expand Down Expand Up @@ -212,7 +226,7 @@ class _CustomizationContentState extends State<_CustomizationContent> {
text: customizationState.labelText,
focusNode: labelFocus,
fieldType: FieldType.label,
)
),
],
);
}
Expand Down
4 changes: 3 additions & 1 deletion app/lib/ui/components/chip/chip_suggestion_demo_screen.dart
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,9 @@ class _BodyState extends State<_Body> {
.fixedMedium,
),
Code(code: ChipSuggestionCodeGenerator.updateCode(context)),
ReferenceDesignVersionComponent(version: OudsComponentVersion.chip),
ReferenceDesignVersionComponent(
version: OudsComponentVersion.suggestionChip,
),
],
),
);
Expand Down
44 changes: 29 additions & 15 deletions app/lib/ui/components/tag/input_tag_demo_screen.dart
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ import 'package:provider/provider.dart';
class InputTagDemoScreen extends StatefulWidget {
final String? previousPageTitle;

const InputTagDemoScreen({super.key,this.previousPageTitle});
const InputTagDemoScreen({super.key, this.previousPageTitle});

@override
State<StatefulWidget> createState() => _InputTagDemoScreenState();
Expand All @@ -53,7 +53,11 @@ class _InputTagDemoScreenState extends State<InputTagDemoScreen> {
Widget build(BuildContext context) {
return TagCustomization(
child: Padding(
padding: EdgeInsets.only(bottom: defaultTargetPlatform == TargetPlatform.android ? MediaQuery.of(context).viewPadding.bottom : OudsTheme.of(context).spaceScheme(context).paddingBlockNone),
padding: EdgeInsets.only(
bottom: defaultTargetPlatform == TargetPlatform.android
? MediaQuery.of(context).viewPadding.bottom
: OudsTheme.of(context).spaceScheme(context).paddingBlockNone,
),
child: Scaffold(
bottomSheet: OudsSheetsBottom(
onExpansionChanged: _onExpansionChanged,
Expand All @@ -63,11 +67,14 @@ class _InputTagDemoScreenState extends State<InputTagDemoScreen> {
key: _scaffoldKey,
extendBodyBehindAppBar: true,
appBar: MainAppBar(
showBackButton: true,
title: context.l10n.app_components_tag_inputTag_label,
previousPageTitle: widget.previousPageTitle,
showBackButton: true,
title: context.l10n.app_components_tag_inputTag_label,
previousPageTitle: widget.previousPageTitle,
),
body: ExcludeSemantics(
excluding: !_isBottomSheetExpanded,
child: _Body(),
),
body: ExcludeSemantics(excluding: !_isBottomSheetExpanded, child: _Body()),
),
),
);
Expand All @@ -85,19 +92,24 @@ class _Body extends StatefulWidget {
class _BodyState extends State<_Body> {
@override
Widget build(BuildContext context) {
ThemeController? themeController = Provider.of<ThemeController>(context, listen: false);
ThemeController? themeController = Provider.of<ThemeController>(
context,
listen: false,
);
return DetailScreenDescription(
description: context.l10n.app_components_inputTag_description_text,
widget: Column(
children: [
_InputTagDemo(),
SizedBox(height: themeController.currentTheme.spaceScheme(context).fixedMedium),
Code(
code: InputTagCodeGenerator.updateCode(context),
SizedBox(
height: themeController.currentTheme
.spaceScheme(context)
.fixedMedium,
),
Code(code: InputTagCodeGenerator.updateCode(context)),
ReferenceDesignVersionComponent(
version: OudsComponentVersion.tag,
)
version: OudsComponentVersion.inputTag,
),
],
),
);
Expand Down Expand Up @@ -146,7 +158,9 @@ class _CustomizationContentState extends State<_CustomizationContent> {

@override
Widget build(BuildContext context) {
final TagCustomizationState? customizationState = TagCustomization.of(context);
final TagCustomizationState? customizationState = TagCustomization.of(
context,
);
final labelFocus = FocusNode();

return CustomizableSection(
Expand All @@ -163,8 +177,8 @@ class _CustomizationContentState extends State<_CustomizationContent> {
text: customizationState.labelText,
focusNode: labelFocus,
fieldType: FieldType.label,
)
),
],
);
}
}
}
Loading
Loading