Skip to content

Commit

Permalink
Merge pull request #239 from AmityCo/ws/chore/staging-tentacool
Browse files Browse the repository at this point in the history
Staging Tentacool
  • Loading branch information
Zryte authored Oct 17, 2024
2 parents 2dfec45 + 9b8f782 commit 6e459c9
Show file tree
Hide file tree
Showing 3 changed files with 72 additions and 75 deletions.
2 changes: 1 addition & 1 deletion ios/Runner/AppDelegate.swift
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import UIKit
import Flutter

@UIApplicationMain
@main
@objc class AppDelegate: FlutterAppDelegate {
override func application(
_ application: UIApplication,
Expand Down
142 changes: 70 additions & 72 deletions lib/core/widget/ad_widget.dart
Original file line number Diff line number Diff line change
Expand Up @@ -13,89 +13,87 @@ class AdWidget extends StatelessWidget {
final themeData = Theme.of(context);
return Container(
padding: const EdgeInsets.all(16),
child: Expanded(
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
mainAxisSize: MainAxisSize.min,
children: [
AdvertiserRowWidget(
advertiserId: amityAd.advertiserId ?? '',
companyName: amityAd.advertiser?.companyName,
advertiserAvatar: amityAd.advertiser?.avatar),
Text(
'Ad id - ${amityAd.adId}',
style: themeData.textTheme.bodySmall,
),
Text(
'Target - ${amityAd.adTarget}',
style: themeData.textTheme.bodySmall,
),
Text(
'Placements - ${amityAd.placements}',
style: themeData.textTheme.bodySmall,
),
Text(
'Start at - ${amityAd.startAt ?? 'N/A'}',
style: themeData.textTheme.bodySmall,
),
Text(
'End at - ${amityAd.endAt ?? 'forever'}',
style: themeData.textTheme.bodySmall,
),
Text(
'Name - ${amityAd.name}',
style: themeData.textTheme.titleMedium,
),
Text(
'Headline - ${amityAd.headline ?? 'N/A - Headline is not available'}',
style: themeData.textTheme.titleLarge,
),
Text(
'Description - ${amityAd.description ?? 'N/A - Description is not available'}',
style: themeData.textTheme.bodyMedium,
),
Row(
crossAxisAlignment: CrossAxisAlignment.start,
mainAxisSize: MainAxisSize.min,
children: [
Container(
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
mainAxisSize: MainAxisSize.min,
children: [
AdvertiserRowWidget(
advertiserId: amityAd.advertiserId ?? '',
companyName: amityAd.advertiser?.companyName,
advertiserAvatar: amityAd.advertiser?.avatar),
Text(
'Ad id - ${amityAd.adId}',
style: themeData.textTheme.bodySmall,
),
Text(
'Target - ${amityAd.adTarget}',
style: themeData.textTheme.bodySmall,
),
Text(
'Placements - ${amityAd.placements}',
style: themeData.textTheme.bodySmall,
),
Text(
'Start at - ${amityAd.startAt ?? 'N/A'}',
style: themeData.textTheme.bodySmall,
),
Text(
'End at - ${amityAd.endAt ?? 'forever'}',
style: themeData.textTheme.bodySmall,
),
Text(
'Name - ${amityAd.name}',
style: themeData.textTheme.titleMedium,
),
Text(
'Headline - ${amityAd.headline ?? 'N/A - Headline is not available'}',
style: themeData.textTheme.titleLarge,
),
Text(
'Description - ${amityAd.description ?? 'N/A - Description is not available'}',
style: themeData.textTheme.bodyMedium,
),
Row(
crossAxisAlignment: CrossAxisAlignment.start,
mainAxisSize: MainAxisSize.min,
children: [
Container(
margin: const EdgeInsets.all(4),
color: Colors.blueGrey.withOpacity(.25),
width: 130,
height: 130,
child: (amityAd.image1_1 != null)
? Image.network(
amityAd.image1_1!.getUrl(AmityImageSize.MEDIUM),
fit: BoxFit.cover,
)
: const Align(
alignment: Alignment.center,
child: Text(
"1:1 Ad image is not available",
textAlign: TextAlign.center,
),
),
),
Container(
margin: const EdgeInsets.all(4),
color: Colors.blueGrey.withOpacity(.25),
width: 130,
height: 130,
child: (amityAd.image1_1 != null)
child: (amityAd.image9_16 != null)
? Image.network(
amityAd.image1_1!.getUrl(AmityImageSize.MEDIUM),
fit: BoxFit.cover,
amityAd.image9_16!.getUrl(AmityImageSize.MEDIUM),
fit: BoxFit.fitWidth,
)
: const Align(
alignment: Alignment.center,
child: Text(
"1:1 Ad image is not available",
"9:16 Ad image is not available",
textAlign: TextAlign.center,
),
),
),
Container(
margin: const EdgeInsets.all(4),
color: Colors.blueGrey.withOpacity(.25),
width: 130,
height: 130,
child: (amityAd.image9_16 != null)
? Image.network(
amityAd.image9_16!.getUrl(AmityImageSize.MEDIUM),
fit: BoxFit.fitWidth,
)
: const Align(
alignment: Alignment.center,
child: Text(
"9:16 Ad image is not available",
textAlign: TextAlign.center,
),
))
]),
],
),
))
]),
],
),
);
}
Expand Down
3 changes: 1 addition & 2 deletions pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: flutter_social_sample_app
description: Demonstrates how to use the flutter_application_1 plugin.
version: 1.1.48+63
version: 1.1.49+64



Expand Down Expand Up @@ -28,7 +28,6 @@ dependencies:
flutter:
sdk: flutter
flutter_keyboard_visibility: ^5.4.0
gallery_saver: ^2.3.2
get: ^4.6.3
go_router: ^5.2.4
image_picker: ^0.8.4+10
Expand Down

0 comments on commit 6e459c9

Please sign in to comment.