张萌 3 years ago
commit 82f5ae0e20

@ -2,7 +2,7 @@ def localProperties = new Properties()
def localPropertiesFile = rootProject.file('local.properties')
if (localPropertiesFile.exists()) {
localPropertiesFile.withReader('UTF-8') { reader ->
localProperties.load(reader)
localProperties.load(reader)
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.5 KiB

@ -158,6 +158,9 @@ class R {
/// ![preview](file:///Users/akufe/Documents/aku_community/assets/icons/consult.png)
static const String ASSETS_ICONS_CONSULT_PNG = 'assets/icons/consult.png';
/// ![preview](file:///Users/akufe/Documents/aku_community/assets/icons/facility.png)
static const String ASSETS_ICONS_FACILITY_PNG = 'assets/icons/facility.png';
/// ![preview](file:///Users/akufe/Documents/aku_community/assets/icons/file.png)
static const String ASSETS_ICONS_FILE_PNG = 'assets/icons/file.png';

@ -1,6 +1,6 @@
class API {
///HOST
static const String host = 'http://test.akuhotel.com:8804';
static const String host = 'http://39.103.177.88:8804';
///
static const String baseURL = '$host/IntelligentCommunity/app';
@ -296,4 +296,16 @@ class _Facility {
///
String get appointment => '/user/facilitiesAppointment/list';
///
String get add => '/user/facilitiesAppointment/insert';
///
String get scan => '/user/facilitiesAppointment/signIn';
///
String get cancel => '/user/facilitiesAppointment/cancel';
///使
String get stop => '/user/facilitiesAppointment/useStop';
}

@ -34,6 +34,9 @@ class AppTheme {
elevation: 0,
centerTitle: true,
brightness: Brightness.light,
iconTheme: IconThemeData(
color: Color(0xFF333333),
),
textTheme: TextTheme(
headline6: TextStyle(
color: Color(0xFF333333),

@ -17,7 +17,8 @@ import 'package:aku_community/utils/developer_util.dart';
import 'package:aku_community/utils/headers.dart';
void main() async {
DeveloperUtil.setDev(true);
const buildType = const String.fromEnvironment('BUILD_TYPE');
DeveloperUtil.setDev(!(buildType.contains('PRODUCT')));
WidgetsFlutterBinding.ensureInitialized();
///firebase crashlytics initalize

@ -1,6 +1,5 @@
import 'dart:io';
import 'package:aku_community/utils/message_parser.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/foundation.dart';
import 'package:flutter/material.dart';
@ -14,6 +13,7 @@ import 'package:power_logger/power_logger.dart';
import 'package:aku_community/constants/app_theme.dart';
import 'package:aku_community/constants/config.dart';
import 'package:aku_community/utils/message_parser.dart';
class MainInitialize {
///firebase
@ -44,10 +44,7 @@ class MainInitialize {
Future<dynamic> Function(Map<String, dynamic>? message)? jPushLogger(
String type) {
return (Map<String, dynamic>? message) async {
LoggerData.addData({
'type': type,
'message': message,
});
LoggerData.addData(message, tag: type);
};
}

@ -1,7 +1,10 @@
import 'package:flustars/flustars.dart';
import 'package:flutter/material.dart';
import 'package:flustars/flustars.dart';
import 'package:json_annotation/json_annotation.dart';
import 'package:aku_community/base/base_style.dart';
part 'facility_appointment_model.g.dart';
@JsonSerializable()
@ -39,7 +42,7 @@ class FacilityAppointmentModel {
Color get statusColor {
switch (status) {
case 1:
return Colors.blue;
return kPrimaryColor;
case 2:
return Color(0xFF2576E5);
case 3:
@ -56,7 +59,7 @@ class FacilityAppointmentModel {
String get statusValue {
switch (status) {
case 1:
return '未签到';
return '预约成功';
case 2:
return '签到成功';
case 3:

@ -49,12 +49,7 @@ class _HomeSearchState extends State<HomeSearch> {
color: Color(0xFF666666),
),
10.wb,
'搜索商品、活动、帖子、应用'
.text
.size(28.sp)
.color(ktextSubColor)
.make()
.expand(),
'搜索应用'.text.size(28.sp).color(ktextSubColor).make().expand(),
],
),
),

@ -224,7 +224,10 @@ class AppProvider extends ChangeNotifier {
List<CarParkingModel> _carModels = [];
List<CarParkingModel> get carModels => _carModels;
Future updateCarModels() async {
BaseModel baseModel = await NetUtil().get(API.user.carList);
BaseModel baseModel = await NetUtil().get(
API.user.carList,
params: {'estateId': selectedHouse?.estateId ?? 0},
);
if (baseModel.data == null) return [];
_carModels = (baseModel.data as List)
.map((e) => CarParkingModel.fromJson(e))

@ -0,0 +1,54 @@
import 'package:flutter/material.dart';
import 'package:get/get.dart';
import 'package:qr_code_scanner/qr_code_scanner.dart';
class BeeQR {
static Future<String?> scan() async {
return await Get.to(() => _QRScanPage());
}
}
class _QRScanPage extends StatefulWidget {
_QRScanPage({Key? key}) : super(key: key);
@override
__QRScanPageState createState() => __QRScanPageState();
}
class __QRScanPageState extends State<_QRScanPage> {
final GlobalKey qrKey = GlobalKey(debugLabel: 'QR');
QRViewController? _controller;
bool _doneTag = false;
@override
void dispose() {
_controller?.dispose();
super.dispose();
}
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(),
body: SizedBox(
width: double.infinity,
height: double.infinity,
child: QRView(
key: qrKey,
overlay: QrScannerOverlayShape(
borderRadius: 8,
),
onQRViewCreated: (controller) {
_controller = controller;
controller.scannedDataStream.listen((event) {
if (!_doneTag) {
_doneTag = true;
Get.back(result: event.code);
}
});
},
),
),
);
}
}

@ -1,11 +1,22 @@
import 'package:aku_community/models/facility/facility_appointment_model.dart';
import 'package:aku_community/widget/bee_divider.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:bot_toast/bot_toast.dart';
import 'package:get/get.dart';
import 'package:aku_community/base/base_style.dart';
import 'package:aku_community/constants/api.dart';
import 'package:aku_community/models/facility/facility_appointment_model.dart';
import 'package:aku_community/ui/common/qr_scan.dart';
import 'package:aku_community/utils/headers.dart';
import 'package:aku_community/utils/network/net_util.dart';
import 'package:aku_community/widget/bee_divider.dart';
class FacilityAppointmentCard extends StatelessWidget {
final FacilityAppointmentModel model;
const FacilityAppointmentCard({Key? key, required this.model})
final VoidCallback onUpdate;
const FacilityAppointmentCard(
{Key? key, required this.model, required this.onUpdate})
: super(key: key);
Widget _renderTile({
@ -21,7 +32,12 @@ class FacilityAppointmentCard extends StatelessWidget {
width: 40.w,
),
12.wb,
Text(name),
Text(
name,
style: TextStyle(
color: ktextSubColor,
),
),
Spacer(),
Text(subTitle),
],
@ -30,9 +46,95 @@ class FacilityAppointmentCard extends StatelessWidget {
Widget _renderButton() {
var showTip = model.status == 1 || model.status == 2;
late Widget button;
switch (model.status) {
case 1:
//1.(30)
if (model.appointmentStart == null) button = SizedBox();
int diffTime =
model.appointmentStart!.difference(DateTime.now()).inMinutes;
bool inTime = diffTime >= 0 && diffTime <= 30;
if (inTime)
button = _FacilityButton(
onPressed: () async {
var result = await BeeQR.scan();
if (result != null) {
final cancel = BotToast.showLoading();
await NetUtil().get(
API.manager.facility.scan,
params: {'appointmentCode': result},
showMessage: true,
);
cancel();
onUpdate();
}
},
text: '扫码签到',
);
else
button = _FacilityButton(
onPressed: () async {
bool? result = await Get.dialog(
CupertinoAlertDialog(
title: Text('取消预约'),
content: Text('您确定要取消预约吗?'),
actions: [
CupertinoDialogAction(
child: Text('先等等'),
onPressed: () => Get.back(),
),
CupertinoDialogAction(
child: Text('取消预约'),
onPressed: () => Get.back(result: true),
),
],
),
);
if (result == true) {
final cancel = BotToast.showLoading();
await NetUtil().get(
API.manager.facility.cancel,
params: {'facilitiesAppointmentId': model.id},
showMessage: true,
);
cancel();
onUpdate();
}
},
text: '取消预约',
);
break;
case 2:
button = _FacilityButton(
onPressed: () async {
final cancel = BotToast.showLoading();
await NetUtil().get(
API.manager.facility.stop,
params: {'facilitiesAppointmentId': model.id},
showMessage: true,
);
cancel();
onUpdate();
},
text: '使用结束',
);
break;
default:
button = SizedBox();
}
return Row(
children: [
if (showTip) Text('请在预约时间前30分钟内到场扫码'),
if (showTip)
Text(
'请在预约时间前30分钟内到场扫码',
style: TextStyle(
color: ktextSubColor,
fontSize: 24.sp,
),
),
Spacer(),
button,
],
);
}
@ -92,3 +194,39 @@ class FacilityAppointmentCard extends StatelessWidget {
);
}
}
class _FacilityButton extends StatelessWidget {
final Color color;
final Color textColor;
final VoidCallback onPressed;
final String text;
final bool outline;
const _FacilityButton({
Key? key,
this.color = kPrimaryColor,
required this.onPressed,
required this.text,
this.outline = false,
this.textColor = ktextPrimary,
}) : super(key: key);
@override
Widget build(BuildContext context) {
return MaterialButton(
color: outline ? null : color,
shape: StadiumBorder(),
elevation: 0,
height: 60.w,
minWidth: 168.w,
padding: EdgeInsets.zero,
onPressed: onPressed,
child: Text(
text,
style: TextStyle(
color: textColor,
fontSize: 26.sp,
),
),
);
}
}

@ -1,6 +1,10 @@
import 'package:aku_community/ui/community/facility/facility_appointment_view.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:get/get.dart';
import 'package:aku_community/ui/community/facility/facility_appointment_view.dart';
import 'package:aku_community/ui/community/facility/facility_preview_page.dart';
import 'package:aku_community/widget/bee_scaffold.dart';
import 'package:aku_community/widget/tab_bar/bee_tab_bar.dart';
@ -31,6 +35,12 @@ class _FacilityAppointmentPageState extends State<FacilityAppointmentPage>
Widget build(BuildContext context) {
return BeeScaffold(
title: '设施预约',
actions: [
IconButton(
icon: Icon(CupertinoIcons.add_circled),
onPressed: () => Get.to(() => FacilityPreorderPage()),
),
],
appBarBottom: BeeTabBar(
controller: _tabController,
tabs: ['我的预约', '历史预约'],

@ -1,9 +1,11 @@
import 'package:flutter/material.dart';
import 'package:flutter_easyrefresh/easy_refresh.dart';
import 'package:aku_community/constants/api.dart';
import 'package:aku_community/models/facility/facility_appointment_model.dart';
import 'package:aku_community/pages/things_page/widget/bee_list_view.dart';
import 'package:aku_community/ui/community/facility/facility_appointment_card.dart';
import 'package:flutter/material.dart';
import 'package:flutter_easyrefresh/easy_refresh.dart';
import 'package:aku_community/utils/headers.dart';
enum FacilityAppointmentType {
@ -50,7 +52,12 @@ class _FacilityAppointmentViewState extends State<FacilityAppointmentView> {
return ListView.separated(
padding: EdgeInsets.all(32.w),
itemBuilder: (context, index) {
return FacilityAppointmentCard(model: items[index]);
return FacilityAppointmentCard(
model: items[index],
onUpdate: () {
_refreshController.callRefresh();
},
);
},
separatorBuilder: (_, __) => 32.hb,
itemCount: items.length,

@ -1,25 +0,0 @@
import 'package:flutter/material.dart';
import 'package:aku_community/widget/bee_scaffold.dart';
class FacilityPage extends StatefulWidget {
FacilityPage({Key? key}) : super(key: key);
@override
_FacilityPageState createState() => _FacilityPageState();
}
class _FacilityPageState extends State<FacilityPage> {
@override
Widget build(BuildContext context) {
return BeeScaffold(
title: '设施预约',
actions: [
IconButton(
icon: Icon(Icons.add_circle_outline_rounded, color: Colors.black87),
onPressed: () {},
),
],
);
}
}

@ -0,0 +1,179 @@
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:bot_toast/bot_toast.dart';
import 'package:flustars/flustars.dart';
import 'package:get/get.dart';
import 'package:provider/provider.dart';
import 'package:aku_community/base/base_style.dart';
import 'package:aku_community/constants/api.dart';
import 'package:aku_community/constants/app_theme.dart';
import 'package:aku_community/models/facility/facility_type_model.dart';
import 'package:aku_community/provider/app_provider.dart';
import 'package:aku_community/ui/community/facility/pick_facility_page.dart';
import 'package:aku_community/ui/profile/house/pick_my_house_page.dart';
import 'package:aku_community/utils/headers.dart';
import 'package:aku_community/utils/network/net_util.dart';
import 'package:aku_community/widget/bee_divider.dart';
import 'package:aku_community/widget/bee_scaffold.dart';
import 'package:aku_community/widget/buttons/bottom_button.dart';
import 'package:aku_community/widget/picker/bee_date_picker.dart';
class FacilityPreorderPage extends StatefulWidget {
FacilityPreorderPage({Key? key}) : super(key: key);
@override
_FacilityPreorderPageState createState() => _FacilityPreorderPageState();
}
class _FacilityPreorderPageState extends State<FacilityPreorderPage> {
FacilityTypeModel? typeModel;
DateTime? startDate;
DateTime? endDate;
bool get canTap => startDate != null && endDate != null && typeModel != null;
@override
Widget build(BuildContext context) {
final appProvider = Provider.of<AppProvider>(context);
return BeeScaffold(
title: '添加预订',
bodyColor: Colors.white,
systemStyle: SystemStyle.yellowBottomBar,
body: ListView(
padding: EdgeInsets.symmetric(vertical: 32.w),
children: [
Text('业主房屋').pSymmetric(h: 32.w),
ListTile(
leading: Image.asset(
R.ASSETS_ICONS_HOUSE_PNG,
height: 60.w,
width: 60.w,
),
onTap: () => Get.to(() => PickMyHousePage()),
title: Text(S.of(context)!.tempPlotName),
subtitle: Text(appProvider.selectedHouse?.roomName ?? '选择房间'),
trailing: Icon(CupertinoIcons.chevron_forward),
),
BeeDivider(
indent: 32.w,
endIndent: 32.w,
),
32.hb,
Text('选择设施').pSymmetric(h: 32.w),
ListTile(
leading: Image.asset(
R.ASSETS_ICONS_FACILITY_PNG,
height: 60.w,
width: 60.w,
),
onTap: () async {
FacilityTypeModel? model = await Get.to(() => PickFacilityPage());
if (model != null) typeModel = model;
setState(() {});
},
title: Text(S.of(context)!.tempPlotName),
subtitle: Text(typeModel?.name ?? '选择设施'),
trailing: Icon(CupertinoIcons.chevron_forward),
),
BeeDivider(
indent: 32.w,
endIndent: 32.w,
),
32.hb,
Text('预约时间').pSymmetric(h: 32.w),
SizedBox(
height: 120.w,
child: Row(
children: [
MaterialButton(
materialTapTargetSize: MaterialTapTargetSize.shrinkWrap,
height: 120.w,
onPressed: () async {
DateTime? date = await BeeDatePicker.pick(
DateTime.now(),
mode: CupertinoDatePickerMode.dateAndTime,
min: DateTime.now().subtract(Duration(seconds: 1)),
max: DateTime.now().add(Duration(days: 30)),
);
if (date != null) {
startDate = date;
setState(() {});
}
},
child: Text(
startDate == null
? '请选择开始时间'
: DateUtil.formatDate(
startDate,
format: 'yyyy-MM-dd HH:mm',
),
style: TextStyle(
color: ktextSubColor,
),
),
).expand(),
Icon(Icons.arrow_forward),
MaterialButton(
materialTapTargetSize: MaterialTapTargetSize.shrinkWrap,
height: 120.w,
onPressed: () async {
DateTime? date = await BeeDatePicker.pick(
startDate == null ? DateTime.now() : startDate!,
min: startDate == null
? DateTime.now().subtract(Duration(seconds: 1))
: startDate!,
max: startDate == null
? DateTime.now().add(Duration(days: 1))
: (startDate!).add(Duration(days: 1)),
mode: CupertinoDatePickerMode.dateAndTime,
);
if (date != null) {
endDate = date;
setState(() {});
}
},
child: Text(
endDate == null
? '请选择结束时间'
: DateUtil.formatDate(
endDate,
format: 'yyyy-MM-dd HH:mm',
),
style: TextStyle(
color: ktextSubColor,
),
),
).expand(),
],
),
),
BeeDivider(
indent: 32.w,
endIndent: 32.w,
),
],
),
bottomNavi: BottomButton(
onPressed: canTap
? () async {
final cancel = BotToast.showLoading();
var model = await NetUtil().post(
API.manager.facility.add,
params: {
'estateId': appProvider.selectedHouse?.estateId ?? 0,
'facilitiesManageId': typeModel!.id,
'appointmentStartDate': NetUtil.getDate(startDate!),
'appointmentEndDate': NetUtil.getDate(endDate!),
},
showMessage: true,
);
cancel();
if (model.status == true) Get.back(result: true);
}
: null,
child: Text('确认提交'),
),
);
}
}

@ -1,5 +1,7 @@
import 'package:flutter/material.dart';
import 'package:get/get.dart';
import 'package:aku_community/base/base_style.dart';
import 'package:aku_community/constants/api.dart';
import 'package:aku_community/model/common/img_model.dart';
@ -13,6 +15,8 @@ class FacilityTypeCard extends StatelessWidget {
@override
Widget build(BuildContext context) {
return MaterialButton(
color: Colors.white,
elevation: 0,
padding: EdgeInsets.zero,
clipBehavior: Clip.antiAlias,
shape: RoundedRectangleBorder(
@ -64,29 +68,13 @@ class FacilityTypeCard extends StatelessWidget {
],
),
),
MaterialButton(
height: 52.w,
minWidth: 168.w,
padding: EdgeInsets.zero,
elevation: 0,
shape: StadiumBorder(),
color: kPrimaryColor,
onPressed: () {},
child: Text(
'填写预约',
style: TextStyle(
fontWeight: FontWeight.bold,
fontSize: 26.sp,
),
),
),
32.wb,
],
),
24.hb,
],
),
onPressed: () {},
onPressed: () => Get.back(result: model),
);
}
}

@ -250,12 +250,7 @@ class _AllApplicationPageState extends State<AllApplicationPage> {
color: Color(0xFF666666),
),
10.wb,
'搜索商品、活动、帖子、应用'
.text
.size(28.sp)
.color(ktextSubColor)
.make()
.expand(),
'搜索应用'.text.size(28.sp).color(ktextSubColor).make().expand(),
],
),
),

@ -2,9 +2,11 @@ import 'package:flutter/material.dart';
import 'package:flutter_easyrefresh/easy_refresh.dart';
import 'package:get/get.dart';
import 'package:waterfall_flow/waterfall_flow.dart';
import 'package:aku_community/ui/market/goods/goods_card.dart';
import 'package:aku_community/ui/market/goods/goods_list_view.dart';
import 'package:aku_community/utils/headers.dart';
import 'package:aku_community/widget/bee_scaffold.dart';
@Deprecated('NO NEED THIS CLASS IN FUTURE')
class MarketData {
@ -57,9 +59,7 @@ class MockableMarketWidget extends StatelessWidget {
),
onPressed: () {
Get.to(
() => BeeScaffold(
title: data.name,
),
() => GoodsListView(),
);
},
);
@ -80,7 +80,21 @@ class _MockableMarketListState extends State<MockableMarketList> {
return EasyRefresh(
header: MaterialHeader(completeDuration: Duration(milliseconds: 300)),
onRefresh: () async {},
child: ListView(),
child: WaterfallFlow(
padding: EdgeInsets.all(32.w),
gridDelegate: SliverWaterfallFlowDelegateWithFixedCrossAxisCount(
crossAxisCount: 2,
mainAxisSpacing: 20.w,
crossAxisSpacing: 20.w,
),
children: [
GoodsCard(),
GoodsCard(),
GoodsCard(),
GoodsCard(),
GoodsCard(),
],
),
);
}
}

@ -0,0 +1,69 @@
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:aku_community/utils/headers.dart';
import 'package:aku_community/widget/bee_scaffold.dart';
class CategoryPage extends StatefulWidget {
CategoryPage({Key? key}) : super(key: key);
@override
_CategoryPageState createState() => _CategoryPageState();
}
class _CategoryPageState extends State<CategoryPage> {
int _index = 0;
@override
Widget build(BuildContext context) {
return BeeScaffold(
title: '分类',
actions: [
IconButton(
icon: Icon(CupertinoIcons.search),
onPressed: () {},
),
],
bgColor: Colors.white,
appBarBottom: PreferredSize(
child: Divider(height: 1),
preferredSize: Size.fromHeight(1),
),
body: Row(
children: [
SizedBox(
width: 203.w,
child: ListView.builder(
itemBuilder: (context, index) {
bool sameIndex = index == _index;
return Stack(
children: [
MaterialButton(
height: 100.w,
minWidth: double.infinity,
onPressed: () {
_index = index;
setState(() {});
},
child: Text(
'TEST',
style: TextStyle(),
),
),
],
);
},
itemCount: 10,
),
),
VerticalDivider(
color: Color(0xFFE8E8E8),
width: 1,
thickness: 1,
),
],
),
);
}
}

@ -0,0 +1,93 @@
import 'package:flutter/material.dart';
import 'package:aku_community/base/base_style.dart';
import 'package:aku_community/utils/headers.dart';
class GoodsCard extends StatelessWidget {
const GoodsCard({Key? key}) : super(key: key);
@override
Widget build(BuildContext context) {
return MaterialButton(
color: Colors.white,
elevation: 0,
padding: EdgeInsets.zero,
onPressed: () {},
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
AspectRatio(
aspectRatio: 1,
child: Stack(
children: [
Image.asset(
R.ASSETS_IMAGES_PLACEHOLDER_WEBP,
fit: BoxFit.cover,
),
Positioned(
left: 0,
right: 0,
bottom: 0,
child: Container(
height: 38.w,
color: Colors.black54,
alignment: Alignment.centerLeft,
padding: EdgeInsets.symmetric(horizontal: 12.w),
child: Text(
'分别是紫色烦恼则妇女色泽封闭周四鹅u部分紫色部分',
overflow: TextOverflow.ellipsis,
style: TextStyle(
color: Colors.white,
fontSize: 18.sp,
),
),
),
),
],
),
),
Padding(
padding: EdgeInsets.symmetric(
horizontal: 12.w,
vertical: 20.w,
),
child: Text(
'袁隆平水稻大米精选 56kg唇齿流香 无常有机稻花 无常有机稻花',
maxLines: 2,
overflow: TextOverflow.ellipsis,
style: TextStyle(
fontSize: 24.sp,
),
),
),
Padding(
padding: EdgeInsets.symmetric(
horizontal: 12.w,
),
child: RichText(
text: TextSpan(
children: [
TextSpan(
text: '¥123.45 ',
style: TextStyle(
color: Colors.red,
fontSize: 28.sp,
),
),
TextSpan(
text: '123已付款',
style: TextStyle(
color: ktextSubColor,
fontSize: 20.sp,
),
),
],
),
),
),
16.hb,
],
),
);
}
}

@ -0,0 +1,88 @@
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:waterfall_flow/waterfall_flow.dart';
import 'package:aku_community/ui/market/goods/goods_card.dart';
import 'package:aku_community/utils/headers.dart';
import 'package:aku_community/widget/bee_scaffold.dart';
class GoodsListView extends StatefulWidget {
GoodsListView({Key? key}) : super(key: key);
@override
_GoodsListViewState createState() => _GoodsListViewState();
}
class _GoodsListViewState extends State<GoodsListView> {
@override
Widget build(BuildContext context) {
return BeeScaffold(
title: 'TEST',
actions: [
IconButton(
icon: Icon(CupertinoIcons.search),
onPressed: () {},
)
],
appBarBottom: PreferredSize(
child: SizedBox(
height: 220.w,
child: ListView(
padding: EdgeInsets.symmetric(horizontal: 18.w),
scrollDirection: Axis.horizontal,
children: [
GoodsSubTypeButton(),
],
),
),
preferredSize: Size.fromHeight(220.w),
),
body: WaterfallFlow(
padding: EdgeInsets.all(32.w),
gridDelegate: SliverWaterfallFlowDelegateWithFixedCrossAxisCount(
crossAxisCount: 2,
mainAxisSpacing: 20.w,
crossAxisSpacing: 20.w,
),
children: [
GoodsCard(),
GoodsCard(),
GoodsCard(),
GoodsCard(),
GoodsCard(),
],
),
);
}
}
class GoodsSubTypeButton extends StatelessWidget {
const GoodsSubTypeButton({Key? key}) : super(key: key);
@override
Widget build(BuildContext context) {
return MaterialButton(
minWidth: 136.w,
padding: EdgeInsets.zero,
onPressed: () {},
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: [
Image.asset(
R.ASSETS_IMAGES_PLACEHOLDER_WEBP,
width: 100.w,
height: 100.w,
),
20.hb,
Text(
'健康运动',
style: TextStyle(
fontSize: 24.sp,
),
),
],
),
);
}
}

@ -1,8 +1,11 @@
import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:get/get.dart';
import 'package:aku_community/ui/market/_market_data.dart';
import 'package:aku_community/ui/market/category/category_page.dart';
import 'package:aku_community/utils/headers.dart';
import 'package:aku_community/widget/bee_scaffold.dart';
import 'package:aku_community/widget/tab_bar/bee_tab_bar.dart';
@ -28,6 +31,26 @@ class _MarketPageState extends State<MarketPage>
final mediaWidth = MediaQuery.of(context).size.width;
return BeeScaffold(
title: '商城',
actions: [
MaterialButton(
minWidth: 108.w,
padding: EdgeInsets.zero,
onPressed: () => Get.to(() => CategoryPage()),
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
mainAxisSize: MainAxisSize.max,
children: [
Icon(
Icons.grid_view,
color: Color(0xFF333333),
size: 48.w,
),
4.hb,
'分类'.text.size(20.sp).black.make(),
],
),
),
],
body: NestedScrollView(
headerSliverBuilder: (context, value) {
return [
@ -37,6 +60,7 @@ class _MarketPageState extends State<MarketPage>
// flexibleSpace ( - )/4*2 + + bottom
expandedHeight: (mediaWidth - 32.w * 2) / 4 * 2 + 16.w * 2 + 48,
backgroundColor: Colors.transparent,
elevation: 0,
flexibleSpace: FlexibleSpaceBar(
background: Container(
color: Color(0xFFF9F9F9),

@ -83,7 +83,7 @@ class _BeeSearchState extends State<BeeSearch> {
contentPadding:
EdgeInsets.symmetric(vertical: 10.w, horizontal: 10.w),
border: InputBorder.none,
hintText: '搜索商品、活动、帖子、应用',
hintText: '搜索应用',
hintStyle: TextStyle(
color: Color(0xFF999999),
fontSize: 28.sp,

@ -2,7 +2,9 @@ import 'dart:convert';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:get/get.dart';
import 'package:aku_community/utils/headers.dart';
class MessageParser {
@ -11,6 +13,7 @@ class MessageParser {
String type = '0';
MessageParser(rawMessage) : message = Map<String, dynamic>.from(rawMessage);
//TODO AndroidiOS
Future shot() async {
///
subTitle = message['alert'];

@ -14,7 +14,7 @@ class BeeDivider extends StatelessWidget {
this.indent,
this.endIndent,
this.color,
this.isHorizontal =true})
this.isHorizontal = true})
: super(key: key);
BeeDivider.horizontal({
Key? key,

@ -1,8 +1,6 @@
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
import 'package:velocity_x/velocity_x.dart';
import 'package:aku_community/constants/app_theme.dart';
import 'package:aku_community/widget/bee_back_button.dart';
@ -51,13 +49,20 @@ class BeeScaffold extends StatelessWidget {
}) : this.bodyColor = Colors.white,
super(key: key);
Widget? get _titleWidget {
if (title == null) return null;
if (title is String) return Text(title!);
if (title is Widget) return title as Widget;
return null;
}
@override
Widget build(BuildContext context) {
Widget? appBar;
if (title != null)
appBar = AppBar(
backgroundColor: bgColor,
title: title!.text.make(),
title: _titleWidget,
leading: leading ?? BeeBackButton(),
actions: actions,
bottom: appBarBottom,

@ -10,11 +10,14 @@ class BeeDatePicker {
static Future<DateTime?> pick(
DateTime initDate, {
CupertinoDatePickerMode mode = CupertinoDatePickerMode.date,
DateTime? min,
DateTime? max,
}) async {
return await Get.bottomSheet(_BeeDatePicker(
date: initDate,
mode: mode,
min: DateTime.now().subtract(Duration(days: 1)),
min: min ?? DateTime.now().subtract(Duration(days: 1)),
max: max,
));
}

@ -1,4 +1,6 @@
PODS:
- device_info_plus_macos (0.0.1):
- FlutterMacOS
- Firebase/CoreOnly (7.11.0):
- FirebaseCore (= 7.11.0)
- Firebase/Crashlytics (7.11.0):
@ -50,6 +52,8 @@ PODS:
- nanopb/encode (2.30908.0)
- package_info (0.0.1):
- FlutterMacOS
- package_info_plus_macos (0.0.1):
- FlutterMacOS
- path_provider_macos (0.0.1):
- FlutterMacOS
- PromisesObjC (1.2.12)
@ -59,10 +63,12 @@ PODS:
- FlutterMacOS
DEPENDENCIES:
- device_info_plus_macos (from `Flutter/ephemeral/.symlinks/plugins/device_info_plus_macos/macos`)
- firebase_core (from `Flutter/ephemeral/.symlinks/plugins/firebase_core/macos`)
- firebase_crashlytics (from `Flutter/ephemeral/.symlinks/plugins/firebase_crashlytics/macos`)
- FlutterMacOS (from `Flutter/ephemeral`)
- package_info (from `Flutter/ephemeral/.symlinks/plugins/package_info/macos`)
- package_info_plus_macos (from `Flutter/ephemeral/.symlinks/plugins/package_info_plus_macos/macos`)
- path_provider_macos (from `Flutter/ephemeral/.symlinks/plugins/path_provider_macos/macos`)
- shared_preferences_macos (from `Flutter/ephemeral/.symlinks/plugins/shared_preferences_macos/macos`)
- url_launcher_macos (from `Flutter/ephemeral/.symlinks/plugins/url_launcher_macos/macos`)
@ -80,6 +86,8 @@ SPEC REPOS:
- PromisesObjC
EXTERNAL SOURCES:
device_info_plus_macos:
:path: Flutter/ephemeral/.symlinks/plugins/device_info_plus_macos/macos
firebase_core:
:path: Flutter/ephemeral/.symlinks/plugins/firebase_core/macos
firebase_crashlytics:
@ -88,6 +96,8 @@ EXTERNAL SOURCES:
:path: Flutter/ephemeral
package_info:
:path: Flutter/ephemeral/.symlinks/plugins/package_info/macos
package_info_plus_macos:
:path: Flutter/ephemeral/.symlinks/plugins/package_info_plus_macos/macos
path_provider_macos:
:path: Flutter/ephemeral/.symlinks/plugins/path_provider_macos/macos
shared_preferences_macos:
@ -96,6 +106,7 @@ EXTERNAL SOURCES:
:path: Flutter/ephemeral/.symlinks/plugins/url_launcher_macos/macos
SPEC CHECKSUMS:
device_info_plus_macos: 1ad388a1ef433505c4038e7dd9605aadd1e2e9c7
Firebase: c121feb35e4126c0b355e3313fa9b487d47319fd
firebase_core: 9e45a9c5ba9dbcb8973b3a68e6ff43ecf2dcf206
firebase_crashlytics: 4ab08e6b22a4f6ec909cc1f0a046eac2d1b2925c
@ -108,6 +119,7 @@ SPEC CHECKSUMS:
GoogleUtilities: 284cddc7fffc14ae1907efb6f78ab95c1fccaedc
nanopb: a0ba3315591a9ae0a16a309ee504766e90db0c96
package_info: 6eba2fd8d3371dda2d85c8db6fe97488f24b74b2
package_info_plus_macos: f010621b07802a241d96d01876d6705f15e77c1c
path_provider_macos: a0a3fd666cb7cd0448e936fb4abad4052961002b
PromisesObjC: 3113f7f76903778cf4a0586bd1ab89329a0b7b97
shared_preferences_macos: 480ce071d0666e37cef23fe6c702293a3d21799e

@ -302,6 +302,13 @@ packages:
url: "https://pub.flutter-io.cn"
source: hosted
version: "4.0.0"
extended_list_library:
dependency: transitive
description:
name: extended_list_library
url: "https://pub.flutter-io.cn"
source: hosted
version: "3.0.0"
fake_async:
dependency: transitive
description:
@ -851,6 +858,13 @@ packages:
url: "https://pub.flutter-io.cn"
source: hosted
version: "2.0.0"
qr_code_scanner:
dependency: "direct main"
description:
name: qr_code_scanner
url: "https://pub.flutter-io.cn"
source: hosted
version: "0.4.0"
qr_flutter:
dependency: "direct main"
description:
@ -1124,6 +1138,13 @@ packages:
url: "https://pub.flutter-io.cn"
source: hosted
version: "1.0.0"
waterfall_flow:
dependency: "direct main"
description:
name: waterfall_flow
url: "https://pub.flutter-io.cn"
source: hosted
version: "3.0.1"
web_socket_channel:
dependency: transitive
description:

@ -66,6 +66,8 @@ dependencies:
share: ^2.0.1
collection: ^1.15.0
json_annotation: ^4.0.1
waterfall_flow: ^3.0.1
qr_code_scanner: ^0.4.0
dev_dependencies:
flutter_test:

@ -13,6 +13,8 @@ buildApk() async {
'build',
'apk',
'--target-platform=android-arm64',
'--dart-define',
'BUILD_TYPE=PRODUCT',
],
);
}
@ -24,6 +26,8 @@ buildIos() async {
arguments: [
'build',
'ios',
'--dart-define',
'BUILD_TYPE=PRODUCT',
],
);
}

Loading…
Cancel
Save