diff --git a/example/ios/Flutter/AppFrameworkInfo.plist b/example/ios/Flutter/AppFrameworkInfo.plist index 9625e10..7c56964 100644 --- a/example/ios/Flutter/AppFrameworkInfo.plist +++ b/example/ios/Flutter/AppFrameworkInfo.plist @@ -21,6 +21,6 @@ CFBundleVersion 1.0 MinimumOSVersion - 11.0 + 12.0 diff --git a/example/lib/credentials/credentials.dart b/example/lib/credentials/credentials.dart new file mode 100644 index 0000000..f9980e8 --- /dev/null +++ b/example/lib/credentials/credentials.dart @@ -0,0 +1,22 @@ +import 'package:envied/envied.dart'; + +part 'credentials.g.dart'; + +///These are BETA sample community credentials +@Envied(path: '.env.fb') +abstract class FBCreds { + @EnviedField(varName: 'API_KEY', obfuscate: true) + static final String apiKey = _FBCreds.apiKey; + @EnviedField(varName: 'APP_ID_AN', obfuscate: true) + static final String appIdAN = _FBCreds.appIdAN; + @EnviedField(varName: 'APP_ID_IOS', obfuscate: true) + static final String appIdIOS = _FBCreds.appIdIOS; + @EnviedField(varName: 'MESSAGING_SENDER_ID', obfuscate: true) + static final String messagingSenderId = _FBCreds.messagingSenderId; + @EnviedField(varName: 'PROJECT_ID', obfuscate: true) + static final String projectId = _FBCreds.projectId; + @EnviedField(varName: 'STORAGE_BUCKET', obfuscate: true) + static final String storageBucket = _FBCreds.storageBucket; + @EnviedField(varName: 'IOS_BUNDLE_ID', obfuscate: true) + static final String iosBundleId = _FBCreds.iosBundleId; +} diff --git a/example/lib/credentials/credentials.g.dart b/example/lib/credentials/credentials.g.dart new file mode 100644 index 0000000..33b0b38 --- /dev/null +++ b/example/lib/credentials/credentials.g.dart @@ -0,0 +1,465 @@ +// GENERATED CODE - DO NOT MODIFY BY HAND + +part of 'credentials.dart'; + +// ************************************************************************** +// EnviedGenerator +// ************************************************************************** + +class _FBCreds { + static const List _enviedkeyapiKey = [ + 1734998124, + 2664489397, + 3985636469, + 2024195497, + 1889052711, + 1001692625, + 650024727, + 1136985218, + 278623654, + 3921039117, + 900010714, + 3525953706, + 2116948532, + 3130351718, + 1031936145, + 3120929411, + 3806317484, + 3663568904, + 1262600607, + 379351328, + 3586878039, + 1876760749, + 1758660983, + 757865117, + 70942386, + 3086771654, + 1169001812, + 4150522712, + 4204978982, + 769457989, + 1370302819, + 1557881871, + 2581059009, + 1183636075, + 42254412, + 3287208679, + 419421542, + 3828533125, + 4240304030 + ]; + static const List _envieddataapiKey = [ + 1734998061, + 2664489468, + 3985636367, + 2024195528, + 1889052788, + 1001692584, + 650024790, + 1136985267, + 278623712, + 3921039229, + 900010671, + 3525953731, + 2116948581, + 3130351656, + 1031936208, + 3120929511, + 3806317517, + 3663568978, + 1262600661, + 379351309, + 3586877999, + 1876760791, + 1758660879, + 757865189, + 70942337, + 3086771605, + 1169001752, + 4150522669, + 4204979013, + 769457920, + 1370302769, + 1557881933, + 2581058985, + 1183636028, + 42254336, + 3287208596, + 419421453, + 3828533235, + 4240304095 + ]; + static final String apiKey = String.fromCharCodes( + List.generate(_envieddataapiKey.length, (i) => i, growable: false) + .map((i) => _envieddataapiKey[i] ^ _enviedkeyapiKey[i]) + .toList(growable: false), + ); + static const List _enviedkeyappIdAN = [ + 3740947126, + 1334229223, + 2908853647, + 364972497, + 799017831, + 2476495089, + 460180368, + 2240972922, + 2891713572, + 3234156676, + 3143983614, + 1258486857, + 697610453, + 736979114, + 1325317061, + 2272479814, + 3972592281, + 3128314696, + 4248534424, + 1485628647, + 3637832155, + 1398789454, + 3625017185, + 1151458898, + 1146459415, + 170363959, + 3269679718, + 728497908, + 1704120691, + 1042318866, + 2362135470, + 3729039624, + 3443469397, + 1596213820, + 716875929, + 128819478, + 3310258063, + 3015151672, + 3035216583, + 1191580685, + 2027523189, + 4060632699, + 2278709766, + 582665258, + 3467324404 + ]; + static const List _envieddataappIdAN = [ + 3740947079, + 1334229213, + 2908853690, + 364972516, + 799017809, + 2476495044, + 460180392, + 2240972875, + 2891713558, + 3234156724, + 3143983558, + 1258486897, + 697610469, + 736979101, + 1325317119, + 2272479783, + 3972592375, + 3128314668, + 4248534506, + 1485628552, + 3637832114, + 1398789418, + 3625017179, + 1151458919, + 1146459427, + 170363988, + 3269679700, + 728497863, + 1704120646, + 1042318966, + 2362135454, + 3729039721, + 3443469410, + 1596213850, + 716876031, + 128819490, + 3310258156, + 3015151710, + 3035216630, + 1191580732, + 2027523137, + 4060632650, + 2278709822, + 582665246, + 3467324358 + ]; + static final String appIdAN = String.fromCharCodes( + List.generate(_envieddataappIdAN.length, (i) => i, growable: false) + .map((i) => _envieddataappIdAN[i] ^ _enviedkeyappIdAN[i]) + .toList(growable: false), + ); + static const List _enviedkeyappIdIOS = [ + 3991220495, + 2123110994, + 2998836429, + 2529338423, + 29433770, + 2708041187, + 993699201, + 3381298590, + 3729510956, + 771599859, + 2928471561, + 3594566372, + 1968884684, + 4075420457, + 2735334975, + 2107080042, + 1189214376, + 1954834950, + 821168993, + 3453506064, + 1253715274, + 2146905600, + 3209488972, + 312100773, + 832670940, + 2403152311, + 1007379546, + 486769165, + 3208136596, + 3359068412, + 4192093027, + 4173248227, + 3995674361, + 2776744733, + 3587761182, + 884502269, + 3195760722, + 4116829848, + 2347620104, + 1037214078, + 3590890103 + ]; + static const List _envieddataappIdIOS = [ + 3991220542, + 2123111016, + 2998836472, + 2529338370, + 29433756, + 2708041174, + 993699257, + 3381298607, + 3729510942, + 771599811, + 2928471601, + 3594566364, + 1968884732, + 4075420446, + 2735334917, + 2107079939, + 1189214407, + 1954835061, + 821168987, + 3453506084, + 1253715325, + 2146905649, + 3209488936, + 312100803, + 832670952, + 2403152341, + 1007379561, + 486769259, + 3208136689, + 3359068367, + 4192092929, + 4173248219, + 3995674264, + 2776744750, + 3587761198, + 884502220, + 3195760742, + 4116829865, + 2347620144, + 1037214026, + 3590890053 + ]; + static final String appIdIOS = String.fromCharCodes( + List.generate(_envieddataappIdIOS.length, (i) => i, growable: false) + .map((i) => _envieddataappIdIOS[i] ^ _enviedkeyappIdIOS[i]) + .toList(growable: false), + ); + static const List _enviedkeymessagingSenderId = [ + 4224217307, + 1416164239, + 3873050984, + 861961080, + 3600316823, + 658834599, + 168081024, + 4176338046, + 1146271311, + 1650709530, + 317129076, + 3974989485 + ]; + static const List _envieddatamessagingSenderId = [ + 4224217326, + 1416164282, + 3873050974, + 861961037, + 3600316847, + 658834582, + 168081074, + 4176337998, + 1146271351, + 1650709538, + 317129028, + 3974989466 + ]; + static final String messagingSenderId = String.fromCharCodes( + List.generate(_envieddatamessagingSenderId.length, (i) => i, + growable: false) + .map((i) => + _envieddatamessagingSenderId[i] ^ _enviedkeymessagingSenderId[i]) + .toList(growable: false), + ); + static const List _enviedkeyprojectId = [ + 4175265815, + 1137247990, + 987828616, + 2598310687, + 1038673386, + 1243038913, + 1796624241, + 3972827314, + 2145365747, + 2971971682 + ]; + static const List _envieddataprojectId = [ + 4175265915, + 1137247899, + 987828645, + 2598310777, + 1038673286, + 1243038900, + 1796624133, + 3972827334, + 2145365654, + 2971971600 + ]; + static final String projectId = String.fromCharCodes( + List.generate(_envieddataprojectId.length, (i) => i, growable: false) + .map((i) => _envieddataprojectId[i] ^ _enviedkeyprojectId[i]) + .toList(growable: false), + ); + static const List _enviedkeystorageBucket = [ + 937740932, + 1262989132, + 1376945164, + 1209591820, + 3993493657, + 3836971477, + 3485860702, + 4179092117, + 2788319439, + 3571516566, + 3629808378, + 2769128268, + 3911309393, + 1350272515, + 2858418972, + 672282309, + 4072332028, + 2282711581, + 3745067819, + 2369701676, + 3869556270, + 1163221734 + ]; + static const List _envieddatastorageBucket = [ + 937741032, + 1262989089, + 1376945185, + 1209591914, + 3993493749, + 3836971424, + 3485860650, + 4179092193, + 2788319402, + 3571516644, + 3629808340, + 2769128237, + 3911309345, + 1350272627, + 2858419055, + 672282293, + 4072331923, + 2282711657, + 3745067781, + 2369701711, + 3869556289, + 1163221643 + ]; + static final String storageBucket = String.fromCharCodes( + List.generate(_envieddatastorageBucket.length, (i) => i, growable: false) + .map((i) => _envieddatastorageBucket[i] ^ _enviedkeystorageBucket[i]) + .toList(growable: false), + ); + static const List _enviedkeyiosBundleId = [ + 2880026973, + 2060440650, + 477142176, + 4269010189, + 3295150441, + 3903732256, + 3229958387, + 2275409773, + 1092808370, + 3546248376, + 1472403767, + 1356499552, + 82194813, + 808953030, + 1582655239, + 3446960983, + 1919221183, + 1843231305, + 217595976, + 1882956528, + 1081085454, + 255059224, + 3793304687, + 2470981909, + 3121456508, + 515863899 + ]; + static const List _envieddataiosBundleId = [ + 2880026942, + 2060440613, + 477142221, + 4269010211, + 3295150341, + 3903732297, + 3229958296, + 2275409672, + 1092808415, + 3546248401, + 1472403801, + 1356499460, + 82194702, + 808953064, + 1582655329, + 3446960946, + 1919221210, + 1843231277, + 217596006, + 1882956419, + 1081085563, + 255059306, + 3793304590, + 2470982004, + 3121456399, + 515863866 + ]; + static final String iosBundleId = String.fromCharCodes( + List.generate(_envieddataiosBundleId.length, (i) => i, growable: false) + .map((i) => _envieddataiosBundleId[i] ^ _enviedkeyiosBundleId[i]) + .toList(growable: false), + ); +} diff --git a/example/lib/firebase_options.dart b/example/lib/firebase_options.dart index 29a617a..c4a1da0 100644 --- a/example/lib/firebase_options.dart +++ b/example/lib/firebase_options.dart @@ -3,6 +3,7 @@ import 'package:firebase_core/firebase_core.dart' show FirebaseOptions; import 'package:flutter/foundation.dart' show defaultTargetPlatform, kIsWeb, TargetPlatform; +import 'package:likeminds_feed_ss_sample/credentials/credentials.dart'; /// Default [FirebaseOptions] for use with your Firebase apps. /// @@ -49,20 +50,20 @@ class DefaultFirebaseOptions { } } - static const FirebaseOptions android = FirebaseOptions( - apiKey: 'AIzaSyClYr5Yd1CNx8sS9hqMgG6nnVEg4B8pnH0', - appId: '1:556581208807:android:54c235d0a7ff4cf1141842', - messagingSenderId: '556581208807', - projectId: 'lm-flutter', - storageBucket: 'lm-flutter.appspot.com', + static FirebaseOptions android = FirebaseOptions( + apiKey: FBCreds.apiKey, + appId: FBCreds.appIdAN, + messagingSenderId: FBCreds.messagingSenderId, + projectId: FBCreds.projectId, + storageBucket: FBCreds.storageBucket, ); - static const FirebaseOptions ios = FirebaseOptions( - apiKey: 'AIzaSyA1FpuiQNAdaZJ-xzxx3SLucERBhWLskvA', - appId: '1:556581208807:ios:471df4b3fe3b8a30141842', - messagingSenderId: '556581208807', - projectId: 'lm-flutter', - storageBucket: 'lm-flutter.appspot.com', - iosBundleId: 'com.likeminds.feed.suraasa', + static FirebaseOptions ios = FirebaseOptions( + apiKey: FBCreds.apiKey, + appId: FBCreds.appIdIOS, + messagingSenderId: FBCreds.messagingSenderId, + projectId: FBCreds.projectId, + storageBucket: FBCreds.storageBucket, + iosBundleId: FBCreds.iosBundleId, ); } diff --git a/example/lib/main.dart b/example/lib/main.dart index 1036ca2..f999634 100644 --- a/example/lib/main.dart +++ b/example/lib/main.dart @@ -7,7 +7,7 @@ import 'package:overlay_support/overlay_support.dart'; import 'package:firebase_messaging/firebase_messaging.dart'; import 'package:device_info_plus/device_info_plus.dart'; -import 'package:likeminds_feed_ss_fl/app.dart'; +import 'package:likeminds_feed_ss_fl/likeminds_feed_ss_fl.dart'; bool initialURILinkHandled = false; const debug = bool.fromEnvironment('DEBUG'); diff --git a/example/lib/screens/cred_screen.dart b/example/lib/screens/cred_screen.dart index f0ca98e..01cbd35 100644 --- a/example/lib/screens/cred_screen.dart +++ b/example/lib/screens/cred_screen.dart @@ -1,12 +1,11 @@ import 'dart:async'; import 'package:flutter/material.dart'; -import 'package:likeminds_feed_ss_fl/app.dart'; +import 'package:likeminds_feed_ss_fl/likeminds_feed_ss_fl.dart'; import 'package:likeminds_feed_ss_sample/bloc_observer/analytics_bloc_listener.dart'; import 'package:likeminds_feed_ss_sample/bloc_observer/profile_bloc_listener.dart'; import 'package:likeminds_feed_ss_sample/bloc_observer/routing_bloc_listener.dart'; import 'package:likeminds_feed_ss_sample/main.dart'; -import 'package:likeminds_feed_ss_sample/network_handling.dart'; import 'package:likeminds_feed_ss_sample/screens/activity_widget_screen.dart'; import 'package:likeminds_feed_ss_sample/screens/root_screen.dart'; import 'package:overlay_support/overlay_support.dart'; @@ -120,9 +119,6 @@ class _CredScreenState extends State { // TODO: add user id and user name of logged in user final uriLink = Uri.parse(initialLink); if (uriLink.isAbsolute) { - final deepLinkRequestBuilder = LMFeedDeepLinkRequestBuilder() - ..userId(userId ?? "Test-User-Id") - ..userName("Test User"); if (uriLink.path == '/community/post') { List secondPathSegment = initialLink.split('post_id='); if (secondPathSegment.length > 1 && secondPathSegment[1] != null) { diff --git a/example/lib/screens/root_screen.dart b/example/lib/screens/root_screen.dart index dc55d5b..94921b0 100644 --- a/example/lib/screens/root_screen.dart +++ b/example/lib/screens/root_screen.dart @@ -1,5 +1,5 @@ import 'package:flutter/material.dart'; -import 'package:likeminds_feed_ss_fl/app.dart'; +import 'package:likeminds_feed_ss_fl/likeminds_feed_ss_fl.dart'; class TabApp extends StatefulWidget { final Widget feedWidget; diff --git a/example/pubspec.yaml b/example/pubspec.yaml index 85c43b9..17bf62e 100644 --- a/example/pubspec.yaml +++ b/example/pubspec.yaml @@ -16,7 +16,7 @@ publish_to: "none" # Remove this line if you wish to publish to pub.dev # https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html # In Windows, build-name is used as the major, minor, and patch parts # of the product and file versions while build-number is used as the build suffix. -version: 2.0.0 +version: 2.0.1 environment: sdk: ">=3.0.0 <4.0.0" @@ -45,6 +45,7 @@ dependencies: bloc: flutter_bloc: likeminds_feed_flutter_core: + envied: # The following adds the Cupertino Icons font to your application. # Use with the CupertinoIcons class for iOS style icons. @@ -65,6 +66,8 @@ dev_dependencies: # package. See that file for information about deactivating specific lint # rules and activating additional ones. flutter_lints: ^2.0.0 + build_runner: ^2.4.8 + envied_generator: ^0.3.0+3 # For information on the generic Dart part of this file, see the # following page: https://dart.dev/tools/pub/pubspec diff --git a/lib/app.dart b/lib/likeminds_feed_ss_fl.dart similarity index 100% rename from lib/app.dart rename to lib/likeminds_feed_ss_fl.dart diff --git a/lib/src/builder/comment/comment_builder.dart b/lib/src/builder/comment/comment_builder.dart index df39ad2..b71324c 100644 --- a/lib/src/builder/comment/comment_builder.dart +++ b/lib/src/builder/comment/comment_builder.dart @@ -1,5 +1,5 @@ import 'package:flutter/material.dart'; -import 'package:likeminds_feed_ss_fl/app.dart'; +import 'package:likeminds_feed_ss_fl/likeminds_feed_ss_fl.dart'; Widget suraasaCommentWidgetBuilder(BuildContext context, LMFeedCommentWidget commentWidget, LMPostViewData postViewData) { diff --git a/lib/src/builder/post/components/post_footer.dart b/lib/src/builder/post/components/post_footer.dart index 9d7cebe..51c56f7 100644 --- a/lib/src/builder/post/components/post_footer.dart +++ b/lib/src/builder/post/components/post_footer.dart @@ -1,7 +1,5 @@ import 'package:flutter/material.dart'; -import 'package:likeminds_feed_flutter_core/likeminds_feed_core.dart'; -import 'package:likeminds_feed_ss_fl/app.dart'; -import 'package:likeminds_feed_ss_fl/src/utils/theme/theme.dart'; +import 'package:likeminds_feed_ss_fl/likeminds_feed_ss_fl.dart'; Widget suraasaPostFooterBuilder(BuildContext context, LMFeedPostFooter footerWidget, LMPostViewData postViewData, diff --git a/lib/src/builder/post/components/post_header.dart b/lib/src/builder/post/components/post_header.dart index 55e1080..b6b7d20 100644 --- a/lib/src/builder/post/components/post_header.dart +++ b/lib/src/builder/post/components/post_header.dart @@ -1,8 +1,5 @@ import 'package:flutter/material.dart'; -import 'package:likeminds_feed_flutter_core/likeminds_feed_core.dart'; -import 'package:likeminds_feed_ss_fl/app.dart'; -import 'package:likeminds_feed_ss_fl/src/utils/constants/assets_constants.dart'; -import 'package:likeminds_feed_ss_fl/src/utils/theme/theme.dart'; +import 'package:likeminds_feed_ss_fl/likeminds_feed_ss_fl.dart'; Widget suraasaPostHeaderBuilder(BuildContext context, LMFeedPostHeader header, LMPostViewData postViewData) { diff --git a/lib/src/builder/post/components/post_topic.dart b/lib/src/builder/post/components/post_topic.dart index 797377a..b534f22 100644 --- a/lib/src/builder/post/components/post_topic.dart +++ b/lib/src/builder/post/components/post_topic.dart @@ -1,7 +1,5 @@ import 'package:flutter/material.dart'; -import 'package:likeminds_feed_flutter_core/likeminds_feed_core.dart'; -import 'package:likeminds_feed_ss_fl/app.dart'; -import 'package:likeminds_feed_ss_fl/src/utils/theme/theme.dart'; +import 'package:likeminds_feed_ss_fl/likeminds_feed_ss_fl.dart'; Widget suraasaPostTopicChipBuilder(BuildContext context, LMFeedPostTopic oldTopicChip, LMPostViewData postViewData) { diff --git a/lib/src/utils/icons.dart b/lib/src/utils/icons.dart deleted file mode 100644 index 30a7b93..0000000 --- a/lib/src/utils/icons.dart +++ /dev/null @@ -1,9 +0,0 @@ -import 'package:flutter_svg/flutter_svg.dart'; -import 'package:likeminds_feed_ss_fl/src/utils/constants/assets_constants.dart'; - -Future loadSvgIntoCache() async { - for (String assetPath in svgAssets) { - SvgAssetLoader loader = SvgAssetLoader(assetPath); - svg.cache.putIfAbsent(loader.cacheKey(null), () => loader.loadBytes(null)); - } -} diff --git a/lib/src/utils/index.dart b/lib/src/utils/index.dart index 6eb3890..26208d3 100644 --- a/lib/src/utils/index.dart +++ b/lib/src/utils/index.dart @@ -3,7 +3,6 @@ export 'constants/string_constants.dart'; export 'theme/theme.dart'; -export 'icons.dart'; export 'network_handling.dart'; export 'suraasa_custom_time_stamps.dart'; diff --git a/lib/src/utils/suraasa_custom_time_stamps.dart b/lib/src/utils/suraasa_custom_time_stamps.dart index bfe4533..3394bff 100644 --- a/lib/src/utils/suraasa_custom_time_stamps.dart +++ b/lib/src/utils/suraasa_custom_time_stamps.dart @@ -1,4 +1,4 @@ -import 'package:likeminds_feed_ss_fl/app.dart'; +import 'package:likeminds_feed_ss_fl/likeminds_feed_ss_fl.dart'; import 'package:intl/intl.dart'; /// English short Messages diff --git a/pubspec.yaml b/pubspec.yaml index 490045d..5d4fbc0 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,60 +1,33 @@ name: likeminds_feed_ss_fl description: A new Flutter package project. -version: 2.0.0 +version: 2.0.1 publish_to: none homepage: "https://likeminds.community/" environment: sdk: ">=3.0.0 <4.0.0" - flutter: ">=3.0.0" + flutter: ">=3.10.0 <=3.16.9" dependencies: flutter: sdk: flutter - get_it: - share_plus: - envied: - url_launcher: - shared_preferences: - simple_s3: 0.3.2 - equatable: - bloc: - flutter_bloc: - firebase_core: - firebase_messaging: - overlay_support: - lazy_load_scrollview: - infinite_scroll_pagination: - device_info_plus: ^9.1.1 - permission_handler: - image_picker: - file_picker: - video_player: - open_filex: - timeago: - collection: - connectivity_plus: - custom_pop_up_menu: ^1.2.4 - flutter_no_internet_widget: ^1.0.0+18-dev.1 - extended_image: ^8.1.0 - http: + connectivity_plus: ^3.0.6 + likeminds_feed_flutter_core: 1.0.2 + likeminds_feed: 1.7.1 + media_kit: ^1.1.10 # Primary package. media_kit_video: ^1.2.4 # For video rendering. media_kit_libs_video: ^1.0.4 - likeminds_feed_flutter_core: # 1.0.0 - path: ../likeminds_feed_flutter/packages/integration - likeminds_feed: 1.7.0 - dependency_override: sliver_tools: 0.2.12 dev_dependencies: flutter_test: sdk: flutter - flutter_lints: ^2.0.0 - build_runner: ^2.4.6 + flutter_lints: ^2.0.3 + build_runner: ^2.4.8 # For information on the generic Dart part of this file, see the # following page: https://dart.dev/tools/pub/pubspec