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
5 changes: 5 additions & 0 deletions undomain/.env
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
ZEGO_APPID=28439340
ZEGO_APPSING=fa42963266224d38a78401e3266172c17468fdf478797b1d5cda2aadc52ff90d
interstialid=ca-app-pub-7456704293485699~6368331718
interstialAdunitid=ca-app-pub-7456704293485699/2251695563
nativeadunitid=ca-app-pub-7456704293485699/9243403920
2 changes: 1 addition & 1 deletion undomain/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
.svn/
.swiftpm/
migrate_working_dir/

/secrets/
# IntelliJ related
*.iml
*.ipr
Expand Down
10 changes: 8 additions & 2 deletions undomain/android/app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ plugins {

android {
namespace = "com.example.undomain"
compileSdk = 35
compileSdk = 34
ndkVersion = flutter.ndkVersion


Expand All @@ -25,7 +25,7 @@ android {
applicationId = "com.example.undomain"
// You can update the following values to match your application needs.
// For more information, see: https://flutter.dev/to/review-gradle-config.
minSdk = 22
minSdk = 23
targetSdk = flutter.targetSdkVersion
versionCode = flutter.versionCode
versionName = flutter.versionName
Expand All @@ -36,10 +36,16 @@ android {
// TODO: Add your own signing config for the release build.
// Signing with the debug keys for now, so `flutter run --release` works.
signingConfig = signingConfigs.getByName("debug")

proguardFiles(getDefaultProguardFile("proguard-android.txt"), "proguard-rules.pro")

}
}
}

flutter {
source = "../.."
}
// dependencies {
// implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version"
// }
2 changes: 2 additions & 0 deletions undomain/android/app/proguard-rules.pro
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
-keep class **.zego.** { *; }
-dontwarn com.itgsa.opensdk.mediaunit.KaraokeMediaHelper
13 changes: 13 additions & 0 deletions undomain/android/app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,4 +1,13 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
<uses-permission android:name="android.permission.RECORD_AUDIO" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.CAMERA" />
<uses-permission android:name="android.permission.BLUETOOTH" />
<uses-permission android:name="android.permission.MODIFY_AUDIO_SETTINGS" />
<uses-permission android:name="android.permission.WAKE_LOCK" />

<application
android:label="undomain"
android:name="${applicationName}"
Expand Down Expand Up @@ -30,6 +39,10 @@
<meta-data
android:name="flutterEmbedding"
android:value="2" />
<meta-data
android:name="com.google.android.gms.ads.APPLICATION_ID"
android:value="ca-app-pub-7456704293485699~6368331718"/>

</application>
<!-- Required to query activities that can process text, see:
https://developer.android.com/training/package-visibility and
Expand Down
2 changes: 1 addition & 1 deletion undomain/android/settings.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ pluginManagement {
plugins {
id("dev.flutter.flutter-plugin-loader") version "1.0.0"
id("com.android.application") version "8.7.0" apply false
id("org.jetbrains.kotlin.android") version "1.8.22" apply false
id("org.jetbrains.kotlin.android") version "2.1.0" apply false
}

include(":app")
92 changes: 92 additions & 0 deletions undomain/assets/guitar.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added undomain/assets/kansa/FB_IMG_1746700204456.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added undomain/assets/kansa/k1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added undomain/assets/kansa/k2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added undomain/assets/kansa/k3.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added undomain/assets/kansa/k4.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added undomain/assets/kansa/kansa.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 4 additions & 0 deletions undomain/assets/livetext.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added undomain/assets/mess.jpeg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added undomain/assets/plane_indicator/cloud1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added undomain/assets/plane_indicator/cloud2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added undomain/assets/plane_indicator/cloud3.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added undomain/assets/plane_indicator/cloud4.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added undomain/assets/plane_indicator/plane.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
30 changes: 28 additions & 2 deletions undomain/lib/main.dart
Original file line number Diff line number Diff line change
@@ -1,8 +1,33 @@
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
import 'package:flutter_riverpod/flutter_riverpod.dart';
import 'package:google_mobile_ads/google_mobile_ads.dart';
import 'package:undomain/pages/restart/restart.dart';
import 'package:undomain/router/go_router.dart';
import 'package:undomain/services/admob_service/interstitial_ad.dart';
import 'package:zego_uikit_prebuilt_live_streaming/zego_uikit_prebuilt_live_streaming.dart';

void main() {
runApp(const MyApp());
void main() async {
WidgetsFlutterBinding.ensureInitialized();
await MobileAds.instance.initialize();
SystemChrome.setPreferredOrientations([
DeviceOrientation.portraitUp,
DeviceOrientation.portraitDown,
]);

// Set system UI overlay style
SystemChrome.setSystemUIOverlayStyle(
const SystemUiOverlayStyle(
statusBarColor: Colors.transparent,
statusBarIconBrightness: Brightness.light,
),
);
// Preload an interstitial ad
InterstitialAdService().loadAd();
//initialize zego cloud
await ZegoUIKit().initLog().then((value) {
runApp(RestartWidget(child: ProviderScope(child: const MyApp())));
});
}

class MyApp extends StatelessWidget {
Expand All @@ -14,6 +39,7 @@ class MyApp extends StatelessWidget {
theme: ThemeData.light(useMaterial3: true),
debugShowCheckedModeBanner: false,
title: "Date Net",

routerConfig: Routes().goRouter,
);
}
Expand Down
55 changes: 32 additions & 23 deletions undomain/lib/models/reel/reel_model.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2,54 +2,63 @@ class ReelModel {
final String reelId;
final String title;
final List tags;
final String discription;

final String url;
final List likes;
final List disLikes;
final List<Map<String, String>> comments;
final bool processed;
final String userId;
final List<String>? favourite;
final List<String>? dislike;
final DateTime publishedDate;
final String? weblink;

final String? weblink;
final DateTime joinedDate;
final DateTime updatedDate;
ReelModel({
required this.reelId,
required this.title,
required this.tags,
required this.discription,
required this.url,
required this.userId,
required this.favourite,
required this.dislike,
required this.publishedDate,
required this.likes,
required this.disLikes,
required this.comments,
required this.processed,
required this.weblink,
required this.joinedDate,
required this.updatedDate,
});

Map<String, dynamic> toJson() {
return {
"reelId": reelId,
"title": title,
"tags": tags,
"discription": discription,

"url": url,
"comments": comments,
"userId": userId,
"favourite": favourite,
"dislike": dislike,
"publishedDate": publishedDate,
"like": likes,
"dislikes": disLikes,
"processed": processed,
"weblink": weblink,
"joinedDate": joinedDate,
"updatedDate": updatedDate,
};
}

//convert from json object
factory ReelModel.fromJson(Map<String, dynamic> json) {
return ReelModel(
reelId: json["reelId"],
title: json["title"],
tags: json["tags"],
discription: json["discription"],

userId: json["userId"],
favourite: json["favourite"],
dislike: json["dislike"],
publishedDate: json["publishedDate"],
weblink: json["weblink"],
title: json["title"],
url: json["url"],
joinedDate: DateTime.parse(json["joinedDate"]),
updatedDate: DateTime.parse(json["updatedDate"]),
weblink: json["weblink"] ?? "google",
processed: json["processed"],
likes: json["likes"] ?? [],
disLikes: json["disLikes"] ?? [],
comments: List<Map<String, String>>.from(json["comments"]) ?? [],
tags: json["tags"] ?? [],
);
}
}
32 changes: 22 additions & 10 deletions undomain/lib/models/user/user_model.dart
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
class UserModel {
final String uid;
final String id;
final String username;
final String password;
final String email;
Expand All @@ -9,10 +9,13 @@ class UserModel {
final DateTime updatedDate;
final String serviceDiscription;
final String? bio;
final List<String>? followers;
final List<String>? following;
final List<dynamic>? followers;
final List<dynamic>? following;
final int? contact;
final String? referenceUrl;
final bool? isVerified;
final String? verifyCode;
final int? codeExpireTime;
UserModel({
required this.contact,
required this.referenceUrl,
Expand All @@ -25,17 +28,20 @@ class UserModel {
required this.serviceDiscription,

required this.profileUrl,
required this.uid,
required this.id,
required this.username,
required this.password,
required this.email,
required this.isCreator,
required this.isVerified,
required this.verifyCode,
required this.codeExpireTime,
});

// convert to json object
Map<String, dynamic> toJson() {
return {
"uid": uid,
"id": id,
"username": username,
"email": email,
"profileUrl": profileUrl,
Expand All @@ -49,27 +55,33 @@ class UserModel {
"referenceUrl": referenceUrl,
"followers": followers,
"following": following,
"isVerified": isVerified,
"verifyCode": verifyCode,
"codeExpireTime": codeExpireTime,
};
}

//convert from json object
factory UserModel.fromJson(Map<String, dynamic> json) {
return UserModel(
uid: json["uid"],
id: json["_id"],
username: json["username"],
serviceDiscription: json["serviceDiscription"] ?? "",
email: json["email"],
password: json["password"],
joinedDate: json["joinedDate"],
updatedDate: json["updatedDate"],
profileUrl: json["image"] ?? "",
joinedDate: DateTime.parse(json["createdAt"]),
updatedDate: DateTime.parse(json["updatedAt"]),
profileUrl: json["profileUrl"] ?? "",
followers: json["followers"] ?? [],
following: json["followings"] ?? [],

bio: json["bio"] ?? "",
contact: json["contact"] ?? "",
contact: json["contact"] ?? 0,
isCreator: json["isCreator"],
referenceUrl: json["referenceUrl"] ?? "",
isVerified: json["isVerified"],
verifyCode: json["verifyCode"] ?? "",
codeExpireTime: json["codeExpireTime"] ?? 0,
);
}
}
52 changes: 52 additions & 0 deletions undomain/lib/pages/admob/banner_ad.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
import 'dart:io';

import 'package:flutter/material.dart';
import 'package:google_mobile_ads/google_mobile_ads.dart';

class BannerAdWidget extends StatefulWidget {
const BannerAdWidget({super.key});

@override
State<BannerAdWidget> createState() => _BannerAdWidgetState();
}

class _BannerAdWidgetState extends State<BannerAdWidget> {
BannerAd? bannerAd;

@override
void initState() {
super.initState();
bannerAd = BannerAd(
adUnitId:
Platform.isAndroid
? "ca-app-pub-3940256099942544/9214589741"
: "ca-app-pub-3940256099942544/9214589741",
size: AdSize.banner,
request: AdRequest(),
listener: BannerAdListener(
onAdLoaded: (ad) => setState(() {}),
onAdFailedToLoad: (ad, error) {
ad.dispose();
},
),
)..load();
}

@override
void dispose() {
bannerAd!.dispose();
super.dispose();
}

@override
Widget build(BuildContext context) {
if (bannerAd == null) {
return const SizedBox(height: 50);
}
return SizedBox(
width: bannerAd!.size.width.toDouble(),
height: bannerAd!.size.height.toDouble(),
child: AdWidget(ad: bannerAd!),
);
}
}
Loading