repo_id stringlengths 21 168 | file_path stringlengths 36 210 | content stringlengths 1 9.98M | __index_level_0__ int64 0 0 |
|---|---|---|---|
mirrored_repositories/fu_uber | mirrored_repositories/fu_uber/test/widget_test.dart | // This is a basic Flutter widget test.
//
// To perform an interaction with a widget in your test, use the WidgetTester
// utility that Flutter provides. For example, you can send tap and scroll
// gestures. You can also use WidgetTester to find child widgets in the widget
// tree, read text, and verify that the value... | 0 |
mirrored_repositories/trips11 | mirrored_repositories/trips11/lib/register.dart | import 'package:firebase_auth/firebase_auth.dart';
import 'package:flutter/material.dart';
class MyRegister extends StatelessWidget {
const MyRegister({super.key});
@override
Widget build(BuildContext context) {
String email = '';
String pass = '';
return Container(
decoration: const BoxDecora... | 0 |
mirrored_repositories/trips11 | mirrored_repositories/trips11/lib/group.dart | import 'package:flutter/material.dart';
import 'package:open_street_map_search_and_pick/open_street_map_search_and_pick.dart';
import 'package:trips1/createhike.dart';
import 'package:trips1/join.dart';
class Group extends StatefulWidget {
// ignore: use_key_in_widget_constructors
const Group({Key? key});
@over... | 0 |
mirrored_repositories/trips11 | mirrored_repositories/trips11/lib/description.dart | import 'package:flutter/material.dart';
import 'package:trips1/capture.dart';
import 'package:trips1/group.dart';
import 'package:trips1/home.dart';
class Description extends StatelessWidget {
final String imageUrl;
final String placeName;
final String description;
const Description({
Key? key,
requir... | 0 |
mirrored_repositories/trips11 | mirrored_repositories/trips11/lib/createhike.dart | import 'package:cloud_firestore/cloud_firestore.dart';
import 'package:flutter/material.dart';
import 'package:open_street_map_search_and_pick/open_street_map_search_and_pick.dart';
class CreateHike extends StatefulWidget {
// ignore: use_key_in_widget_constructors
const CreateHike({Key? key});
@override
Stat... | 0 |
mirrored_repositories/trips11 | mirrored_repositories/trips11/lib/join.dart | import 'package:flutter/material.dart';
import 'package:cloud_firestore/cloud_firestore.dart';
class Join extends StatefulWidget {
const Join({Key? key}) : super(key: key);
@override
State<Join> createState() => _JoinState();
}
class _JoinState extends State<Join> {
@override
Widget build(BuildContext cont... | 0 |
mirrored_repositories/trips11 | mirrored_repositories/trips11/lib/login.dart | // ignore_for_file: unused_local_variable
import 'package:firebase_core/firebase_core.dart';
import 'package:flutter/material.dart';
import 'package:firebase_auth/firebase_auth.dart';
class MyLogin extends StatefulWidget {
const MyLogin({super.key});
@override
State<MyLogin> createState() => _MyLoginState();
}... | 0 |
mirrored_repositories/trips11 | mirrored_repositories/trips11/lib/splash_screen.dart | import 'package:flutter/material.dart';
class MySplash extends StatefulWidget {
const MySplash({super.key});
@override
State<MySplash> createState() => _MySplashState();
}
class _MySplashState extends State<MySplash> {
@override
Widget build(BuildContext context) {
return const Scaffold(
body: Ce... | 0 |
mirrored_repositories/trips11 | mirrored_repositories/trips11/lib/capture.dart | import 'dart:io';
import 'package:firebase_storage/firebase_storage.dart';
import 'package:flutter/material.dart';
import 'package:image_picker/image_picker.dart';
import 'package:cloud_firestore/cloud_firestore.dart';
class Capture extends StatefulWidget {
const Capture({Key? key}) : super(key: key);
@override
... | 0 |
mirrored_repositories/trips11 | mirrored_repositories/trips11/lib/main.dart | import 'package:flutter/material.dart';
import 'package:trips1/home.dart';
import 'package:trips1/register.dart';
import 'package:firebase_core/firebase_core.dart';
import 'login.dart';
void main() async {
WidgetsFlutterBinding.ensureInitialized();
await Firebase.initializeApp();
runApp(MaterialApp(
initial... | 0 |
mirrored_repositories/trips11 | mirrored_repositories/trips11/lib/home.dart | import 'package:flutter/material.dart';
import 'package:trips1/description.dart';
import 'package:trips1/group.dart';
import 'capture.dart';
import 'package:cloud_firestore/cloud_firestore.dart';
class MyHome extends StatefulWidget {
const MyHome({super.key});
@override
State<MyHome> createState() => _MyHomeSta... | 0 |
mirrored_repositories/trips11 | mirrored_repositories/trips11/test/unit_test_group.dart | import 'package:flutter/material.dart';
import 'package:flutter_test/flutter_test.dart';
import 'package:open_street_map_search_and_pick/open_street_map_search_and_pick.dart';
import 'package:trips1/group.dart'; // Import the 'Group' widget
void main() {
testWidgets('Test Group widget', (WidgetTester tester) async {... | 0 |
mirrored_repositories/trips11 | mirrored_repositories/trips11/test/widget_test.dart | // import 'package:flutter/material.dart';
// import 'package:flutter_test/flutter_test.dart';
// void main() {
// testWidgets('Test Description Widget', (WidgetTester tester) async {
// // Build the Description widget and trigger a frame.
// // await tester.pumpWidget(
// // MaterialApp(
// // ... | 0 |
mirrored_repositories/Kpop-Chat | mirrored_repositories/Kpop-Chat/lib/main.dart | import 'package:firebase_analytics/firebase_analytics.dart';
import 'package:flutter/material.dart';
import 'package:flutter_bloc/flutter_bloc.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:internet_connection_checker/internet_connection_checker.dart';
import 'package:kpopchat/busin... | 0 |
mirrored_repositories/Kpop-Chat/lib/data | mirrored_repositories/Kpop-Chat/lib/data/repository/real_users_repo.dart | import 'package:dartz/dartz.dart';
import 'package:kpopchat/core/network/failure_model.dart';
import 'package:kpopchat/data/models/user_model.dart';
abstract class RealUsersRepo {
Future<Either<List<UserModel>, FailureModel>> fetchRealUsersData();
Future<void> updateUserLocationAndGhostModeStatus(UserModel updated... | 0 |
mirrored_repositories/Kpop-Chat/lib/data | mirrored_repositories/Kpop-Chat/lib/data/repository/remote_config_repo.dart | abstract class RemoteConfigRepo {
/// method to get user info like location, internet provided based in user's public IP address
Future<void> getUserInfoFromIP();
}
| 0 |
mirrored_repositories/Kpop-Chat/lib/data | mirrored_repositories/Kpop-Chat/lib/data/repository/virtual_friends_repo.dart | import 'package:dartz/dartz.dart';
import 'package:kpopchat/core/network/failure_model.dart';
import 'package:kpopchat/data/models/local_schema_model.dart';
import 'package:kpopchat/data/models/virtual_friend_model.dart';
import 'package:kpopchat/data/models/virtual_friend_post_model.dart';
abstract class VirtualFrien... | 0 |
mirrored_repositories/Kpop-Chat/lib/data | mirrored_repositories/Kpop-Chat/lib/data/repository/auth_repo.dart | import 'package:firebase_auth/firebase_auth.dart';
/// User authentication related repo for this app, Have methods to sign in, sign out methods
abstract class AuthRepo {
Future<bool> signInWithGoogle();
Future<void> registerUserProfile(User userInfo);
}
| 0 |
mirrored_repositories/Kpop-Chat/lib/data | mirrored_repositories/Kpop-Chat/lib/data/repository/chat_repo.dart | import 'package:dartz/dartz.dart';
import 'package:dash_chat_2/dash_chat_2.dart';
import 'package:kpopchat/core/network/failure_model.dart';
import 'package:kpopchat/data/models/schema_message_model.dart';
import 'package:kpopchat/data/models/schema_virtual_friend_model.dart';
abstract class ChatRepo {
Future<Either... | 0 |
mirrored_repositories/Kpop-Chat/lib/data | mirrored_repositories/Kpop-Chat/lib/data/repository_implementation/chat_repo_impl.dart | import 'package:dartz/dartz.dart';
import 'package:dash_chat_2/dash_chat_2.dart';
import 'package:flutter/foundation.dart';
import 'package:kpopchat/core/constants/analytics_constants.dart';
import 'package:kpopchat/core/constants/network_constants.dart';
import 'package:kpopchat/core/constants/remote_config_values.dar... | 0 |
mirrored_repositories/Kpop-Chat/lib/data | mirrored_repositories/Kpop-Chat/lib/data/repository_implementation/auth_repo_impl.dart | import 'package:cloud_firestore/cloud_firestore.dart';
import 'package:firebase_auth/firebase_auth.dart';
import 'package:flutter/foundation.dart';
import 'package:kpopchat/core/constants/firestore_collections_constants.dart';
import 'package:kpopchat/core/constants/location_constants.dart';
import 'package:kpopchat/co... | 0 |
mirrored_repositories/Kpop-Chat/lib/data | mirrored_repositories/Kpop-Chat/lib/data/repository_implementation/virtual_friends_repo_impl.dart | import 'package:cloud_firestore/cloud_firestore.dart';
import 'package:dartz/dartz.dart';
import 'package:flutter/foundation.dart';
import 'package:kpopchat/core/constants/firestore_collections_constants.dart';
import 'package:kpopchat/core/network/failure_model.dart';
import 'package:kpopchat/core/utils/schema_helper.... | 0 |
mirrored_repositories/Kpop-Chat/lib/data | mirrored_repositories/Kpop-Chat/lib/data/repository_implementation/remote_config_repo_impl.dart | import 'package:dartz/dartz.dart';
import 'package:flutter/foundation.dart';
import 'package:kpopchat/core/constants/location_constants.dart';
import 'package:kpopchat/core/constants/network_constants.dart';
import 'package:kpopchat/core/network/client/base_client.dart';
import 'package:kpopchat/core/network/failure_mo... | 0 |
mirrored_repositories/Kpop-Chat/lib/data | mirrored_repositories/Kpop-Chat/lib/data/repository_implementation/real_users_repo_impl.dart | import 'dart:convert';
import 'package:cloud_firestore/cloud_firestore.dart';
import 'package:dartz/dartz.dart';
import 'package:flutter/foundation.dart';
import 'package:kpopchat/core/constants/firestore_collections_constants.dart';
import 'package:kpopchat/core/constants/shared_preferences_keys.dart';
import 'packag... | 0 |
mirrored_repositories/Kpop-Chat/lib/data | mirrored_repositories/Kpop-Chat/lib/data/models/virtual_friend_model.dart | import 'package:dash_chat_2/dash_chat_2.dart';
import 'package:kpopchat/data/models/lat_long_model.dart';
class VirtualFriendModel {
String? id;
int? order;
String? name;
String? country;
String? city;
String? displayPictureUrl;
String? profession;
String? lastUnlockedTime;
List<dynamic>? hobbies;
... | 0 |
mirrored_repositories/Kpop-Chat/lib/data | mirrored_repositories/Kpop-Chat/lib/data/models/user_info_from_ip_model.dart | class UserInfoFromIPModel {
String? status;
String? country;
String? countryCode;
String? phoneCode;
String? region;
String? regionName;
String? city;
String? zip;
double? lat;
double? lon;
String? timezone;
String? isp;
String? org;
String? as;
String? query;
UserInfoFromIPModel(
... | 0 |
mirrored_repositories/Kpop-Chat/lib/data | mirrored_repositories/Kpop-Chat/lib/data/models/lat_long_model.dart | import 'package:location/location.dart';
class LatLong {
double? lat;
double? long;
LatLong({this.lat, this.long});
static const String kLat = "latitude";
static const String kLong = "longitude";
LatLong.fromJson(Map<String, dynamic> json) {
lat = json[kLat];
long = json[kLong];
}
Map<String... | 0 |
mirrored_repositories/Kpop-Chat/lib/data | mirrored_repositories/Kpop-Chat/lib/data/models/local_schema_model.dart | import 'dart:convert';
import 'package:firebase_auth/firebase_auth.dart';
import 'package:kpopchat/core/utils/schema_helper.dart';
import 'package:kpopchat/core/utils/service_locator.dart';
import 'package:kpopchat/data/models/schema_virtual_friend_model.dart';
class LocalSchemaModelOfLoggedInUser {
List<SchemaVirtu... | 0 |
mirrored_repositories/Kpop-Chat/lib/data | mirrored_repositories/Kpop-Chat/lib/data/models/open_ai_resp_model.dart | class OpenAIResponseModel {
Openai? openai;
OpenAIResponseModel({this.openai});
OpenAIResponseModel.fromJson(Map<String, dynamic> json) {
openai = json['openai'] != null ? Openai.fromJson(json['openai']) : null;
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = <String, dynamic>{}... | 0 |
mirrored_repositories/Kpop-Chat/lib/data | mirrored_repositories/Kpop-Chat/lib/data/models/schema_message_model.dart | // below class is used to deserialize data of values in conversations array of each virtual friends stored in schema
import 'package:dash_chat_2/dash_chat_2.dart';
import 'package:kpopchat/core/utils/shared_preferences_helper.dart';
class SchemaMessageModel {
String? role;
String? message;
String? createdAt;
b... | 0 |
mirrored_repositories/Kpop-Chat/lib/data | mirrored_repositories/Kpop-Chat/lib/data/models/schema_virtual_friend_model.dart | import 'package:dash_chat_2/dash_chat_2.dart';
import 'package:kpopchat/core/utils/shared_preferences_helper.dart';
import 'package:kpopchat/data/models/schema_message_model.dart';
import 'package:kpopchat/data/models/user_model.dart';
import 'virtual_friend_model.dart';
class SchemaVirtualFriendModel {
VirtualFrien... | 0 |
mirrored_repositories/Kpop-Chat/lib/data | mirrored_repositories/Kpop-Chat/lib/data/models/virtual_friend_post_model.dart | import 'package:flutter/foundation.dart';
import 'package:kpopchat/data/models/virtual_friend_model.dart';
class VirtualFriendPostModel {
String? postId;
DateTime? datePublished;
VirtualFriendModel? poster;
String? caption;
int? viewsCount;
VirtualFriendPostModel(
{this.postId,
this.datePublis... | 0 |
mirrored_repositories/Kpop-Chat/lib/data | mirrored_repositories/Kpop-Chat/lib/data/models/user_model.dart | import 'package:firebase_auth/firebase_auth.dart';
import 'package:kpopchat/data/models/lat_long_model.dart';
class UserModel {
String? userId;
String? displayName;
String? email;
bool? emailVerified;
bool? isAnonymous;
String? photoURL;
int? kpopScore;
LatLong? latLong;
bool? anonymizeLocation;
//... | 0 |
mirrored_repositories/Kpop-Chat/lib/core | mirrored_repositories/Kpop-Chat/lib/core/network/failure_model.dart | import 'package:kpopchat/core/constants/text_constants.dart';
class FailureModel {
String? message;
FailureModel({this.message});
FailureModel.fromJson(Map<String, dynamic> json) {
message = json['message'] ?? TextConstants.defaultErrorMsg;
}
}
| 0 |
mirrored_repositories/Kpop-Chat/lib/core/network | mirrored_repositories/Kpop-Chat/lib/core/network/client/base_client.dart | import 'package:dio/dio.dart';
abstract class BaseClient {
Future<Response<dynamic>?> getRequest({
String baseUrl = "",
Map<String, String>? optionalHeaders,
Map<String, dynamic>? queryParameters,
required String path,
bool showDialog = false,
bool shouldCache = true,
bool requiresAuthori... | 0 |
mirrored_repositories/Kpop-Chat/lib/core/network | mirrored_repositories/Kpop-Chat/lib/core/network/client/base_client_impl.dart | import 'package:dio/dio.dart';
import 'package:flutter/foundation.dart';
import 'package:kpopchat/core/network/client/base_client.dart';
import 'package:kpopchat/core/network/functions/get_header.dart';
import 'package:kpopchat/presentation/common_widgets/network_call_loading_widgets.dart';
import 'package:pretty_dio_l... | 0 |
mirrored_repositories/Kpop-Chat/lib/core/network | mirrored_repositories/Kpop-Chat/lib/core/network/functions/get_parsed_data.dart | import 'package:dartz/dartz.dart';
import 'package:dio/dio.dart';
import 'package:flutter/foundation.dart';
import 'package:kpopchat/core/network/failure_model.dart';
List<int> successStatusCodes = [200, 201, 202, 204];
Future<Either<T, FailureModel>> getParsedData<T>(
Response? response, dynamic fromJson) async ... | 0 |
mirrored_repositories/Kpop-Chat/lib/core/network | mirrored_repositories/Kpop-Chat/lib/core/network/functions/get_header.dart | import 'package:kpopchat/core/constants/network_constants.dart';
Map<String, String> getHeader({
bool requiresAuthorization = true,
}) {
return {
"Content-Type": "application/json",
if (requiresAuthorization)
"Authorization": "Bearer ${NetworkConstants.edenAIKey}",
};
}
| 0 |
mirrored_repositories/Kpop-Chat/lib/core | mirrored_repositories/Kpop-Chat/lib/core/constants/google_ads_test_id.dart | /// Below constants are the test ad id for different kinds of Google Ads
class GoogleAdsTestId {
static const String kTestBannerAdId =
'ca-app-pub-3940256099942544/6300978111';
static const String kTestInterstitialAdId =
'ca-app-pub-3940256099942544/1033173712';
static const String kTestRewardedAdId =... | 0 |
mirrored_repositories/Kpop-Chat/lib/core | mirrored_repositories/Kpop-Chat/lib/core/constants/text_constants.dart | class TextConstants {
static const kNunitoFont = "Nunito";
static const kBarlowFont = "Barlow";
static const appName = "Kpop Chat";
static const appNameKorean = "μΌμ΄ν μ±ν
";
static const defaultErrorMsg =
"Oops! It seems like there was a technical hiccup. Please try again later.";
static const String are... | 0 |
mirrored_repositories/Kpop-Chat/lib/core | mirrored_repositories/Kpop-Chat/lib/core/constants/firebase_remote_config_keys.dart | class RemoteConfigKeys {
static const String kKeyEdenAI = "eden_ai_key";
static const String kKeySystemMsg = "system_msg_key";
static const String kKeyTemperature = "temperature";
static const String kKeyMaxTokens = "max_tokens";
static const String kKeyMaxMsgsToTake = "max_messages_to_take";
static const S... | 0 |
mirrored_repositories/Kpop-Chat/lib/core | mirrored_repositories/Kpop-Chat/lib/core/constants/decoration_constants.dart | class DecorationConstants {
static const double borderRadiusOfBubbleMsg = 25;
}
| 0 |
mirrored_repositories/Kpop-Chat/lib/core | mirrored_repositories/Kpop-Chat/lib/core/constants/location_constants.dart | import 'package:kpopchat/data/models/lat_long_model.dart';
class LocationConstants {
/// assign its value on app launch (service locator)
static LatLong? userLocationFromIP;
}
| 0 |
mirrored_repositories/Kpop-Chat/lib/core | mirrored_repositories/Kpop-Chat/lib/core/constants/color_constants.dart | import 'package:flutter/material.dart';
class ColorConstants {
static const Color primaryColor = Colors.blue;
static const Color primaryColorPink = Colors.pinkAccent;
static const Color darkPrimaryColor = Colors.white;
static const Color unCheckedColorDarkTheme = Colors.black26;
static const Color unCheckedC... | 0 |
mirrored_repositories/Kpop-Chat/lib/core | mirrored_repositories/Kpop-Chat/lib/core/constants/network_constants.dart | class NetworkConstants {
static const String baseUrl = "";
static const String edenAIbaseUrl = "https://api.edenai.run/";
static const String edenAIChatPath = "v2/text/chat";
static String edenAIKey = "";
static const String policyUrl =
"https://aprashantz.github.io/kpop-chat-policy/";
static const ... | 0 |
mirrored_repositories/Kpop-Chat/lib/core | mirrored_repositories/Kpop-Chat/lib/core/constants/analytics_constants.dart | class AnalyticsConstants {
/// to be used when sign in with google btn is clicked
static const String kEventSignInClick = "sign_in_clicked";
/// to be used when user is actually signed in and navigated to dashboard
static const String kEventSignedIn = "signed_in";
static const String kEventMenuScreenClicked ... | 0 |
mirrored_repositories/Kpop-Chat/lib/core | mirrored_repositories/Kpop-Chat/lib/core/constants/remote_config_values.dart | class RemoteConfigValues {
/// to be later updated from firebase remote config
static String systemMsg =
"Act as an hardcore Kpop fan and respond like how a Kpop fan would reply to that. Do not make long message reply. Respond like how humans casually text/message on social media using slangs or shortcut tex... | 0 |
mirrored_repositories/Kpop-Chat/lib/core | mirrored_repositories/Kpop-Chat/lib/core/constants/asset_path_constants.dart | class AssetPathConstants {
static const String kSpiralLines = "assets/spiral_lines.svg";
static const String kGoogleLogo = "assets/google_logo.png";
static const String kLogoNoBG = "assets/logo_no_bg.PNG";
static const String kLogoIcon = "assets/logo_icon.jpg";
static const String kDefaultProfilePic = "assets... | 0 |
mirrored_repositories/Kpop-Chat/lib/core | mirrored_repositories/Kpop-Chat/lib/core/constants/firestore_collections_constants.dart | class FirestoreCollections {
static const String kVirtualFriends = "virtual_friends";
static const String kUsers = "users";
static const String kVirtualFriendsPosts = "virtual_friends_posts";
}
| 0 |
mirrored_repositories/Kpop-Chat/lib/core | mirrored_repositories/Kpop-Chat/lib/core/constants/shared_preferences_keys.dart | /// Class that holds keys of shared preferences
class SharedPrefsKeys {
static const String isDarkMode = "is_dark_mode";
static const String kSchemaKey = "local_schema";
static const String kUserProfile = "user_profile";
static const String kFriendLastUnlockTime = "friend_last_unlock_time";
}
| 0 |
mirrored_repositories/Kpop-Chat/lib/core | mirrored_repositories/Kpop-Chat/lib/core/routes/app_routes.dart | class AppRoutes {
static const String authCheckerScreen = "/auth-checker-screen";
static const String signInScreen = "/sign-in-screen";
static const String dashboardScreen = "/dashboard-screen";
static const String virtualFriendsListScreen = "/virtual-friends-list-screen";
static const String chatScreen = "/c... | 0 |
mirrored_repositories/Kpop-Chat/lib/core | mirrored_repositories/Kpop-Chat/lib/core/routes/route_generator.dart | import 'package:flutter/cupertino.dart';
import 'package:kpopchat/admin_controls/admin_post_monitor.dart';
import 'package:kpopchat/data/models/virtual_friend_model.dart';
import 'package:kpopchat/presentation/screens/auth_checker_screen.dart';
import 'package:kpopchat/presentation/screens/chat_screen/chat_screen.dart'... | 0 |
mirrored_repositories/Kpop-Chat/lib/core | mirrored_repositories/Kpop-Chat/lib/core/themes/light_theme.dart | import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:kpopchat/core/constants/color_constants.dart';
import 'package:kpopchat/core/constants/text_constants.dart';
final lightTheme = ThemeData(
brightness: Brightn... | 0 |
mirrored_repositories/Kpop-Chat/lib/core | mirrored_repositories/Kpop-Chat/lib/core/themes/dark_theme.dart | import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:kpopchat/core/constants/color_constants.dart';
import 'package:kpopchat/core/constants/text_constants.dart';
final darkTheme = ThemeData(
brightness: Brightness... | 0 |
mirrored_repositories/Kpop-Chat/lib/core | mirrored_repositories/Kpop-Chat/lib/core/utils/admob_services.dart | import 'package:flutter/foundation.dart';
import 'package:flutter/material.dart';
import 'package:google_mobile_ads/google_mobile_ads.dart';
import 'package:kpopchat/core/constants/analytics_constants.dart';
import 'package:kpopchat/core/utils/analytics.dart';
import 'package:kpopchat/main.dart';
class AdMobServices {... | 0 |
mirrored_repositories/Kpop-Chat/lib/core | mirrored_repositories/Kpop-Chat/lib/core/utils/get_view_count_string.dart | /// function to get views count in integer and returns string views count without providing exact view count
String getViewCount(int viewCount) {
if (viewCount < 5) {
return viewCount.toString();
} else if (viewCount < 10) {
return "5+";
} else if (viewCount < 20) {
return "10+";
} else if (viewCoun... | 0 |
mirrored_repositories/Kpop-Chat/lib/core | mirrored_repositories/Kpop-Chat/lib/core/utils/date_to_string.dart | import 'package:intl/intl.dart';
String dateToString(String? dateTimeInString) {
if (dateTimeInString == null || dateTimeInString == "") return "";
DateTime dateTime = DateTime.parse(dateTimeInString);
final now = DateTime.now();
final difference = now.difference(dateTime);
if (difference.inSeconds < 60) {
... | 0 |
mirrored_repositories/Kpop-Chat/lib/core | mirrored_repositories/Kpop-Chat/lib/core/utils/get_geo_location_of_user.dart | import 'package:flutter/foundation.dart';
import 'package:kpopchat/core/constants/location_constants.dart';
import 'package:kpopchat/core/utils/service_locator.dart';
import 'package:location/location.dart';
/// Determine the current position of the device.
Future<LocationData?> getUserLocationData() async {
Locati... | 0 |
mirrored_repositories/Kpop-Chat/lib/core | mirrored_repositories/Kpop-Chat/lib/core/utils/shared_preferences_helper.dart | import 'dart:convert';
import 'package:firebase_auth/firebase_auth.dart';
import 'package:flutter/foundation.dart';
import 'package:flutter_bloc/flutter_bloc.dart';
import 'package:kpopchat/business_logic/auth_checker_cubit/auth_checker_cubit.dart';
import 'package:kpopchat/core/constants/remote_config_values.dart';
im... | 0 |
mirrored_repositories/Kpop-Chat/lib/core | mirrored_repositories/Kpop-Chat/lib/core/utils/analytics.dart | import 'package:firebase_analytics/firebase_analytics.dart';
import 'package:flutter/foundation.dart';
import 'package:kpopchat/core/utils/service_locator.dart';
import 'package:kpopchat/data/models/user_model.dart';
import 'package:mixpanel_flutter/mixpanel_flutter.dart';
import 'package:onesignal_flutter/onesignal_fl... | 0 |
mirrored_repositories/Kpop-Chat/lib/core | mirrored_repositories/Kpop-Chat/lib/core/utils/schema_helper.dart | import 'dart:convert';
import 'package:flutter/foundation.dart';
import 'package:flutter_bloc/flutter_bloc.dart';
import 'package:flutter_secure_storage/flutter_secure_storage.dart';
import 'package:kpopchat/business_logic/auth_checker_cubit/auth_checker_cubit.dart';
import 'package:kpopchat/core/constants/shared_pref... | 0 |
mirrored_repositories/Kpop-Chat/lib/core | mirrored_repositories/Kpop-Chat/lib/core/utils/loading_utils.dart | import 'package:flutter/material.dart';
import 'package:kpopchat/main.dart';
import 'package:kpopchat/presentation/common_widgets/loading_overlay_screen.dart';
class LoadingUtils {
static showLoadingDialog() {
showGeneralDialog(
context: navigatorKey.currentContext!,
barrierDismissible: false,
... | 0 |
mirrored_repositories/Kpop-Chat/lib/core | mirrored_repositories/Kpop-Chat/lib/core/utils/initializer.dart | import 'package:firebase_remote_config/firebase_remote_config.dart';
import 'package:google_mobile_ads/google_mobile_ads.dart';
import 'package:kpopchat/core/constants/firebase_remote_config_keys.dart';
import 'package:kpopchat/core/constants/network_constants.dart';
import 'package:kpopchat/core/constants/remote_confi... | 0 |
mirrored_repositories/Kpop-Chat/lib/core | mirrored_repositories/Kpop-Chat/lib/core/utils/service_locator.dart | import 'package:cloud_firestore/cloud_firestore.dart';
import 'package:firebase_analytics/firebase_analytics.dart';
import 'package:firebase_auth/firebase_auth.dart';
import 'package:firebase_remote_config/firebase_remote_config.dart';
import 'package:flutter/foundation.dart';
import 'package:flutter_local_notification... | 0 |
mirrored_repositories/Kpop-Chat/lib/core | mirrored_repositories/Kpop-Chat/lib/core/firebase/firebase_options.dart | // File generated by FlutterFire CLI.
// ignore_for_file: lines_longer_than_80_chars, avoid_classes_with_only_static_members
import 'package:firebase_core/firebase_core.dart' show FirebaseOptions;
import 'package:flutter/foundation.dart'
show defaultTargetPlatform, TargetPlatform;
import 'package:kpopchat/core/cons... | 0 |
mirrored_repositories/Kpop-Chat/lib/core | mirrored_repositories/Kpop-Chat/lib/core/firebase/firebase_setup.dart | import 'dart:io';
import 'package:firebase_core/firebase_core.dart';
import 'package:firebase_crashlytics/firebase_crashlytics.dart';
import 'package:flutter/foundation.dart';
import 'package:kpopchat/core/constants/text_constants.dart';
import 'firebase_options.dart';
class FirebaseSetup {
//Constructor for Firebas... | 0 |
mirrored_repositories/Kpop-Chat/lib | mirrored_repositories/Kpop-Chat/lib/business_logic/theme_cubit.dart | import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
import 'package:flutter_bloc/flutter_bloc.dart';
import 'package:kpopchat/core/constants/shared_preferences_keys.dart';
import 'package:kpopchat/core/utils/service_locator.dart';
import 'package:shared_preferences/shared_preferences.dart';
... | 0 |
mirrored_repositories/Kpop-Chat/lib | mirrored_repositories/Kpop-Chat/lib/business_logic/internet_checker_cubit.dart | import 'dart:async';
import 'package:flutter_bloc/flutter_bloc.dart';
import 'package:internet_connection_checker/internet_connection_checker.dart';
class InternetConnectivityCubit extends Cubit<bool> {
final InternetConnectionChecker connectionChecker;
late StreamSubscription<InternetConnectionStatus> _subscript... | 0 |
mirrored_repositories/Kpop-Chat/lib/business_logic | mirrored_repositories/Kpop-Chat/lib/business_logic/virtual_friends_list_cubit/virtual_friends_list_cubit.dart | import 'package:dartz/dartz.dart';
import 'package:flutter_bloc/flutter_bloc.dart';
import 'package:kpopchat/business_logic/virtual_friends_list_cubit/virtual_friends_list_state.dart';
import 'package:kpopchat/core/constants/text_constants.dart';
import 'package:kpopchat/core/network/failure_model.dart';
import 'packag... | 0 |
mirrored_repositories/Kpop-Chat/lib/business_logic | mirrored_repositories/Kpop-Chat/lib/business_logic/virtual_friends_list_cubit/virtual_friends_list_state.dart | import 'package:kpopchat/data/models/local_schema_model.dart';
abstract class VirtualFriendsListState {}
class VirtualFriendsInitialState extends VirtualFriendsListState {}
class VirtualFriendsLoadedState extends VirtualFriendsListState {
final LocalSchemaModelOfLoggedInUser localSchemaModelOfLoggedInUser;
Virt... | 0 |
mirrored_repositories/Kpop-Chat/lib/business_logic | mirrored_repositories/Kpop-Chat/lib/business_logic/auth_checker_cubit/auth_checker_cubit.dart | import 'package:firebase_auth/firebase_auth.dart';
import 'package:flutter/material.dart';
import 'package:flutter_bloc/flutter_bloc.dart';
import 'package:flutter_secure_storage/flutter_secure_storage.dart';
import 'package:google_sign_in/google_sign_in.dart';
import 'package:kpopchat/business_logic/virtual_friends_li... | 0 |
mirrored_repositories/Kpop-Chat/lib/business_logic | mirrored_repositories/Kpop-Chat/lib/business_logic/virtual_friends_posts_cubit/virtual_friends_posts_state.dart | import 'package:kpopchat/data/models/virtual_friend_post_model.dart';
abstract class VirtualFriendsPostsState {}
class InitialPostsState extends VirtualFriendsPostsState {}
class PostsLoadedState extends VirtualFriendsPostsState {
final List<VirtualFriendPostModel> loadedPosts;
PostsLoadedState({required this.l... | 0 |
mirrored_repositories/Kpop-Chat/lib/business_logic | mirrored_repositories/Kpop-Chat/lib/business_logic/virtual_friends_posts_cubit/virtual_friends_posts_cubit.dart | import 'package:flutter_bloc/flutter_bloc.dart';
import 'package:kpopchat/business_logic/virtual_friends_posts_cubit/virtual_friends_posts_state.dart';
import 'package:kpopchat/core/constants/text_constants.dart';
import 'package:kpopchat/data/repository/virtual_friends_repo.dart';
class VirtualFriendsPostsCubit exten... | 0 |
mirrored_repositories/Kpop-Chat/lib/business_logic | mirrored_repositories/Kpop-Chat/lib/business_logic/chat_cubit/chat_cubit.dart | import 'package:dartz/dartz.dart';
import 'package:dash_chat_2/dash_chat_2.dart';
import 'package:flutter/foundation.dart';
import 'package:flutter_bloc/flutter_bloc.dart';
import 'package:kpopchat/core/constants/remote_config_values.dart';
import 'package:kpopchat/core/constants/text_constants.dart';
import 'package:k... | 0 |
mirrored_repositories/Kpop-Chat/lib/business_logic | mirrored_repositories/Kpop-Chat/lib/business_logic/chat_cubit/chat_state.dart | part of 'chat_cubit.dart';
abstract class ChatState {
const ChatState();
}
class ChatLoadingState extends ChatState {
String? virtualFriendId;
ChatLoadingState({this.virtualFriendId});
}
class ErrorReceivingBotMsgState extends ChatState {
ErrorReceivingBotMsgState();
}
class ChatLoadedState extends ChatStat... | 0 |
mirrored_repositories/Kpop-Chat/lib/business_logic | mirrored_repositories/Kpop-Chat/lib/business_logic/real_users_cubit/real_users_cubit.dart | import 'dart:convert';
import 'package:flutter_bloc/flutter_bloc.dart';
import 'package:kpopchat/business_logic/real_users_cubit/real_users_state.dart';
import 'package:kpopchat/core/constants/shared_preferences_keys.dart';
import 'package:kpopchat/core/constants/text_constants.dart';
import 'package:kpopchat/core/uti... | 0 |
mirrored_repositories/Kpop-Chat/lib/business_logic | mirrored_repositories/Kpop-Chat/lib/business_logic/real_users_cubit/real_users_state.dart | import 'package:kpopchat/data/models/user_model.dart';
abstract class RealUsersState {}
class RealUsersInitialState extends RealUsersState {}
class RealUsersLoadedState extends RealUsersState {
final List<UserModel> realUsers;
RealUsersLoadedState(this.realUsers);
}
class ErrorLoadingRealUsersState extends Rea... | 0 |
mirrored_repositories/Kpop-Chat/lib/presentation | mirrored_repositories/Kpop-Chat/lib/presentation/common_widgets/network_call_loading_widgets.dart | import 'package:flutter/material.dart';
import 'package:kpopchat/main.dart';
showLoadingDialog() {
showDialog(
barrierDismissible: false,
barrierColor: Colors.transparent,
context: navigatorKey.currentContext!,
builder: (appContext) {
return Material(
color: Colors.grey.withOpacity(0.4)... | 0 |
mirrored_repositories/Kpop-Chat/lib/presentation | mirrored_repositories/Kpop-Chat/lib/presentation/common_widgets/common_decorations.dart | import 'package:flutter/material.dart';
import 'package:kpopchat/core/constants/color_constants.dart';
class CommonDecoration {
static LinearGradient appPrimaryGradientBackground() {
return const LinearGradient(
begin: Alignment.topCenter,
end: Alignment.bottomCenter,
colors: [ColorConsta... | 0 |
mirrored_repositories/Kpop-Chat/lib/presentation | mirrored_repositories/Kpop-Chat/lib/presentation/common_widgets/loading_overlay_screen.dart | import 'dart:ui';
import 'package:flutter/material.dart';
import 'package:flutter_spinkit/flutter_spinkit.dart';
class LoadingOverlayScreen extends StatelessWidget {
const LoadingOverlayScreen({super.key});
@override
Widget build(BuildContext context) {
return BackdropFilter(
filter: ImageFilter.blu... | 0 |
mirrored_repositories/Kpop-Chat/lib/presentation | mirrored_repositories/Kpop-Chat/lib/presentation/common_widgets/bool_bottom_sheet.dart | // this bottom sheet to be used in places like:
// onWillPop property, post delete feature
// takes title text, yes/true button text
import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:kpopchat/presentation/common_widgets/custom_text.dart';
import 'commo... | 0 |
mirrored_repositories/Kpop-Chat/lib/presentation | mirrored_repositories/Kpop-Chat/lib/presentation/common_widgets/common_widgets.dart | import 'package:another_flushbar/flushbar.dart';
import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:google_mobile_ads/google_mobile_ads.dart';
import 'custom_text.dart';
class CommonWidgets {
static PreferredSize customAppBar(
BuildContext context... | 0 |
mirrored_repositories/Kpop-Chat/lib/presentation | mirrored_repositories/Kpop-Chat/lib/presentation/common_widgets/cached_image_widget.dart | import 'package:cached_network_image/cached_network_image.dart';
import 'package:flutter/material.dart';
import 'package:kpopchat/core/constants/asset_path_constants.dart';
import 'package:kpopchat/core/constants/color_constants.dart';
class CachedImageWidget extends StatelessWidget {
const CachedImageWidget({
s... | 0 |
mirrored_repositories/Kpop-Chat/lib/presentation | mirrored_repositories/Kpop-Chat/lib/presentation/common_widgets/custom_text.dart | import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
// as we need different font size of text,
//making a custom text widget to accept
//required properties from arguments
class CustomText extends StatelessWidget {
final String text;
final double size;
final bool ... | 0 |
mirrored_repositories/Kpop-Chat/lib/presentation | mirrored_repositories/Kpop-Chat/lib/presentation/common_widgets/cached_circle_avatar.dart | import 'package:cached_network_image/cached_network_image.dart';
import 'package:flutter/material.dart';
import 'package:kpopchat/core/constants/asset_path_constants.dart';
class CachedCircleAvatar extends StatelessWidget {
final String imageUrl;
final double? radius;
const CachedCircleAvatar({super.key, require... | 0 |
mirrored_repositories/Kpop-Chat/lib/presentation/widgets | mirrored_repositories/Kpop-Chat/lib/presentation/widgets/sign_in_screen_widgets/app_name_on_top_widget.dart | import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:kpopchat/presentation/common_widgets/custom_text.dart';
import 'package:kpopchat/core/constants/text_constants.dart';
class AppNameOnTopOfScreen extends StatelessWidget {
const AppNameOnTopOfScreen({
... | 0 |
mirrored_repositories/Kpop-Chat/lib/presentation/widgets | mirrored_repositories/Kpop-Chat/lib/presentation/widgets/sign_in_screen_widgets/sign_in_with_google_btn.dart | import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:kpopchat/presentation/common_widgets/custom_text.dart';
import 'package:kpopchat/core/constants/asset_path_constants.dart';
import 'package:kpopchat/core/constants/color_constants.dart';
class SignInWit... | 0 |
mirrored_repositories/Kpop-Chat/lib/presentation/widgets | mirrored_repositories/Kpop-Chat/lib/presentation/widgets/sign_in_screen_widgets/spiral_lines_widget.dart | import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:flutter_svg/flutter_svg.dart';
import 'package:kpopchat/core/constants/asset_path_constants.dart';
class SpiralLinesWidget extends StatelessWidget {
const SpiralLinesWidget({
super.key,
});
@... | 0 |
mirrored_repositories/Kpop-Chat/lib/presentation/widgets | mirrored_repositories/Kpop-Chat/lib/presentation/widgets/menu_screen_widgets/menu_list_tile.dart | import 'package:flutter/material.dart';
import 'package:kpopchat/presentation/common_widgets/custom_text.dart';
class CustomListTile extends StatelessWidget {
final String title;
final Color titleColor;
final IconData leadingIcon;
final Function() onTap;
const CustomListTile({
super.key,
required thi... | 0 |
mirrored_repositories/Kpop-Chat/lib/presentation/widgets | mirrored_repositories/Kpop-Chat/lib/presentation/widgets/menu_screen_widgets/menu_app_bar.dart | import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:kpopchat/presentation/common_widgets/custom_text.dart';
Row buildAppBarForMenuScreen(BuildContext context) {
return Row(
mainAxisAlignment: MainAxisAlignme... | 0 |
mirrored_repositories/Kpop-Chat/lib/presentation/widgets | mirrored_repositories/Kpop-Chat/lib/presentation/widgets/chat_screen_widgets/chat_screen_app_bar.dart | import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:kpopchat/core/routes/app_routes.dart';
import 'package:kpopchat/data/models/virtual_friend_model.dart';
import 'package:kpopchat/presentation/common_widgets/cache... | 0 |
mirrored_repositories/Kpop-Chat/lib/presentation/widgets | mirrored_repositories/Kpop-Chat/lib/presentation/widgets/chat_screen_widgets/chat_screen_decorations.dart | // using in message inputing text field of chat screen
import 'package:dart_emoji/dart_emoji.dart';
import 'package:dash_chat_2/dash_chat_2.dart';
import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:intl/intl.dart';
import 'package:kpopchat/core/constants... | 0 |
mirrored_repositories/Kpop-Chat/lib/presentation/widgets | mirrored_repositories/Kpop-Chat/lib/presentation/widgets/chat_screen_widgets/online_status_widget.dart | import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:kpopchat/core/constants/color_constants.dart';
class OnlineStatusWidget extends StatelessWidget {
const OnlineStatusWidget({super.key});
@override
Widget build(BuildContext context) {
Color o... | 0 |
mirrored_repositories/Kpop-Chat/lib/presentation/widgets | mirrored_repositories/Kpop-Chat/lib/presentation/widgets/chat_screen_widgets/custom_msg_avatar_widget.dart | import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:kpopchat/core/routes/app_routes.dart';
import 'package:kpopchat/data/models/virtual_friend_model.dart';
import 'package:kpopchat/presentation/common_widgets/cached_circle_avatar.dart';
class CustomMsgAv... | 0 |
mirrored_repositories/Kpop-Chat/lib/presentation/widgets | mirrored_repositories/Kpop-Chat/lib/presentation/widgets/virtual_friends_list_screen_widgets/zero_virtual_friends_widget.dart | import 'package:flutter/material.dart';
import 'package:kpopchat/presentation/common_widgets/custom_text.dart';
class ZeroVirtualFriendsWidget extends StatelessWidget {
const ZeroVirtualFriendsWidget({
super.key,
});
@override
Widget build(BuildContext context) {
return const Center(
child: Cu... | 0 |
mirrored_repositories/Kpop-Chat/lib/presentation/widgets | mirrored_repositories/Kpop-Chat/lib/presentation/widgets/virtual_friends_list_screen_widgets/app_bar.dart | import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:kpopchat/core/constants/analytics_constants.dart';
import 'package:kpopchat/core/constants/text_constants.dart';
import 'package:kpopchat/core/routes/app_routes.dart';
import 'package:kpopchat/core/utils... | 0 |
mirrored_repositories/Kpop-Chat/lib/presentation | mirrored_repositories/Kpop-Chat/lib/presentation/screens/sign_in_screen.dart | import 'dart:io';
import 'package:flutter/gestures.dart';
import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:kpopchat/core/constants/analytics_constants.dart';
import 'package:kpopchat/core/utils/analytics.dart';
import 'package:kpopchat/presentation/com... | 0 |
mirrored_repositories/Kpop-Chat/lib/presentation | mirrored_repositories/Kpop-Chat/lib/presentation/screens/virtual_friend_profile_screen.dart | import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:google_mobile_ads/google_mobile_ads.dart';
import 'package:kpopchat/core/constants/color_constants.dart';
import 'package:kpopchat/core/constants/google_ads_id.da... | 0 |
mirrored_repositories/Kpop-Chat/lib/presentation | mirrored_repositories/Kpop-Chat/lib/presentation/screens/auth_checker_screen.dart | import 'package:flutter/material.dart';
import 'package:flutter_bloc/flutter_bloc.dart';
import 'package:kpopchat/core/routes/app_routes.dart';
import 'package:kpopchat/business_logic/auth_checker_cubit/auth_checker_cubit.dart';
class AuthCheckerScreen extends StatelessWidget {
const AuthCheckerScreen({super.key});
... | 0 |
mirrored_repositories/Kpop-Chat/lib/presentation | mirrored_repositories/Kpop-Chat/lib/presentation/screens/menu_screen.dart | import 'package:avatar_glow/avatar_glow.dart';
import 'package:cached_network_image/cached_network_image.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:flutter_bloc/flutter_bloc.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:g... | 0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.