Browse Source

排版也没

ios
王子贤 1 month ago
parent
commit
149e20ff10
6 changed files with 73 additions and 5 deletions
  1. BIN
      assets/images/star.png
  2. BIN
      assets/images/test_bg.png
  3. 2
      lib/generated/assets.dart
  4. 19
      lib/pages/home/real_home_page.dart
  5. 53
      lib/pages/home/test_page.dart
  6. 4
      lib/pages/home/timeline_page.dart

BIN
assets/images/star.png

Before After
Width: 69  |  Height: 67  |  Size: 838 B

BIN
assets/images/test_bg.png

Before After
Width: 1500  |  Height: 4297  |  Size: 960 KiB

2
lib/generated/assets.dart

@ -201,6 +201,7 @@ class Assets {
static const String imagesSplash = 'assets/images/splash.png';
static const String imagesSquareNol = 'assets/images/square_nol.png';
static const String imagesSquarePre = 'assets/images/square_pre.png';
static const String imagesStar = 'assets/images/star.png';
static const String imagesStarSkyBg = 'assets/images/star_sky_bg.png';
static const String imagesSubscript = 'assets/images/subscript.png';
static const String imagesSuccessIcon = 'assets/images/success_icon.png';
@ -210,6 +211,7 @@ class Assets {
static const String imagesTeenagerList = 'assets/images/teenager_list.png';
static const String imagesTest1 = 'assets/images/test1.png';
static const String imagesTest2 = 'assets/images/test2.png';
static const String imagesTestBg = 'assets/images/test_bg.png';
static const String imagesUnreadIcon = 'assets/images/unread_icon.png';
static const String imagesUpdataBg = 'assets/images/updata_bg.png';
static const String imagesUpdataFont = 'assets/images/updata_font.png';

19
lib/pages/home/real_home_page.dart

@ -1,8 +1,11 @@
import 'package:dating_touchme_app/components/page_appbar.dart';
import 'package:dating_touchme_app/components/sphere_cloud.dart';
import 'package:dating_touchme_app/controller/home/real_home_controller.dart';
import 'package:dating_touchme_app/extension/ex_widget.dart';
import 'package:dating_touchme_app/generated/assets.dart';
import 'package:dating_touchme_app/pages/home/real_home_timeline_item.dart';
import 'package:dating_touchme_app/pages/home/test_page.dart';
import 'package:dating_touchme_app/pages/home/user_information_page.dart';
import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:get/get.dart';
@ -60,15 +63,17 @@ class _RealHomePageState extends State<RealHomePage> with AutomaticKeepAliveClie
fontWeight: FontWeight.w400
),
),
Image.network(
e.profilePhoto,
Image.asset(
Assets.imagesStar,
width: 18.w,
height: 18.w,
fit: BoxFit.cover,
)
],
),
);
).onTap((){
Get.to(() => UserInformationPage(miId: e.miId, userId: e.userId,));
});
}),
]
),
@ -118,11 +123,15 @@ class _RealHomePageState extends State<RealHomePage> with AutomaticKeepAliveClie
Image.asset(
Assets.imagesTest1,
width: 170.w,
),
).onTap(() {
Get.to(() => TestPage());
}),
Image.asset(
Assets.imagesTest2,
width: 170.w,
),
).onTap(() {
Get.to(() => TestPage());
}),
],
),
SizedBox(height: 15.w,),

53
lib/pages/home/test_page.dart

@ -0,0 +1,53 @@
import 'package:dating_touchme_app/components/page_appbar.dart';
import 'package:dating_touchme_app/generated/assets.dart';
import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
class TestPage extends StatelessWidget {
const TestPage({super.key});
@override
Widget build(BuildContext context) {
return Stack(
children: [
Image.asset(
Assets.imagesTestBg,
width: 375.w,
fit: BoxFit.cover,
),
Scaffold(
backgroundColor: Colors.transparent,
appBar: PageAppbar(title: "人格类型测试", color: Colors.white, backgroundColor: Colors.transparent,),
body: Container(
width: 375.w,
padding: EdgeInsets.symmetric(
vertical: 40.w,
horizontal: 12.w
),
child: Column(
children: [
Container(
width: 350.w,
padding: EdgeInsets.all(30.w),
decoration: BoxDecoration(
borderRadius: BorderRadius.all(Radius.circular(16.w)),
color: const Color.fromRGBO(39, 48, 89, 1)
),
child: Center(
child: Text(
"在陌生环境中,你通常会在陌生环境中,你通常会在陌生环境中,你通常会",
style: TextStyle(
fontSize: 16.w,
color: Colors.white
),
),
),
)
],
),
),
)
],
);
}
}

4
lib/pages/home/timeline_page.dart

@ -28,6 +28,10 @@ class _TimelinePageState extends State<TimelinePage>
if (!Get.isRegistered<TimelineController>()) {
Get.put(TimelineController());
}
// HomeController
if (!Get.isRegistered<HomeController>()) {
Get.put(HomeController());
}
}
@override

Loading…
Cancel
Save