Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MOB-1892 - fix visible event not are not send #2

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
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: 1 addition & 1 deletion ios/Flutter/AppFrameworkInfo.plist
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,6 @@
<key>CFBundleVersion</key>
<string>1.0</string>
<key>MinimumOSVersion</key>
<string>9.0</string>
<string>11.0</string>
</dict>
</plist>
2 changes: 1 addition & 1 deletion ios/Podfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Uncomment this line to define a global platform for your project
# platform :ios, '9.0'
# platform :ios, '11.0'

# CocoaPods analytics sends network stats synchronously affecting flutter build latency.
ENV['COCOAPODS_DISABLE_STATS'] = 'true'
Expand Down
6 changes: 3 additions & 3 deletions ios/Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -35,12 +35,12 @@ EXTERNAL SOURCES:

SPEC CHECKSUMS:
device_info_plus: e5c5da33f982a436e103237c0c85f9031142abed
Flutter: 50d75fe2f02b26cc09d224853bb45737f8b3214a
Flutter: f04841e97a9d0b0a8025694d0796dd46242b2854
package_info_plus: 6c92f08e1f853dc01228d6f553146438dafcd14e
sim_info: 9d8750399533a8eb626fbb7f6fc0776b154de2a6
taboola_sdk: ae68759840ab1a0bb38deedaecb45e01f83dcdd4
webview_flutter_wkwebview: b7e70ef1ddded7e69c796c7390ee74180182971f

PODFILE CHECKSUM: aafe91acc616949ddb318b77800a7f51bffa2a4c
PODFILE CHECKSUM: ef19549a9bc3046e7bb7d2fab4d021637c0c58a3

COCOAPODS: 1.10.1
COCOAPODS: 1.12.0
10 changes: 6 additions & 4 deletions ios/Runner.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
archiveVersion = 1;
classes = {
};
objectVersion = 50;
objectVersion = 54;
objects = {

/* Begin PBXBuildFile section */
Expand Down Expand Up @@ -222,6 +222,7 @@
};
3B06AD1E1E4923F5004D2608 /* Thin Binary */ = {
isa = PBXShellScriptBuildPhase;
alwaysOutOfDate = 1;
buildActionMask = 2147483647;
files = (
);
Expand All @@ -236,6 +237,7 @@
};
9740EEB61CF901F6004384FC /* Run Script */ = {
isa = PBXShellScriptBuildPhase;
alwaysOutOfDate = 1;
buildActionMask = 2147483647;
files = (
);
Expand Down Expand Up @@ -340,7 +342,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
IPHONEOS_DEPLOYMENT_TARGET = 11.0;
MTL_ENABLE_DEBUG_INFO = NO;
SDKROOT = iphoneos;
SUPPORTED_PLATFORMS = iphoneos;
Expand Down Expand Up @@ -418,7 +420,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
IPHONEOS_DEPLOYMENT_TARGET = 11.0;
MTL_ENABLE_DEBUG_INFO = YES;
ONLY_ACTIVE_ARCH = YES;
SDKROOT = iphoneos;
Expand Down Expand Up @@ -467,7 +469,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
IPHONEOS_DEPLOYMENT_TARGET = 11.0;
MTL_ENABLE_DEBUG_INFO = NO;
SDKROOT = iphoneos;
SUPPORTED_PLATFORMS = iphoneos;
Expand Down
4 changes: 4 additions & 0 deletions ios/Runner/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -43,5 +43,9 @@
</array>
<key>UIViewControllerBasedStatusBarAppearance</key>
<false/>
<key>CADisableMinimumFrameDurationOnPhone</key>
<true/>
<key>UIApplicationSupportsIndirectInputEvents</key>
<true/>
</dict>
</plist>
49 changes: 26 additions & 23 deletions lib/pages/custom_list_view_page_widget.dart
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import 'package:taboola_sdk/classic/taboola_classic_listener.dart';
import 'package:taboola_sdk/classic/taboola_classic.dart';

TaboolaClassicBuilder taboolaClassicBuilder =
Taboola.getTaboolaClassicBuilder("http://www.example.com", "article");
Taboola.getTaboolaClassicBuilder("http://www.example.com", "article");

final List<String> items = List.generate(10, (index) => "Item $index");

Expand All @@ -14,48 +14,51 @@ class CustomListViewPageFeedAndWidget extends StatelessWidget {

@override
Widget build(BuildContext context) {
final ScrollController _scrollController = ScrollController();

Taboola.init(PublisherInfo("sdk-tester-rnd"));

return Scaffold(
appBar: AppBar(
leading: BackButton(onPressed: () {
Navigator.of(context).pop();
},),
title: const Text("ListView Example"),
),
body:
ListView.builder(
itemCount: items.length,
itemBuilder: (BuildContext context, int index) {
return setContainer(index);
},
),
);
appBar: AppBar(
leading: BackButton(onPressed: () {
Navigator.of(context).pop();
},),
title: const Text("ListView Example"),
),
body:
ListView.builder(
controller:_scrollController ,
itemCount: items.length,
itemBuilder: (BuildContext context, int index) {
return setContainer(index,_scrollController);
},
),
);
}
}

Container setContainer(int index) {
Container setContainer(int index,scroll) {
if (index == 5) {
return Container(
color: Colors.teal[100 * (index % 9)],
height: 300,
child: setListContent(index));
child: setListContent(index,scroll));
}

else if(index == 9){
return Container(
color: Colors.teal[100 * (index % 9)],
height: 1600,
child: setListContent(index));
child: setListContent(index,scroll));
}

return Container(
color: Colors.teal[100 * (index % 9)],
height: 200,
child: setListContent(index));
child: setListContent(index,scroll));
}

Widget setListContent(int index) {
Widget setListContent(int index, ScrollController scroll) {
if (index == 5) {
TaboolaClassicListener taboolaClassicListener = TaboolaClassicListener(
taboolaDidResize,
Expand All @@ -67,7 +70,7 @@ Widget setListContent(int index) {
"mid article widget",
"alternating-1x2-widget",
false,
taboolaClassicListener);
taboolaClassicListener,viewId:123,scrollController: scroll);
return taboolaClassicUnit;
}

Expand All @@ -79,7 +82,7 @@ Widget setListContent(int index) {
taboolaDidClickOnItem);

TaboolaClassicUnit taboolaClassicfeed = taboolaClassicBuilder.build(
"Feed without video", "thumbs-feed-01", true, taboolaClassicListener2);
"Feed without video", "thumbs-feed-01", true, taboolaClassicListener2,viewId:123333,scrollController: scroll);
return taboolaClassicfeed;
}
return Text('List item $index');
Expand Down
Loading