Merge branch 'master' of http://test.akuhotel.com:8099/zhangmeng/aku_community_manager
commit
79c161bab9
After Width: | Height: | Size: 21 KiB |
After Width: | Height: | Size: 62 KiB |
After Width: | Height: | Size: 192 KiB |
After Width: | Height: | Size: 25 KiB |
After Width: | Height: | Size: 14 KiB |
@ -0,0 +1 @@
|
||||
cwebp -q 60 -resize 1000 0 $1 -o ./assets/static_temp/$2
|
@ -1,4 +1,8 @@
|
||||
class UserInfoModel {
|
||||
String nickName;
|
||||
String avatarPath;
|
||||
UserInfoModel({
|
||||
this.nickName,
|
||||
this.avatarPath,
|
||||
});
|
||||
}
|
||||
|
@ -1,18 +1,29 @@
|
||||
import 'package:aku_community_manager/const/resource.dart';
|
||||
import 'package:aku_community_manager/mock_models/users/user_info_model.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
//登录状态管理
|
||||
class UserProvider extends ChangeNotifier{
|
||||
class UserProvider extends ChangeNotifier {
|
||||
bool _isSigned = false;
|
||||
|
||||
|
||||
bool _isSigned=false;
|
||||
///用户是否登陆
|
||||
get isSigned=>_isSigned;
|
||||
get isSigned => _isSigned;
|
||||
|
||||
///设置用户登陆
|
||||
setisSigned (bool state){
|
||||
_isSigned=state;
|
||||
notifyListeners();
|
||||
setisSigned(bool state) {
|
||||
_isSigned = state;
|
||||
notifyListeners();
|
||||
}
|
||||
|
||||
UserInfoModel _userInfoModel = UserInfoModel(
|
||||
nickName: '李大海',
|
||||
avatarPath: R.ASSETS_STATIC_TEMP_F3_WEBP,
|
||||
);
|
||||
|
||||
UserInfoModel get userInfoModel => _userInfoModel;
|
||||
|
||||
|
||||
}
|
||||
setNickName(String name) {
|
||||
_userInfoModel.nickName = name;
|
||||
notifyListeners();
|
||||
}
|
||||
}
|
||||
|
@ -0,0 +1,107 @@
|
||||
import 'package:aku_community_manager/style/app_style.dart';
|
||||
import 'package:aku_community_manager/tools/widget_tool.dart';
|
||||
import 'package:aku_community_manager/ui/sub_pages/activity_manager/fake_activity_model.dart';
|
||||
import 'package:aku_community_manager/ui/widgets/common/aku_scaffold.dart';
|
||||
import 'package:common_utils/common_utils.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:aku_community_manager/tools/screen_tool.dart';
|
||||
|
||||
class ActivityDetailPage extends StatefulWidget {
|
||||
final FakeActivityManagerModel model;
|
||||
ActivityDetailPage({Key key, @required this.model}) : super(key: key);
|
||||
|
||||
@override
|
||||
_ActivityDetailPageState createState() => _ActivityDetailPageState();
|
||||
}
|
||||
|
||||
class _ActivityDetailPageState extends State<ActivityDetailPage> {
|
||||
static const String format = 'yyyy年MM月dd日HH:mm';
|
||||
String get startDate =>
|
||||
DateUtil.formatDate(widget.model.dateStart, format: format);
|
||||
String get endDate =>
|
||||
DateUtil.formatDate(widget.model.dateEnd, format: format);
|
||||
String get checkInDate =>
|
||||
DateUtil.formatDate(widget.model.checkInDate, format: format);
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return AkuScaffold(
|
||||
title: '活动详情',
|
||||
body: ListView(
|
||||
children: [
|
||||
Hero(
|
||||
tag: widget.model.title,
|
||||
child: Image.asset(
|
||||
widget.model.imgPath,
|
||||
height: 228.w,
|
||||
fit: BoxFit.cover,
|
||||
),
|
||||
),
|
||||
Padding(
|
||||
padding: EdgeInsets.symmetric(
|
||||
vertical: 24.w,
|
||||
horizontal: 32.w,
|
||||
),
|
||||
child: Column(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
children: [
|
||||
Text(
|
||||
widget.model.title,
|
||||
style: TextStyle(
|
||||
color: AppStyle.primaryTextColor,
|
||||
fontSize: 36.sp,
|
||||
fontWeight: FontWeight.bold,
|
||||
),
|
||||
),
|
||||
AkuBox.h(16),
|
||||
Text(
|
||||
widget.model.article,
|
||||
style: TextStyle(
|
||||
color: AppStyle.primaryTextColor,
|
||||
fontSize: 28.sp,
|
||||
),
|
||||
),
|
||||
AkuBox.h(40),
|
||||
_buildTile('开始时间', startDate),
|
||||
_buildTile('结束时间', endDate),
|
||||
_buildTile('地点', widget.model.location),
|
||||
_buildTile('参与人数', widget.model.people),
|
||||
_buildTile('报名截止', checkInDate),
|
||||
],
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
_buildTile(String title, String subTitle) {
|
||||
return Padding(
|
||||
padding: EdgeInsets.symmetric(vertical: 6.w),
|
||||
child: Row(
|
||||
children: [
|
||||
SizedBox(
|
||||
width: 164.w,
|
||||
child: Text(
|
||||
title,
|
||||
style: TextStyle(
|
||||
color: AppStyle.primaryTextColor,
|
||||
fontSize: 28.w,
|
||||
),
|
||||
),
|
||||
),
|
||||
Expanded(
|
||||
child: Text(
|
||||
subTitle,
|
||||
style: TextStyle(
|
||||
color: AppStyle.primaryTextColor,
|
||||
fontSize: 28.w,
|
||||
fontWeight: FontWeight.bold,
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
@ -0,0 +1,113 @@
|
||||
import 'package:aku_community_manager/style/app_style.dart';
|
||||
import 'package:aku_community_manager/tools/widget_tool.dart';
|
||||
import 'package:aku_community_manager/ui/sub_pages/activity_manager/activity_detail_page.dart';
|
||||
import 'package:aku_community_manager/ui/sub_pages/activity_manager/fake_activity_model.dart';
|
||||
import 'package:common_utils/common_utils.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:aku_community_manager/tools/screen_tool.dart';
|
||||
import 'package:get/route_manager.dart';
|
||||
|
||||
class ActivityManagerCard extends StatelessWidget {
|
||||
String get startDate =>
|
||||
DateUtil.formatDate(model.dateStart, format: 'yyyy-MM-dd');
|
||||
|
||||
String get endDate =>
|
||||
DateUtil.formatDate(model.dateEnd, format: 'yyyy-MM-dd');
|
||||
|
||||
final FakeActivityManagerModel model;
|
||||
const ActivityManagerCard({Key key, @required this.model}) : super(key: key);
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Container(
|
||||
margin: EdgeInsets.symmetric(vertical: 24.w, horizontal: 32.w),
|
||||
child: GestureDetector(
|
||||
onTap: () {
|
||||
Get.to(ActivityDetailPage(model: model));
|
||||
},
|
||||
child: Column(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
ClipRRect(
|
||||
borderRadius: BorderRadius.vertical(top: Radius.circular(8.w)),
|
||||
child: Container(
|
||||
height: 228.w,
|
||||
width: double.infinity,
|
||||
child: Hero(
|
||||
tag: model.title,
|
||||
child: Image.asset(
|
||||
model.imgPath,
|
||||
fit: BoxFit.cover,
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
Container(
|
||||
padding: EdgeInsets.all(24.w),
|
||||
child: Column(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Text(
|
||||
model.title,
|
||||
style: TextStyle(
|
||||
color: AppStyle.primaryTextColor,
|
||||
fontSize: 28.sp,
|
||||
fontWeight: FontWeight.bold,
|
||||
),
|
||||
),
|
||||
AkuBox.h(12),
|
||||
_buildTile('主办方:', model.hostName),
|
||||
_buildTile('地点:', model.location),
|
||||
_buildTile('报名时间:', '$startDate\至$endDate'),
|
||||
],
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
decoration: BoxDecoration(
|
||||
color: Colors.white,
|
||||
borderRadius: BorderRadius.circular(8.w),
|
||||
border: Border.all(
|
||||
color: Color(0xFFE8E8E8),
|
||||
width: 2.w,
|
||||
),
|
||||
boxShadow: [
|
||||
BoxShadow(
|
||||
offset: Offset(0, 2.w),
|
||||
blurRadius: 20.w,
|
||||
color: Color(0xFFEFEFEF),
|
||||
)
|
||||
],
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
_buildTile(String title, String subTitle) {
|
||||
return Row(
|
||||
children: [
|
||||
SizedBox(
|
||||
width: 120.w,
|
||||
child: Text(
|
||||
title,
|
||||
style: TextStyle(
|
||||
color: AppStyle.minorTextColor,
|
||||
fontSize: 24.sp,
|
||||
),
|
||||
),
|
||||
),
|
||||
Expanded(
|
||||
child: Text(
|
||||
subTitle,
|
||||
style: TextStyle(
|
||||
color: AppStyle.primaryTextColor,
|
||||
fontSize: 24.sp,
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
);
|
||||
}
|
||||
}
|
Loading…
Reference in new issue