|
@@ -1,7 +1,3 @@
|
|
-import 'package:cpt_property/modules/ioan/page/property_ioan_page.dart';
|
|
|
|
-import 'package:cpt_property/modules/news/page/property_news_page.dart';
|
|
|
|
-import 'package:cpt_property/modules/rent/page/property_rent_page.dart';
|
|
|
|
-import 'package:cpt_property/modules/sale/page/property_sale_page.dart';
|
|
|
|
import 'package:flutter/material.dart';
|
|
import 'package:flutter/material.dart';
|
|
import 'package:auto_route/auto_route.dart';
|
|
import 'package:auto_route/auto_route.dart';
|
|
import 'package:hooks_riverpod/hooks_riverpod.dart';
|
|
import 'package:hooks_riverpod/hooks_riverpod.dart';
|
|
@@ -26,8 +22,6 @@ class PropertyPage extends HookConsumerWidget {
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
-
|
|
|
|
-
|
|
|
|
// 顶部tab 切换
|
|
// 顶部tab 切换
|
|
Widget _buildTopSection(BuildContext context, WidgetRef ref, _vm) {
|
|
Widget _buildTopSection(BuildContext context, WidgetRef ref, _vm) {
|
|
final topSectionsData = _vm.topSectionsData;
|
|
final topSectionsData = _vm.topSectionsData;
|
|
@@ -42,48 +36,36 @@ class PropertyPage extends HookConsumerWidget {
|
|
return Container(
|
|
return Container(
|
|
child: Column(
|
|
child: Column(
|
|
children: [
|
|
children: [
|
|
- MyAssetImage(item['icon'], width: 70, height: 70,).onTap((){
|
|
|
|
- Log.d("fdjskfds${item['title']}");
|
|
|
|
|
|
+ MyAssetImage(
|
|
|
|
+ item['icon'],
|
|
|
|
+ width: 70,
|
|
|
|
+ height: 70,
|
|
|
|
+ ).onTap(
|
|
|
|
+ () {
|
|
_vm.switchPage(index, context);
|
|
_vm.switchPage(index, context);
|
|
- switch(index){
|
|
|
|
- case 0:
|
|
|
|
- PropertySalePage.startInstance(context: context);
|
|
|
|
- break;
|
|
|
|
- case 1:
|
|
|
|
- PropertyRentPage.startInstance(context: context);
|
|
|
|
- break;
|
|
|
|
- case 2:
|
|
|
|
- PropertyIoanPage.startInstance(context: context);
|
|
|
|
- break;
|
|
|
|
- case 3:
|
|
|
|
- PropertyNewsPage.startInstance(context: context);
|
|
|
|
- break;
|
|
|
|
- }
|
|
|
|
},
|
|
},
|
|
type: ClickType.throttle,
|
|
type: ClickType.throttle,
|
|
),
|
|
),
|
|
TextButton(
|
|
TextButton(
|
|
onPressed: () {
|
|
onPressed: () {
|
|
- // _vm.selectTab(index);
|
|
|
|
},
|
|
},
|
|
child: Text(item['title']),
|
|
child: Text(item['title']),
|
|
),
|
|
),
|
|
],
|
|
],
|
|
),
|
|
),
|
|
- ).marginOnly(left:18,right:18,top: 10,bottom: 10);
|
|
|
|
|
|
+ ).marginOnly(left: 18, right: 18, top: 10, bottom: 10);
|
|
}),
|
|
}),
|
|
),
|
|
),
|
|
),
|
|
),
|
|
);
|
|
);
|
|
}
|
|
}
|
|
|
|
|
|
-
|
|
|
|
@override
|
|
@override
|
|
Widget build(BuildContext context, WidgetRef ref) {
|
|
Widget build(BuildContext context, WidgetRef ref) {
|
|
final _vm = ref.read(propertyVmProvider.notifier);
|
|
final _vm = ref.read(propertyVmProvider.notifier);
|
|
return DefaultTabController(
|
|
return DefaultTabController(
|
|
- length: 4,
|
|
|
|
- child: Scaffold(
|
|
|
|
|
|
+ length: 4,
|
|
|
|
+ child: Scaffold(
|
|
appBar: AppBar(
|
|
appBar: AppBar(
|
|
title: Text("Property"),
|
|
title: Text("Property"),
|
|
bottomOpacity: 0.0, // 取消下横线
|
|
bottomOpacity: 0.0, // 取消下横线
|
|
@@ -102,8 +84,7 @@ class PropertyPage extends HookConsumerWidget {
|
|
),
|
|
),
|
|
)
|
|
)
|
|
],
|
|
],
|
|
- )
|
|
|
|
- ),
|
|
|
|
|
|
+ )),
|
|
);
|
|
);
|
|
}
|
|
}
|
|
}
|
|
}
|