Skip to content

Commit

Permalink
Update sample codes for v2.6.3
Browse files Browse the repository at this point in the history
  • Loading branch information
linjie-firework committed Feb 17, 2024
1 parent 614aa6d commit 00676a8
Show file tree
Hide file tree
Showing 593 changed files with 623 additions and 600 deletions.
10 changes: 10 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,15 @@
# CHANGELOG

## [2.6.3]

### Fixed

- [Android] `stopFloatingPlayer` doesn't work when the video pauses

### Changed

- [Android] Upgrade Firework Android SDK to V6.9.3

## [2.6.2]

### Changed
Expand Down
8 changes: 7 additions & 1 deletion FireworkFlutterSDKSample/lib/my_app.dart
Original file line number Diff line number Diff line change
Expand Up @@ -93,11 +93,17 @@ class _MyAppState extends State<MyApp> {
};

FireworkSDK.getInstance().shopping.onShoppingCTA =
HostAppService.getInstance().onAddToCart;
HostAppService.getInstance().onShopNow;
FireworkSDK.getInstance().shopping.onUpdateProductDetails =
HostAppService.getInstance().onUpdateProductDetails;
FireworkSDK.getInstance().shopping.onCustomClickCartIcon =
HostAppService.getInstance().onCustomClickCartIcon;
FireworkSDK.getInstance().shopping.productInfoViewConfiguration =
ProductInfoViewConfiguration(
ctaButton: ShoppingCTAButtonConfiguration(
text: ShoppingCTAButtonText.shopNow,
),
);

FireworkSDK.getInstance().liveStream.onLiveStreamEvent = (event) {
if (event != null) {
Expand Down
6 changes: 6 additions & 0 deletions FireworkFlutterSDKSample/lib/screens/home/home_screen.dart
Original file line number Diff line number Diff line change
Expand Up @@ -360,6 +360,8 @@ class _HomeScreenState extends State<HomeScreen> {
List<Widget> widgetList = <Widget>[];

for (var e in _defaultHomeStoryBlockPlaylistInfoArray) {
FWExampleLoggerUtil.log(
"_buildMultiFeeds channelId: ${e.channelId} playlistId: ${e.playlistId}");
widgetList.addAll([
const SizedBox(
height: 20,
Expand All @@ -374,6 +376,10 @@ class _HomeScreenState extends State<HomeScreen> {
channel: e.channelId,
playlist: e.playlistId,
enablePictureInPicture: _enablePip,
onStoryBlockEmpty: (error) {
FWExampleLoggerUtil.log(
"onStoryBlockEmpty error ${error?.displayString()}");
},
),
),
const SizedBox(
Expand Down
2 changes: 1 addition & 1 deletion FireworkFlutterSDKSample/lib/screens/more/more_screen.dart
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import 'package:fw_flutter_sdk_example/utils/host_app_service.dart';
import '../../generated/l10n.dart';
import '../../widgets/fw_app_bar.dart';

const fwNativeVersionOfAndroid = '6.9.2';
const fwNativeVersionOfAndroid = '6.9.3';

class MoreScreen extends StatefulWidget {
const MoreScreen({
Expand Down
19 changes: 10 additions & 9 deletions FireworkFlutterSDKSample/lib/utils/host_app_service.dart
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ class HostAppService {
return null;
}

await closePlayerOrStartFloatingPlayer();
await startFloatingPlayer();

globalNavigatorKey.currentState?.pushNamed('/link_content', arguments: {
"url": event.url,
Expand Down Expand Up @@ -134,7 +134,7 @@ class HostAppService {
FWExampleLoggerUtil.log(
"onCustomClickCartIcon feedId: ${event?.video.feedId}");

await closePlayerOrStartFloatingPlayer();
await startFloatingPlayer();
final showCart = await shouldShowCart();
if (showCart) {
globalNavigatorKey.currentState?.pushNamed('/cart');
Expand Down Expand Up @@ -201,14 +201,14 @@ class HostAppService {

Future<void> onCustomClickLinkButton(
CustomClickLinkButtonEvent? event) async {
await closePlayerOrStartFloatingPlayer();
await startFloatingPlayer();
globalNavigatorKey.currentState?.pushNamed('/link_content', arguments: {
"url": event?.url ?? '',
});
}

Future<void> onCustomTapProductCard(CustomTapProductCardEvent? event) async {
await closePlayerOrStartFloatingPlayer();
await startFloatingPlayer();
FWExampleLoggerUtil.log(
"onCustomTapProductCard event?.url ${event?.url}",
);
Expand All @@ -220,7 +220,7 @@ class HostAppService {
void onCustomCTAClick(CustomCTAClickEvent? event) {
FWExampleLoggerUtil.log("onCustomCTAClick feedId ${event?.video.feedId}");

closePlayerOrStartFloatingPlayer().then((_) {
startFloatingPlayer().then((_) {
if (enablePausePlayer) {
event?.playerHandler?.pause();
}
Expand All @@ -230,12 +230,13 @@ class HostAppService {
});
}

Future<void> closePlayerOrStartFloatingPlayer() async {
Future<void> startFloatingPlayer() async {
final result =
await FireworkSDK.getInstance().navigator.startFloatingPlayer();
if (!result) {
await FireworkSDK.getInstance().navigator.popNativeContainer();
}
FWExampleLoggerUtil.log("startFloatingPlayer result: $result");
// if (!result) {
// await FireworkSDK.getInstance().navigator.popNativeContainer();
// }
}

Future<void> removeAllCartItems() async {
Expand Down
4 changes: 2 additions & 2 deletions FireworkFlutterSDKSample/pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -308,10 +308,10 @@ packages:
dependency: "direct main"
description:
name: fw_flutter_sdk
sha256: "59d822b46bdc4c2e6a2a3f6a842da942fa50322de2c2b5746f82fb1c6116da0e"
sha256: "9c444b4efc92e4b8171f52481fe8633fefea15d2cff619dc02abc2af19cc3baf"
url: "https://pub.dev"
source: hosted
version: "2.6.2"
version: "2.6.3"
glob:
dependency: transitive
description:
Expand Down
2 changes: 1 addition & 1 deletion FireworkFlutterSDKSample/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ dependencies:
sdk: flutter


fw_flutter_sdk: 2.6.2
fw_flutter_sdk: 2.6.3
# The following adds the Cupertino Icons font to your application.
# Use with the CupertinoIcons class for iOS style icons.
cupertino_icons: ^1.0.5
Expand Down
2 changes: 1 addition & 1 deletion docs/__404error.html
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ <h5><span class="package-name">fw_flutter_sdk</span> <span class="package-kind">
<footer>
<span class="no-break">
fw_flutter_sdk
2.6.2
2.6.3
</span>


Expand Down
2 changes: 1 addition & 1 deletion docs/fw_flutter_sdk/AdBadgeConfiguration-class.html
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,7 @@ <h5>fw_flutter_sdk library</h5>
<footer>
<span class="no-break">
fw_flutter_sdk
2.6.2
2.6.3
</span>


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ <h5>AdBadgeConfiguration class</h5>
<footer>
<span class="no-break">
fw_flutter_sdk
2.6.2
2.6.3
</span>


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ <h5>AdBadgeConfiguration class</h5>
<footer>
<span class="no-break">
fw_flutter_sdk
2.6.2
2.6.3
</span>


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ <h5>AdBadgeConfiguration class</h5>
<footer>
<span class="no-break">
fw_flutter_sdk
2.6.2
2.6.3
</span>


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ <h5>AdBadgeConfiguration class</h5>
<footer>
<span class="no-break">
fw_flutter_sdk
2.6.2
2.6.3
</span>


Expand Down
2 changes: 1 addition & 1 deletion docs/fw_flutter_sdk/AdBadgeConfiguration/deepCopy.html
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ <h5>AdBadgeConfiguration class</h5>
<footer>
<span class="no-break">
fw_flutter_sdk
2.6.2
2.6.3
</span>


Expand Down
2 changes: 1 addition & 1 deletion docs/fw_flutter_sdk/AdBadgeConfiguration/textColor.html
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ <h5>AdBadgeConfiguration class</h5>
<footer>
<span class="no-break">
fw_flutter_sdk
2.6.2
2.6.3
</span>


Expand Down
2 changes: 1 addition & 1 deletion docs/fw_flutter_sdk/AdBadgeTextType.html
Original file line number Diff line number Diff line change
Expand Up @@ -284,7 +284,7 @@ <h5>fw_flutter_sdk library</h5>
<footer>
<span class="no-break">
fw_flutter_sdk
2.6.2
2.6.3
</span>


Expand Down
2 changes: 1 addition & 1 deletion docs/fw_flutter_sdk/AdBadgeTextType/AdBadgeTextType.html
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ <h5>AdBadgeTextType enum</h5>
<footer>
<span class="no-break">
fw_flutter_sdk
2.6.2
2.6.3
</span>


Expand Down
2 changes: 1 addition & 1 deletion docs/fw_flutter_sdk/AdBadgeTextType/values-constant.html
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ <h5>AdBadgeTextType enum</h5>
<footer>
<span class="no-break">
fw_flutter_sdk
2.6.2
2.6.3
</span>


Expand Down
2 changes: 1 addition & 1 deletion docs/fw_flutter_sdk/AdConfiguration-class.html
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,7 @@ <h5>fw_flutter_sdk library</h5>
<footer>
<span class="no-break">
fw_flutter_sdk
2.6.2
2.6.3
</span>


Expand Down
2 changes: 1 addition & 1 deletion docs/fw_flutter_sdk/AdConfiguration/AdConfiguration.html
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ <h5>AdConfiguration class</h5>
<footer>
<span class="no-break">
fw_flutter_sdk
2.6.2
2.6.3
</span>


Expand Down
2 changes: 1 addition & 1 deletion docs/fw_flutter_sdk/AdConfiguration/adsFetchTimeout.html
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ <h5>AdConfiguration class</h5>
<footer>
<span class="no-break">
fw_flutter_sdk
2.6.2
2.6.3
</span>


Expand Down
2 changes: 1 addition & 1 deletion docs/fw_flutter_sdk/AdConfiguration/deepCopy.html
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ <h5>AdConfiguration class</h5>
<footer>
<span class="no-break">
fw_flutter_sdk
2.6.2
2.6.3
</span>


Expand Down
2 changes: 1 addition & 1 deletion docs/fw_flutter_sdk/AdConfiguration/requiresAds.html
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ <h5>AdConfiguration class</h5>
<footer>
<span class="no-break">
fw_flutter_sdk
2.6.2
2.6.3
</span>


Expand Down
2 changes: 1 addition & 1 deletion docs/fw_flutter_sdk/AdConfiguration/vastAttributes.html
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ <h5>AdConfiguration class</h5>
<footer>
<span class="no-break">
fw_flutter_sdk
2.6.2
2.6.3
</span>


Expand Down
2 changes: 1 addition & 1 deletion docs/fw_flutter_sdk/AndroidFontInfo-class.html
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,7 @@ <h5>fw_flutter_sdk library</h5>
<footer>
<span class="no-break">
fw_flutter_sdk
2.6.2
2.6.3
</span>


Expand Down
2 changes: 1 addition & 1 deletion docs/fw_flutter_sdk/AndroidFontInfo/AndroidFontInfo.html
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ <h5>AndroidFontInfo class</h5>
<footer>
<span class="no-break">
fw_flutter_sdk
2.6.2
2.6.3
</span>


Expand Down
2 changes: 1 addition & 1 deletion docs/fw_flutter_sdk/AndroidFontInfo/deepCopy.html
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ <h5>AndroidFontInfo class</h5>
<footer>
<span class="no-break">
fw_flutter_sdk
2.6.2
2.6.3
</span>


Expand Down
2 changes: 1 addition & 1 deletion docs/fw_flutter_sdk/AndroidFontInfo/hashCode.html
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ <h5>AndroidFontInfo class</h5>
<footer>
<span class="no-break">
fw_flutter_sdk
2.6.2
2.6.3
</span>


Expand Down
2 changes: 1 addition & 1 deletion docs/fw_flutter_sdk/AndroidFontInfo/isCustom.html
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ <h5>AndroidFontInfo class</h5>
<footer>
<span class="no-break">
fw_flutter_sdk
2.6.2
2.6.3
</span>


Expand Down
2 changes: 1 addition & 1 deletion docs/fw_flutter_sdk/AndroidFontInfo/operator_equals.html
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ <h5>AndroidFontInfo class</h5>
<footer>
<span class="no-break">
fw_flutter_sdk
2.6.2
2.6.3
</span>


Expand Down
2 changes: 1 addition & 1 deletion docs/fw_flutter_sdk/AndroidFontInfo/typefaceName.html
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ <h5>AndroidFontInfo class</h5>
<footer>
<span class="no-break">
fw_flutter_sdk
2.6.2
2.6.3
</span>


Expand Down
2 changes: 1 addition & 1 deletion docs/fw_flutter_sdk/ButtonInfo-class.html
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,7 @@ <h5>fw_flutter_sdk library</h5>
<footer>
<span class="no-break">
fw_flutter_sdk
2.6.2
2.6.3
</span>


Expand Down
2 changes: 1 addition & 1 deletion docs/fw_flutter_sdk/ButtonInfo/ButtonInfo.html
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ <h5>ButtonInfo class</h5>
<footer>
<span class="no-break">
fw_flutter_sdk
2.6.2
2.6.3
</span>


Expand Down
2 changes: 1 addition & 1 deletion docs/fw_flutter_sdk/ButtonInfo/deepCopy.html
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ <h5>ButtonInfo class</h5>
<footer>
<span class="no-break">
fw_flutter_sdk
2.6.2
2.6.3
</span>


Expand Down
2 changes: 1 addition & 1 deletion docs/fw_flutter_sdk/ButtonInfo/hashCode.html
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ <h5>ButtonInfo class</h5>
<footer>
<span class="no-break">
fw_flutter_sdk
2.6.2
2.6.3
</span>


Expand Down
Loading

0 comments on commit 00676a8

Please sign in to comment.