update category page

hmxc
小赖 4 years ago
parent a3948cf540
commit a1715ffc17

@ -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);
};
}

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

@ -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))

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

@ -0,0 +1,61 @@
import 'package:aku_community/widget/bee_scaffold.dart';
import 'package:flutter/material.dart';
import 'package:aku_community/utils/headers.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: '',
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,
),
],
),
);
}
}

@ -1,3 +1,4 @@
import 'package:aku_community/ui/market/category/category_page.dart';
import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
@ -5,6 +6,8 @@ import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:aku_community/ui/market/_market_data.dart';
import 'package:aku_community/widget/bee_scaffold.dart';
import 'package:aku_community/widget/tab_bar/bee_tab_bar.dart';
import 'package:aku_community/utils/headers.dart';
import 'package:get/get.dart';
class MarketPage extends StatefulWidget {
MarketPage({Key? key}) : super(key: key);
@ -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,

Loading…
Cancel
Save