From b62174fba72c080a7565a9a1c3068da1fadaf5a9 Mon Sep 17 00:00:00 2001 From: gianlucaparadise Date: Mon, 3 Jan 2022 11:50:03 +0100 Subject: [PATCH] ExpandedControl: ad info box text localization --- .../cast/widgets/expanded_controls/ExpandedControls.dart | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/lib/src/cast/widgets/expanded_controls/ExpandedControls.dart b/lib/src/cast/widgets/expanded_controls/ExpandedControls.dart index 170adfc..56a1b97 100644 --- a/lib/src/cast/widgets/expanded_controls/ExpandedControls.dart +++ b/lib/src/cast/widgets/expanded_controls/ExpandedControls.dart @@ -46,6 +46,9 @@ class ExpandedControls extends StatefulWidget { /// Label for the Skip Ad button. Default is "Skip Ad". final String? skipAdButtonText; + /// Label for the Ad Info box. Default is "Ad in progress...". + final String adInfoBoxText; + /// This is called when the back button is tapped or when the session is closed final VoidCallback? onCloseRequested; final progressController = ExpandedControlsProgressController(); @@ -56,6 +59,7 @@ class ExpandedControls extends StatefulWidget { this.castingToText, this.skipAdTimerText, this.skipAdButtonText, + this.adInfoBoxText = "Ad in progress...", this.onCloseRequested, }); @@ -206,10 +210,10 @@ class _ExpandedControlsState extends State { text: "Ad Title", // TODO: retrieve ad title from API ), const SizedBox(height: 8), - const Expanded( + Expanded( flex: 8, child: ExpandedControlsInfoTextBox( - text: "Ad in progress...", // TODO: localize label + text: widget.adInfoBoxText, ), ), const Spacer(flex: 1),