张萌 4 years ago
commit ea21cfb81e

@ -1,4 +1,5 @@
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
@ -108,3 +109,10 @@ class AppTheme {
);
}
}
class SystemStyle {
static const lightStatusBar = SystemUiOverlayStyle(
statusBarIconBrightness: Brightness.light,
systemNavigationBarColor: Colors.white,
);
}

@ -22,7 +22,10 @@ import 'package:akuCommunity/utils/headers.dart';
void main() async {
WidgetsFlutterBinding.ensureInitialized();
SystemChrome.setSystemUIOverlayStyle(
SystemUiOverlayStyle(statusBarColor: Colors.transparent),
SystemUiOverlayStyle(
statusBarColor: Colors.transparent,
systemNavigationBarColor: Colors.white,
),
);
JPush jpush = new JPush();
jpush.addEventHandler(

@ -1,3 +1,5 @@
import 'package:akuCommunity/model/common/img_model.dart';
class CommentMessageModel {
int id;
int gambitThemeId;
@ -8,7 +10,8 @@ class CommentMessageModel {
int sendStatus;
String createName;
String createDate;
List<ImgUrls> imgUrls;
List<ImgModel> imgUrls;
List<ImgModel> headSculpture;
CommentMessageModel(
{this.id,
@ -20,7 +23,8 @@ class CommentMessageModel {
this.sendStatus,
this.createName,
this.createDate,
this.imgUrls});
this.imgUrls,
this.headSculpture});
CommentMessageModel.fromJson(Map<String, dynamic> json) {
id = json['id'];
@ -33,9 +37,15 @@ class CommentMessageModel {
createName = json['createName'];
createDate = json['createDate'];
if (json['imgUrls'] != null) {
imgUrls = new List<ImgUrls>();
imgUrls = [];
json['imgUrls'].forEach((v) {
imgUrls.add(new ImgUrls.fromJson(v));
imgUrls.add(new ImgModel.fromJson(v));
});
}
if (json['headSculpture'] != null) {
headSculpture = [];
json['headSculpture'].forEach((v) {
headSculpture.add(new ImgModel.fromJson(v));
});
}
}
@ -57,31 +67,3 @@ class CommentMessageModel {
return data;
}
}
class ImgUrls {
String url;
String size;
int longs;
int paragraph;
int sort;
ImgUrls({this.url, this.size, this.longs, this.paragraph, this.sort});
ImgUrls.fromJson(Map<String, dynamic> json) {
url = json['url'];
size = json['size'];
longs = json['longs'];
paragraph = json['paragraph'];
sort = json['sort'];
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
data['url'] = this.url;
data['size'] = this.size;
data['longs'] = this.longs;
data['paragraph'] = this.paragraph;
data['sort'] = this.sort;
return data;
}
}

@ -1,3 +1,4 @@
import 'package:akuCommunity/model/common/img_model.dart';
import 'package:flutter/material.dart';
import 'package:flustars/flustars.dart';
@ -56,7 +57,8 @@ class _CommentMessagePageState extends State<CommentMessagePage> {
clipBehavior: Clip.antiAlias,
child: FadeInImage.assetNetwork(
placeholder: R.ASSETS_IMAGES_PLACEHOLDER_WEBP,
image: model.imgUrls.first.url,
image: API.image(ImgModel.first(model.headSculpture)),
fit: BoxFit.cover,
),
),
10.wb,
@ -85,7 +87,8 @@ class _CommentMessagePageState extends State<CommentMessagePage> {
height: 160.w,
child: FadeInImage.assetNetwork(
placeholder: R.ASSETS_IMAGES_PLACEHOLDER_WEBP,
image: model.imgUrls.first.url,
image: API.image(ImgModel.first(model.imgUrls)),
fit: BoxFit.cover,
),
),
],

@ -15,14 +15,8 @@ class _AgreementPageState extends State<AgreementPage> {
title: '用户协议',
body: SingleChildScrollView(
padding: EdgeInsets.all(16.w),
child: Column(
children: [
Text(
'《用户协议》',
style: TextStyle(fontWeight: FontWeight.w600, fontSize: 35.w),
),
Text(
'''
child: Text(
'''
使APP
使APP使
@ -221,11 +215,9 @@ class _AgreementPageState extends State<AgreementPage> {
20201021
''',
style: TextStyle(
fontSize: 30.w,
),
),
],
style: TextStyle(
fontSize: 30.w,
),
),
),
);

@ -16,14 +16,8 @@ class _PrivacyPageState extends State<PrivacyPage> {
title: '隐私政策',
body: SingleChildScrollView(
padding: EdgeInsets.all(16.sp),
child: Column(
children: [
Text(
'小蜜蜂智慧社区隐私政策',
style: TextStyle(fontWeight: FontWeight.w600, fontSize: 35.w),
),
Text(
'''
child: Text(
'''
APPAPP便使使
1.
@ -124,11 +118,9 @@ class _PrivacyPageState extends State<PrivacyPage> {
20201020
''',
style: TextStyle(
fontSize: 30.w,
),
),
],
style: TextStyle(
fontSize: 30.w,
),
),
),
);

@ -99,6 +99,7 @@ class _TabNavigatorState extends State<TabNavigator>
bottomNavigationBar: StatefulBuilder(builder: (context, setFunc) {
return BottomNavigationBar(
items: _bottomNav,
backgroundColor: Colors.white,
currentIndex: _currentIndex,
selectedFontSize: 20.sp,
unselectedFontSize: 20.sp,

@ -203,12 +203,13 @@ class _AddNewEventPageState extends State<AddNewEventPage> {
Divider(height: 1.w),
28.hb,
if (widget.initTopic == null) _pickTopic(),
Align(
alignment: Alignment.centerLeft,
child: _renderTopic(
HotTopicModel(name: widget.topicName, id: widget.initTopic),
if (widget.initTopic != null)
Align(
alignment: Alignment.centerLeft,
child: _renderTopic(
HotTopicModel(name: widget.topicName, id: widget.initTopic),
),
),
),
],
).material(color: Colors.white),
);

@ -1,4 +1,6 @@
import 'package:akuCommunity/constants/app_theme.dart';
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
import 'package:flutter_easyrefresh/easy_refresh.dart';
import 'package:get/get.dart';
@ -31,57 +33,60 @@ class _TopicDetailPageState extends State<TopicDetailPage> {
@override
Widget build(BuildContext context) {
return Scaffold(
floatingActionButton: FloatingActionButton(
heroTag: 'event_add',
onPressed: () async {
if (LoginUtil.isNotLogin) return;
bool result = await Get.to(() => AddNewEventPage.topic(
topicName: widget.model.summary,
initTopic: widget.model.id,
));
},
child: Icon(Icons.add),
),
body: BeeListView(
convert: (model) {
return model.tableList
.map((e) => EventItemModel.fromJson(e))
.toList();
},
path: API.community.eventByTopicId,
extraParams: {'gambitId': widget.model.id},
controller: _refreshController,
builder: (items) {
return CustomScrollView(
slivers: [
SliverPersistentHeader(
delegate: TopicSliverHeader(
id: widget.model.id,
title: widget.model.summary,
imgPath: widget.model.firstImg,
subTitle: widget.model.content,
return AnnotatedRegion<SystemUiOverlayStyle>(
value: SystemStyle.lightStatusBar,
child: Scaffold(
floatingActionButton: FloatingActionButton(
heroTag: 'event_add',
onPressed: () async {
if (LoginUtil.isNotLogin) return;
bool result = await Get.to(() => AddNewEventPage.topic(
topicName: widget.model.summary,
initTopic: widget.model.id,
));
},
child: Icon(Icons.add),
),
body: BeeListView(
convert: (model) {
return model.tableList
.map((e) => EventItemModel.fromJson(e))
.toList();
},
path: API.community.eventByTopicId,
extraParams: {'gambitId': widget.model.id},
controller: _refreshController,
builder: (items) {
return CustomScrollView(
slivers: [
SliverPersistentHeader(
delegate: TopicSliverHeader(
id: widget.model.id,
title: widget.model.summary,
imgPath: widget.model.firstImg,
subTitle: widget.model.content,
),
pinned: true,
floating: true,
),
pinned: true,
floating: true,
),
SliverList(
delegate: SliverChildBuilderDelegate(
(context, index) {
final item = items[index] as EventItemModel;
return ChatCard(
model: item,
onDelete: () {
_refreshController.callRefresh();
},
);
},
childCount: items.length,
SliverList(
delegate: SliverChildBuilderDelegate(
(context, index) {
final item = items[index] as EventItemModel;
return ChatCard(
model: item,
onDelete: () {
_refreshController.callRefresh();
},
);
},
childCount: items.length,
),
),
),
],
);
},
],
);
},
),
),
);
}

@ -26,7 +26,7 @@ class TopicSliverHeader extends SliverPersistentHeaderDelegate {
top: 0,
bottom: 0,
child: Material(
color: Colors.white.withOpacity(0 + 0.5 * _offset(shrinkOffset)),
color: Colors.black.withOpacity(0 + 0.5 * _offset(shrinkOffset)),
),
);
}
@ -35,7 +35,7 @@ class TopicSliverHeader extends SliverPersistentHeaderDelegate {
return Positioned(
left: 0,
top: ScreenUtil().statusBarHeight,
child: BeeBackButton().material(
child: BeeBackButton(color: Colors.white).material(
color: Colors.transparent,
clipBehavior: Clip.antiAlias,
borderRadius: BorderRadius.circular(24),
@ -47,7 +47,7 @@ class TopicSliverHeader extends SliverPersistentHeaderDelegate {
return Positioned(
bottom: 202.w - 195.w * _filterOffset(shrinkOffset),
left: 32.w + (95.w - 32.w) * _offset(shrinkOffset),
child: '#$title'.text.bold.size(52.sp).make(),
child: '#$title'.text.bold.white.size(52.sp).make(),
);
}
@ -57,7 +57,15 @@ class TopicSliverHeader extends SliverPersistentHeaderDelegate {
left: 32.w,
child: Opacity(
opacity: 1 - _offset(shrinkOffset),
child: subTitle.text.size(24.sp).make(),
child: SizedBox(
width: 500.w,
child: subTitle.text
.size(24.sp)
.maxLines(2)
.white
.overflow(TextOverflow.ellipsis)
.make(),
),
),
);
}
@ -78,6 +86,13 @@ class TopicSliverHeader extends SliverPersistentHeaderDelegate {
fit: BoxFit.cover,
),
),
Positioned(
left: 0,
right: 0,
top: 0,
bottom: 0,
child: Material(color: Colors.black.withOpacity(0.4)),
),
_buildOverlay(shrinkOffset),
_buildBackButton(),
_buildTitle(shrinkOffset),

@ -82,21 +82,18 @@ class MyEventCard extends StatelessWidget {
tag: ImgModel.first(model.imgUrl),
);
},
child: Hero(
tag: ImgModel.first(model.imgUrl),
child: Container(
clipBehavior: Clip.antiAlias,
decoration: BoxDecoration(
color: Colors.black12,
borderRadius: BorderRadius.circular(8.w),
),
child: FadeInImage.assetNetwork(
placeholder: R.ASSETS_IMAGES_PLACEHOLDER_WEBP,
image: API.image(ImgModel.first(model.imgUrl)),
width: 152.w,
height: 152.w,
fit: BoxFit.cover,
),
child: Container(
clipBehavior: Clip.antiAlias,
decoration: BoxDecoration(
color: Colors.black12,
borderRadius: BorderRadius.circular(8.w),
),
child: FadeInImage.assetNetwork(
placeholder: R.ASSETS_IMAGES_PLACEHOLDER_WEBP,
image: API.image(ImgModel.first(model.imgUrl)),
width: 152.w,
height: 152.w,
fit: BoxFit.cover,
),
),
),

@ -100,7 +100,7 @@ class NoticeCard extends StatelessWidget {
tag: ImgModel.first(model.imgUrls),
child: FadeInImage.assetNetwork(
placeholder: R.ASSETS_IMAGES_PLACEHOLDER_WEBP,
image: ImgModel.first(model.imgUrls),
image: API.image(ImgModel.first(model.imgUrls)),
width: 152.w,
height: 152.w,
fit: BoxFit.cover,

@ -19,7 +19,6 @@ class HomeNotification extends StatefulWidget {
}
class _HomeNotificationState extends State<HomeNotification> {
@override
Widget build(BuildContext context) {
return Row(
@ -38,8 +37,12 @@ class _HomeNotificationState extends State<HomeNotification> {
alignment: Alignment.centerLeft,
height: 85.w,
child: AnimatedTextKit(
pause: Duration(milliseconds: 2000),
animatedTexts: widget.items
.map((e) => RotateAnimatedText(e.title))
.map((e) => RotateAnimatedText(
e.title,
duration: Duration(milliseconds: 3000),
))
.toList(),
repeatForever: true,
),

Loading…
Cancel
Save