fix: 图片提交4x,提示画质。iOS logo提交;
This commit is contained in:
1 parent
2f1ec27802
commit
9e10608245
85 files changed
+1027
-645
No files matched your search
@@ -4,6 +4,7 @@ import 'package:skywood/global/client/user_client.dart';
|
||||
import 'package:skywood/global/request/api_const.dart';
|
||||
import 'package:skywood/main/lib_file.dart';
|
||||
import 'package:skywood/pages/mine/page/about_us_page.dart';
|
||||
import 'package:skywood/pages/mine/page/mine_collection_page.dart';
|
||||
import 'package:skywood/pages/mine/page/sky_web_page.dart';
|
||||
import 'package:skywood/pages/mine/widget/mine_section_view.dart';
|
||||
import 'package:skywood/pages/widgets/pixel_widgets.dart';
|
||||
@@ -28,6 +29,12 @@ class _MainRootState extends State<MinePage> {
|
||||
|
||||
List<Widget> _buildSections() {
|
||||
final menuData = [
|
||||
{
|
||||
'title': 'Collection', 'img': ConstImg.collection,
|
||||
'action': () {
|
||||
HelpNav.to(MineCollectionPage());
|
||||
}
|
||||
},
|
||||
{
|
||||
'title': 'Privacy Policy', 'img': ConstImg.minePp,
|
||||
'action': () {
|
||||
@@ -168,10 +175,11 @@ class _MainRootState extends State<MinePage> {
|
||||
child: Column(
|
||||
children: [
|
||||
HelpImg.asset(imgName, width: _w/2.0),
|
||||
SkyText(text: title, fontSize: 9, color: Colors.white,
|
||||
const SizedBox(height: 2),
|
||||
SkyText(text: title, fontSize: 9.w, color: Colors.white,
|
||||
maxLines: 2,
|
||||
textAlign: TextAlign.center,
|
||||
),
|
||||
)
|
||||
],
|
||||
),
|
||||
)
|
||||
@@ -181,70 +189,3 @@ class _MainRootState extends State<MinePage> {
|
||||
}
|
||||
|
||||
|
||||
class _MenuTile extends StatelessWidget {
|
||||
const _MenuTile({required this.item});
|
||||
|
||||
final _MenuItem item;
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Container(
|
||||
padding: EdgeInsets.fromLTRB(4.w, 4.h, 4.w, 6.h),
|
||||
decoration: BoxDecoration(
|
||||
color: const Color(0xFF8D62F7),
|
||||
border: Border.all(color: CommonColor.black, width: 1.w),
|
||||
boxShadow: const [
|
||||
BoxShadow(color: Color(0xFF1C1E1F), offset: Offset(2, 2)),
|
||||
],
|
||||
),
|
||||
child: Column(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
Icon(item.icon, color: Colors.white, size: 25.w),
|
||||
SizedBox(height: 5.h),
|
||||
Text(
|
||||
item.label,
|
||||
maxLines: 1,
|
||||
overflow: TextOverflow.ellipsis,
|
||||
style: TextStyle(
|
||||
color: Colors.white,
|
||||
fontSize: 8.sp,
|
||||
fontWeight: FontWeight.w700,
|
||||
height: 1,
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
class _DecorIcon extends StatelessWidget {
|
||||
const _DecorIcon({required this.icon, required this.color});
|
||||
|
||||
final IconData icon;
|
||||
final Color color;
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Container(
|
||||
width: 50.w,
|
||||
height: 50.w,
|
||||
decoration: BoxDecoration(
|
||||
color: Colors.white,
|
||||
border: Border.all(color: CommonColor.black, width: 1.w),
|
||||
boxShadow: const [
|
||||
BoxShadow(color: Color(0xFF1C1E1F), offset: Offset(2, 2)),
|
||||
],
|
||||
),
|
||||
child: Icon(icon, color: color, size: 32.w),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
class _MenuItem {
|
||||
const _MenuItem(this.label, this.icon);
|
||||
|
||||
final String label;
|
||||
final IconData icon;
|
||||
}
|
||||
@@ -1,6 +1,9 @@
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:skywood/global/const/common_color.dart';
|
||||
import 'package:skywood/global/request/api_const.dart';
|
||||
import 'package:skywood/main/lib_file.dart';
|
||||
import 'package:skywood/pages/mine/page/sky_web_page.dart';
|
||||
import 'package:skywood/utils/tools/sky_device_info.dart';
|
||||
import 'package:skywood/utils/tools/widgets/sky_app_bar.dart';
|
||||
import 'package:skywood/utils/tools/widgets/sky_common_widget.dart';
|
||||
@@ -14,14 +17,19 @@ class AboutUsPage extends StatelessWidget {
|
||||
Widget build(BuildContext context) {
|
||||
return Scaffold(
|
||||
appBar: SkyAppBar(
|
||||
title: 'About Us',
|
||||
title: 'About',
|
||||
),
|
||||
body: SizedBox(
|
||||
width: double.infinity,
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.center,
|
||||
children: [
|
||||
const SizedBox(height: 100),
|
||||
const SizedBox(height: 50),
|
||||
SizedBox(
|
||||
width: 80, height: 80,
|
||||
child: HelpImg.asset(ConstImg.appLogo),
|
||||
),
|
||||
const SizedBox(height: 10),
|
||||
SkyText(text: ApiConst.appName,
|
||||
fontSize: 16,
|
||||
fontWeight: FontWeight.bold,
|
||||
@@ -33,20 +41,55 @@ class AboutUsPage extends StatelessWidget {
|
||||
color: Colors.grey,
|
||||
),
|
||||
const SizedBox(height: 20),
|
||||
Container(
|
||||
height: 46,
|
||||
padding: const EdgeInsets.symmetric(horizontal: 15, vertical: 4),
|
||||
child: Row(
|
||||
children: [
|
||||
_buildRowItem('Privacy Policy', () {
|
||||
HelpNav.to(SkyWebPage(params: WebLinkParams(
|
||||
title: 'Privacy Policy',
|
||||
urlString: ApiConst.webPrivacy,
|
||||
)));
|
||||
}),
|
||||
|
||||
_buildRowItem('User Agreement', () {
|
||||
HelpNav.to(SkyWebPage(params: WebLinkParams(
|
||||
title: 'User Agreement',
|
||||
urlString: ApiConst.webAgreement,
|
||||
)));
|
||||
}),
|
||||
|
||||
_buildRowItem('Visit Website', () async {
|
||||
final encodedUrl = Uri.encodeFull(ApiConst.webIndex);
|
||||
try {
|
||||
final bool launched = await launchUrl(
|
||||
Uri.parse(encodedUrl),
|
||||
mode: LaunchMode.externalApplication,
|
||||
);
|
||||
if (!launched) {
|
||||
print('无法打开链接: $encodedUrl');
|
||||
}
|
||||
} catch (e) {
|
||||
print('打开链接异常: $e');
|
||||
}
|
||||
}),
|
||||
|
||||
],
|
||||
),
|
||||
)
|
||||
],
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
_buildRowItem(String title, Function() onTap) {
|
||||
return Container(
|
||||
height: 46,
|
||||
padding: const EdgeInsets.symmetric(horizontal: 15, vertical: 5),
|
||||
margin: const EdgeInsets.only(bottom: 10),
|
||||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
SkyText(text: title, fontSize: 14, color: Colors.black),
|
||||
Icon(Icons.arrow_forward, color: CommonColor.black, size: 18,),
|
||||
],
|
||||
),
|
||||
).addInkWell(onTap: onTap);
|
||||
}
|
||||
|
||||
Future<void> openUrl(String url) async {
|
||||
final encodedUrl = Uri.encodeFull(url);
|
||||
|
||||
@@ -0,0 +1,147 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:skywood/global/client/play_client.dart';
|
||||
import 'package:skywood/main/lib_file.dart';
|
||||
import 'package:skywood/pages/home/players/page/drama_detail_page.dart';
|
||||
import 'package:skywood/pages/like/widget/no_data_view.dart';
|
||||
import 'package:skywood/pages/search/page/result_page.dart';
|
||||
import 'package:skywood/utils/models/drama/skywood_drama.dart';
|
||||
import 'package:skywood/utils/tools/app_toast.dart';
|
||||
import 'package:skywood/utils/tools/widgets/sky_app_bar.dart';
|
||||
import 'package:skywood/utils/tools/widgets/sky_common_widget.dart';
|
||||
|
||||
import '../../../utils/tools/sky_time_tool.dart';
|
||||
|
||||
class MineCollectionPage extends StatefulWidget {
|
||||
|
||||
const MineCollectionPage({super.key});
|
||||
|
||||
@override
|
||||
State<StatefulWidget> createState() {
|
||||
return _CollectionPageState();
|
||||
}
|
||||
}
|
||||
|
||||
class _CollectionPageState extends State<MineCollectionPage> {
|
||||
|
||||
List<SkywoodDrama> _collectionList = [];
|
||||
bool _isLoading = false;
|
||||
|
||||
@override
|
||||
void initState() {
|
||||
super.initState();
|
||||
_getCollection();
|
||||
}
|
||||
|
||||
void _getCollection() {
|
||||
AppToast.showLottieLoading();
|
||||
_isLoading = true;
|
||||
PlayClient.getCollections().then((value) {
|
||||
AppToast.dismiss();
|
||||
_isLoading = false;
|
||||
if (!mounted) return;
|
||||
setState(() {
|
||||
_collectionList = value;
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
void _cancelCol(int shortPlayId) {
|
||||
// AppToast.showLottieLoading();
|
||||
// remove
|
||||
_collectionList.removeWhere((element) => element.shortPlayId == shortPlayId);
|
||||
PlayClient.cancelCollect(shortPlayId: shortPlayId).then((value) {
|
||||
// AppToast.dismiss();
|
||||
});
|
||||
}
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Scaffold(
|
||||
appBar: SkyAppBar(
|
||||
title: 'Collection',
|
||||
actions: [],
|
||||
),
|
||||
body: !_isLoading && _collectionList.isEmpty ? NoDataView() : ListView.separated(
|
||||
itemBuilder: (context, index) {
|
||||
final item = _collectionList[index];
|
||||
return Dismissible(
|
||||
onDismissed: (direction) {
|
||||
_cancelCol(item.shortPlayId!);
|
||||
|
||||
},
|
||||
key: Key(item.shortPlayId.toString()),
|
||||
child: MineItemView(drama: _collectionList[index]),
|
||||
);
|
||||
},
|
||||
separatorBuilder: (context, index) {
|
||||
return const SizedBox(height: 5);
|
||||
},
|
||||
itemCount: _collectionList.length
|
||||
),
|
||||
);
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
class MineItemView extends StatelessWidget {
|
||||
|
||||
const MineItemView({super.key,
|
||||
required this.drama,
|
||||
this.onTap
|
||||
});
|
||||
|
||||
final SkywoodDrama drama;
|
||||
final Function()? onTap;
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
|
||||
return Container(
|
||||
height: 120.h,
|
||||
padding: const EdgeInsets.symmetric(horizontal: 15),
|
||||
child: Row(
|
||||
children: [
|
||||
HelpImg.networkRadius(drama.imageUrl, width: 90.w, height: 110.h,
|
||||
borderRadius: BorderRadius.circular(6),
|
||||
fit: BoxFit.cover,
|
||||
),
|
||||
const SizedBox(width: 10),
|
||||
Expanded(child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
const SizedBox(height: 8),
|
||||
SkyText(text: drama.name,
|
||||
fontSize: 14,
|
||||
fontWeight: FontWeight.bold,
|
||||
color: CommonColor.black,
|
||||
),
|
||||
const SizedBox(height: 12),
|
||||
|
||||
SkyText(text: drama.description,
|
||||
fontSize: 11,
|
||||
color: CommonColor.withValue('4D4047'),
|
||||
maxLines: 2,
|
||||
),
|
||||
Spacer(),
|
||||
_tipView(true, text: 'EP.${drama.episodeTotal}'),
|
||||
const SizedBox(height: 10),
|
||||
],
|
||||
))
|
||||
],
|
||||
),
|
||||
).addInkWell(onTap: onTap);
|
||||
}
|
||||
|
||||
Widget _tipView(bool isStar, {required String text}) {
|
||||
String imgName = isStar ? ConstImg.star : ConstImg.look;
|
||||
return Row(
|
||||
children: [
|
||||
HelpImg.asset(imgName, width: 12.w, height: 12.w),
|
||||
const SizedBox(width: 2),
|
||||
SkyText(text: text, fontSize: 12, color: Colors.grey)
|
||||
],
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -1,9 +1,12 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
||||
import 'package:loading_animation_widget/loading_animation_widget.dart';
|
||||
import 'package:skywood/global/const/common_color.dart';
|
||||
import 'package:skywood/utils/tools/widgets/sky_app_bar.dart';
|
||||
import 'package:webview_flutter/webview_flutter.dart';
|
||||
|
||||
import '../../../utils/tools/help_img.dart';
|
||||
|
||||
/// WebView 页面参数
|
||||
class WebLinkParams {
|
||||
final String title;
|
||||
@@ -212,7 +215,7 @@ class _WebLinkViewState extends State<SkyWebPage> {
|
||||
titleColor: Colors.white,
|
||||
actions: [
|
||||
IconButton(
|
||||
icon: const Icon(Icons.refresh),
|
||||
icon: const Icon(Icons.refresh, color: Colors.white,),
|
||||
onPressed: _reload,
|
||||
),
|
||||
],
|
||||
@@ -221,12 +224,12 @@ class _WebLinkViewState extends State<SkyWebPage> {
|
||||
|
||||
Widget _buildBody() {
|
||||
return Container(
|
||||
decoration: const BoxDecoration(
|
||||
decoration: BoxDecoration(
|
||||
gradient: LinearGradient(
|
||||
begin: Alignment.topCenter,
|
||||
end: Alignment.bottomCenter,
|
||||
colors: [
|
||||
Color(0xFF1A0B2E),
|
||||
CommonColor.primacyColor,
|
||||
Color(0xFF2D1B4E),
|
||||
],
|
||||
),
|
||||
@@ -255,9 +258,10 @@ class _WebLinkViewState extends State<SkyWebPage> {
|
||||
Widget _buildContent() {
|
||||
if (_isLoading) {
|
||||
return Center(
|
||||
child: LoadingAnimationWidget.newtonCradle(
|
||||
color: const Color(0xFFFB98E0),
|
||||
size: 96.w,
|
||||
child: SizedBox(
|
||||
width: 120,
|
||||
height: 120,
|
||||
child: Image.asset(ConstImg.loading, fit: BoxFit.fill),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
@@ -49,7 +49,7 @@ class MineSectionView extends StatelessWidget {
|
||||
children: [
|
||||
HelpImg.asset(ConstImg.sectionTopBg, width: width, height: 20.h),
|
||||
Positioned(
|
||||
left: 7, right: 7,
|
||||
left: 7, right: 7, top: 2,
|
||||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
|
||||
Reference in new issue
Block a user