Merge pull request #7 from kishan06/priyanka

blog article and subscription changes done
This commit is contained in:
priyankahadpad
2024-04-18 15:01:39 +05:30
committed by GitHub
12 changed files with 246 additions and 171 deletions

View File

@@ -1,31 +0,0 @@
Extension Discovery Cache
=========================
This folder is used by `package:extension_discovery` to cache lists of
packages that contains extensions for other packages.
DO NOT USE THIS FOLDER
----------------------
* Do not read (or rely) the contents of this folder.
* Do write to this folder.
If you're interested in the lists of extensions stored in this folder use the
API offered by package `extension_discovery` to get this information.
If this package doesn't work for your use-case, then don't try to read the
contents of this folder. It may change, and will not remain stable.
Use package `extension_discovery`
---------------------------------
If you want to access information from this folder.
Feel free to delete this folder
-------------------------------
Files in this folder act as a cache, and the cache is discarded if the files
are older than the modification time of `.dart_tool/package_config.json`.
Hence, it should never be necessary to clear this cache manually, if you find a
need to do please file a bug.

View File

@@ -1 +0,0 @@
{"version":2,"entries":[{"package":"icdevicemanager_flutter","rootUri":"../","packageUri":"lib/"}]}

View File

@@ -199,6 +199,12 @@
"packageUri": "lib/",
"languageVersion": "2.12"
},
{
"name": "intl",
"rootUri": "file:///C:/Users/WDI-/AppData/Local/Pub/Cache/hosted/pub.dev/intl-0.18.1",
"packageUri": "lib/",
"languageVersion": "2.12"
},
{
"name": "io",
"rootUri": "file:///C:/Users/WDI-/AppData/Local/Pub/Cache/hosted/pub.dev/io-1.0.4",
@@ -373,6 +379,12 @@
"packageUri": "lib/",
"languageVersion": "2.18"
},
{
"name": "timeago",
"rootUri": "file:///C:/Users/WDI-/AppData/Local/Pub/Cache/hosted/pub.dev/timeago-3.6.1",
"packageUri": "lib/",
"languageVersion": "2.12"
},
{
"name": "timing",
"rootUri": "file:///C:/Users/WDI-/AppData/Local/Pub/Cache/hosted/pub.dev/timing-1.0.1",
@@ -416,7 +428,7 @@
"languageVersion": "2.17"
}
],
"generated": "2024-04-11T06:11:34.892808Z",
"generated": "2024-04-17T13:38:49.333490Z",
"generator": "pub",
"generatorVersion": "2.19.6"
}

View File

@@ -138,6 +138,10 @@ http_parser
2.12
file:///C:/Users/WDI-/AppData/Local/Pub/Cache/hosted/pub.dev/http_parser-4.0.2/
file:///C:/Users/WDI-/AppData/Local/Pub/Cache/hosted/pub.dev/http_parser-4.0.2/lib/
intl
2.12
file:///C:/Users/WDI-/AppData/Local/Pub/Cache/hosted/pub.dev/intl-0.18.1/
file:///C:/Users/WDI-/AppData/Local/Pub/Cache/hosted/pub.dev/intl-0.18.1/lib/
io
2.12
file:///C:/Users/WDI-/AppData/Local/Pub/Cache/hosted/pub.dev/io-1.0.4/
@@ -250,6 +254,10 @@ test_api
2.18
file:///C:/Users/WDI-/AppData/Local/Pub/Cache/hosted/pub.dev/test_api-0.4.16/
file:///C:/Users/WDI-/AppData/Local/Pub/Cache/hosted/pub.dev/test_api-0.4.16/lib/
timeago
2.12
file:///C:/Users/WDI-/AppData/Local/Pub/Cache/hosted/pub.dev/timeago-3.6.1/
file:///C:/Users/WDI-/AppData/Local/Pub/Cache/hosted/pub.dev/timeago-3.6.1/lib/
timing
2.14
file:///C:/Users/WDI-/AppData/Local/Pub/Cache/hosted/pub.dev/timing-1.0.1/

View File

@@ -1,3 +1,3 @@
{
"dart.flutterSdkPath": "~/Flutter/Sdk/3.7.12"
"dart.flutterSdkPath": "C:\\Flutter_SDK\\flutter"
}

View File

@@ -73,19 +73,24 @@ class BlogDetails extends StatelessWidget {
),
),
const SizedBox(height: 10),
Image.network(
imageUpload!,
// 'assets/image/blog/philosophyCard.jpg',
// height: 400,
width: Get.size.width,
fit: BoxFit.fitWidth,
Container(
height: 300,
child: Image.network(
imageUpload!,
// 'assets/image/blog/philosophyCard.jpg',
// height: 400,
width: Get.size.width,
fit: BoxFit.fill,
),
),
const SizedBox(height: 30),
Column(
children: [
Html(data: description)
],
Expanded(
child: SingleChildScrollView(
child: Column(
children: [Html(data: description)],
),
),
)
// Expanded(
// child: Padding(

View File

@@ -14,6 +14,7 @@ import '../../../modals/search_blogModel.dart';
import '../../components/appbar.dart';
import '../../theme.dart';
import 'blog_inner.dart';
import 'package:timeago/timeago.dart' as timeago;
class BlogMain extends StatefulWidget {
const BlogMain({Key? key}) : super(key: key);
@@ -242,94 +243,63 @@ class _NewsBodyState extends State<NewsBody> {
return (searchArticle?.result != null &&
searchArticle!.result!.isNotEmpty)
? Expanded(
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
SizedBox(height: 20),
Text(
'Top News',
style: TextStyle(
fontSize: 22,
color: Color(0xff858585),
fontFamily: 'SFPRO',
fontWeight: FontWeight.w700,
child: SingleChildScrollView(
child: Container(
// color: Colors.red,
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
SizedBox(height: 20),
Text(
'Top News',
style: TextStyle(
fontSize: 22,
color: Color(0xff858585),
fontFamily: 'SFPRO',
fontWeight: FontWeight.w700,
),
),
),
SizedBox(height: 15),
SizedBox(
height: 280,
child: ListView.builder(
itemCount: searchArticle!.result!.length,
scrollDirection: Axis.horizontal,
itemBuilder: (context, index) {
var updatedAtTime =
searchArticle!.result![index].updatedAt;
DateTime updatedAt =
DateTime.parse(updatedAtTime!);
Duration difference =
DateTime.now().difference(updatedAt);
String formattedDifference =
DateFormat().add_Hm().format(updatedAt);
return philosophyCard(
ArticleName: searchArticle!
.result![index].shortText ??
'',
shortText: searchArticle!
.result![index].articleName ??
'',
image_upload: searchArticle!
.result![index].thumbnailPath ??
'',
updatedAtTime: formattedDifference,
categoryId:
searchArticle!.result![index].id ?? 0,
InnerimageUpload: searchArticle!
.result![index].imageUpload ??
'',
Innertages:
searchArticle!.result![index].tags,
InnerDescription: searchArticle!
.result![index].description,
Innerformattedtime: formattedDifference,
// articleid: widget.category.articles![index],
);
}),
),
SizedBox(height: 10),
Expanded(
SizedBox(height: 15),
SizedBox(
height: 280,
child: ListView.builder(
itemCount: searchArticle?.result!.length,
physics: ScrollPhysics(),
shrinkWrap: true,
// shrinkWrap: true,
itemCount: searchArticle!.result!.length,
scrollDirection: Axis.horizontal,
itemBuilder: (context, index) {
String formatDateTime(
var updatedAtTime = searchArticle!
.result![index].updatedAt;
DateTime updatedAt =
DateTime.parse(updatedAtTime!);
Duration difference =
DateTime.now().difference(updatedAt);
String formattedDifference = DateFormat()
.add_Hm()
.format(updatedAt);
String formatDateTime2(
String dateTimeString) {
// Parse the datetime string
DateTime dateTime =
DateTime.parse(dateTimeString);
String formattedDateTime =
DateFormat('MMM dd, yyyy hh:mm a')
.format(dateTime);
formattedDateTime += ' IST';
return formattedDateTime;
String formatedtime = timeago
.format(dateTime, locale: 'en');
return formatedtime;
}
return cardList(
articleName: searchArticle!
return philosophyCard(
ArticleName: searchArticle!
.result![index].shortText ??
'',
shortText: searchArticle!
.result![index].articleName ??
'',
thumbnailimg: searchArticle!
image_upload: searchArticle!
.result![index].thumbnailPath ??
'',
updatedTime: formatDateTime(
searchArticle!
.result![index].updatedAt ??
''),
updatedAtTime: formatDateTime2(
searchArticle!.result![index]
.updatedAt as String),
categoryId:
searchArticle!.result![index].id ??
0,
@@ -340,16 +310,80 @@ class _NewsBodyState extends State<NewsBody> {
searchArticle!.result![index].tags,
InnerDescription: searchArticle!
.result![index].description,
Innerformattedtime: formatDateTime(
searchArticle!
.result![index].updatedAt ??
''),
Innerformattedtime: formatDateTime2(
searchArticle!.result![index]
.updatedAt as String),
// Innerformattedtime: formattedDifference,
// articleid: widget.category.articles![index],
);
}))
],
}),
),
SizedBox(height: 10),
ListView.builder(
itemCount: searchArticle?.result!.length,
physics: ScrollPhysics(),
shrinkWrap: true,
itemBuilder: (context, index) {
String formatDateTime(
String dateTimeString) {
// Parse the datetime string
DateTime dateTime =
DateTime.parse(dateTimeString);
String formattedDateTime =
DateFormat('MMM dd, yyyy hh:mm a')
.format(dateTime);
formattedDateTime += ' IST';
return formattedDateTime;
}
String formatDateTime2(
String dateTimeString) {
DateTime dateTime =
DateTime.parse(dateTimeString);
String formatedtime = timeago
.format(dateTime, locale: 'en');
return formatedtime;
}
return cardList(
articleName: searchArticle!
.result![index].articleName ??
'',
thumbnailimg: searchArticle!
.result![index].thumbnailPath ??
'',
updatedTime: formatDateTime(searchArticle!
.result![index].updatedAt ??
''),
categoryId:
searchArticle!.result![index].id ?? 0,
InnerimageUpload: searchArticle!
.result![index].imageUpload ??
'',
Innertages:
searchArticle!.result![index].tags,
InnerDescription: searchArticle!
.result![index].description,
Innerformattedtime: formatDateTime2(
searchArticle!.result![index]
.updatedAt as String) ??
'',
// articleid: widget.category.articles![index],
);
}),
// SizedBox(
// height: 400,
// )
],
),
),
)
))
: Expanded(
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
@@ -422,20 +456,26 @@ philosophyCard({
SizedBox(height: 10),
Expanded(
child: Padding(
padding: const EdgeInsets.symmetric(horizontal: 20.0),
padding: const EdgeInsets.symmetric(horizontal: 16),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Text(
shortText,
style: TextStyle(
fontSize: 14,
color: Color(0xff919191),
fontFamily: 'SFPRO',
SizedBox(
width: 225,
child: Text(
shortText,
maxLines: 1,
style: TextStyle(
overflow: TextOverflow.ellipsis,
fontSize: 14,
color: Color(0xff919191),
fontFamily: 'SFPRO',
),
),
),
Spacer(),
Text(
updatedAtTime,
style: TextStyle(
@@ -449,7 +489,9 @@ philosophyCard({
SizedBox(height: 10),
Text(
ArticleName,
maxLines: 1,
style: TextStyle(
overflow: TextOverflow.ellipsis,
fontSize: 18,
color: ColorConstants.kWhite,
fontFamily: 'SFPRO',

View File

@@ -90,47 +90,54 @@ class _MySubscriptionState extends State<MySubscription> {
borderRadius: BorderRadius.circular(30),
),
child: Padding(
padding: const EdgeInsets.all(20),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
padding: const EdgeInsets.all(16),
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Text(
subscriptionObj!.result!.utmSource ?? '',
'Current active plan:-',
style: TextStyle(
fontSize: 25,
fontSize: 22,
color: !globalController.darkMode.value
? ColorConstants.kBlack
: ColorConstants.kWhite,
fontFamily: 'SFPRO',
),
),
SizedBox(
height: 30,
),
rowTile(
text:
'Unlimited access to live virtual fitness classes led by certified trainers.'),
SizedBox(
height: 20,
),
rowTile(
text:
'Access to a library of workout videos covering various fitness levels and goals.'),
SizedBox(
height: 20,
),
rowTile(
text:
'Progress tracking to monitor your achievements and stay motivated.'),
SizedBox(
height: 20,
),
rowTile(
text:
'Basic nutrition guidance and meal planning tips.'),
SizedBox(
height: 20,
Text(
subscriptionObj!.result!.utmSource ?? '',
style: TextStyle(
fontSize: 22,
color: !globalController.darkMode.value
? ColorConstants.kBlack
: ColorConstants.kWhite,
fontFamily: 'SFPRO',
),
),
// rowTile(
// text:
// 'Unlimited access to live virtual fitness classes led by certified trainers.'),
// SizedBox(
// height: 20,
// ),
// rowTile(
// text:
// 'Access to a library of workout videos covering various fitness levels and goals.'),
// SizedBox(
// height: 20,
// ),
// rowTile(
// text:
// 'Progress tracking to monitor your achievements and stay motivated.'),
// SizedBox(
// height: 20,
// ),
// rowTile(
// text:
// 'Basic nutrition guidance and meal planning tips.'),
// SizedBox(
// height: 20,
// ),
],
),
),
@@ -161,9 +168,16 @@ class _MySubscriptionState extends State<MySubscription> {
child: Center(
child: Row(
children: [
Icon(
Icons.calendar_month_outlined,
color: Color(0xFFBBF046),
Column(
children: [
SizedBox(
height: 4,
),
Icon(
Icons.calendar_month_outlined,
color: Color(0xFFBBF046),
),
],
),
SizedBox(
width: 10,
@@ -171,7 +185,7 @@ class _MySubscriptionState extends State<MySubscription> {
Expanded(
child: Text(
// 'Membership till : 15/04/2024 - 15/10/2024',
'Membership till : $formattedStartDate - $formattedEndDate',
'Next renewal date : $formattedEndDate',
style: TextStyle(
fontSize: 14,

View File

@@ -1708,6 +1708,14 @@ packages:
url: "https://pub.dev"
source: hosted
version: "0.4.16"
timeago:
dependency: "direct main"
description:
name: timeago
sha256: "46c128312ab0ea144b146c0ac6426ddd96810efec2de3fccc425d00179cd8254"
url: "https://pub.dev"
source: hosted
version: "3.3.0"
timing:
dependency: transitive
description:

View File

@@ -38,13 +38,12 @@ dependencies:
image_cropper: ^3.0.1
image_picker: ^0.8.7
carousel_slider: ^4.1.1
intl: ^0.17.0
modal_bottom_sheet: ^2.1.2
flutter_branch_sdk: any
health: any
pin_code_fields: ^7.4.0
intl: ^0.17.0
percent_indicator: ^4.2.1
vibration: ^1.7.6
audioplayers: ^1.1.1
@@ -119,6 +118,7 @@ dependencies:
video_player: ^2.6.1
flutter_isolate: ^2.0.2
injectable: ^1.4.1
timeago: any
# flutter_launcher_icons: ^0.12.0
# dependency_overrides:

View File

@@ -259,6 +259,14 @@ packages:
url: "https://pub.dev"
source: hosted
version: "4.0.2"
intl:
dependency: "direct main"
description:
name: intl
sha256: "3bc132a9dbce73a7e4a21a17d06e1878839ffbf975568bc875c60537824b0c4d"
url: "https://pub.dev"
source: hosted
version: "0.18.1"
io:
dependency: transitive
description:
@@ -488,6 +496,14 @@ packages:
url: "https://pub.dev"
source: hosted
version: "0.4.16"
timeago:
dependency: "direct main"
description:
name: timeago
sha256: d3204eb4c788214883380253da7f23485320a58c11d145babc82ad16bf4e7764
url: "https://pub.dev"
source: hosted
version: "3.6.1"
timing:
dependency: transitive
description:

View File

@@ -14,6 +14,8 @@ dependencies:
json_annotation: ^4.6.0
build_runner: ^1.7.0
plugin_platform_interface: ^2.0.2
intl: ^0.17.0
dev_dependencies:
change_app_package_name: ^1.0.0