|
|
|
@ -1,15 +1,13 @@
|
|
|
|
|
|
|
|
|
|
import 'package:flutter/material.dart';
|
|
|
|
|
import 'package:flutter_easyrefresh/easy_refresh.dart';
|
|
|
|
|
import 'package:project_telephony/base/base_style.dart';
|
|
|
|
|
import 'package:project_telephony/ui/home/calling_idle_list.dart';
|
|
|
|
|
|
|
|
|
|
import 'package:project_telephony/ui/widget/plone_back_button.dart';
|
|
|
|
|
import 'package:project_telephony/utils/headers.dart';
|
|
|
|
|
|
|
|
|
|
import 'package:tab_indicator_styler/tab_indicator_styler.dart';
|
|
|
|
|
|
|
|
|
|
import 'answer_idle.dart';
|
|
|
|
|
|
|
|
|
|
class ContentConnectPage extends StatefulWidget {
|
|
|
|
|
const ContentConnectPage({Key? key}) : super(key: key);
|
|
|
|
|
|
|
|
|
@ -27,7 +25,11 @@ class _ContentConnectPageState extends State<ContentConnectPage>
|
|
|
|
|
|
|
|
|
|
@override
|
|
|
|
|
void initState() {
|
|
|
|
|
_tabController = TabController(length: 2, initialIndex: 0, vsync: this);
|
|
|
|
|
_tabController = TabController(
|
|
|
|
|
length: 2,
|
|
|
|
|
initialIndex: 0,
|
|
|
|
|
vsync: this,
|
|
|
|
|
);
|
|
|
|
|
super.initState();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -56,22 +58,24 @@ class _ContentConnectPageState extends State<ContentConnectPage>
|
|
|
|
|
body: Column(
|
|
|
|
|
children: [
|
|
|
|
|
Container(
|
|
|
|
|
width:double.infinity,
|
|
|
|
|
width: double.infinity,
|
|
|
|
|
height: 88.w,
|
|
|
|
|
margin: EdgeInsets.symmetric(horizontal: 66.w),
|
|
|
|
|
padding: EdgeInsets.all(8.w),
|
|
|
|
|
decoration:BoxDecoration(color: const Color(0xFFF9F9F9),borderRadius: BorderRadius.all(Radius.circular(44.w))),
|
|
|
|
|
decoration: BoxDecoration(
|
|
|
|
|
color: const Color(0xFFF9F9F9),
|
|
|
|
|
borderRadius: BorderRadius.all(Radius.circular(44.w))),
|
|
|
|
|
child: TabBar(
|
|
|
|
|
// indicator: Decoration(),
|
|
|
|
|
controller: _tabController,
|
|
|
|
|
labelColor:const Color(0xFF1890FF),
|
|
|
|
|
unselectedLabelColor:const Color(0xFF999999),
|
|
|
|
|
unselectedLabelStyle:const TextStyle(fontWeight:FontWeight.bold),
|
|
|
|
|
labelStyle:const TextStyle(fontWeight:FontWeight.bold),
|
|
|
|
|
labelColor: const Color(0xFF1890FF),
|
|
|
|
|
unselectedLabelColor: const Color(0xFF999999),
|
|
|
|
|
unselectedLabelStyle:
|
|
|
|
|
const TextStyle(fontWeight: FontWeight.bold),
|
|
|
|
|
labelStyle: const TextStyle(fontWeight: FontWeight.bold),
|
|
|
|
|
onTap: (num) {
|
|
|
|
|
if(num==0){
|
|
|
|
|
if (num == 0) {
|
|
|
|
|
_answerRefreshController.callRefresh();
|
|
|
|
|
}else{
|
|
|
|
|
} else {
|
|
|
|
|
_wasAnswerRefreshController.callRefresh();
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
@ -83,30 +87,39 @@ class _ContentConnectPageState extends State<ContentConnectPage>
|
|
|
|
|
topRightRadius: 44.w,
|
|
|
|
|
// paintingStyle: PaintingStyle.fill,
|
|
|
|
|
),
|
|
|
|
|
// indicatorSize: TabBarIndicatorSize.label,
|
|
|
|
|
// isScrollable: true,
|
|
|
|
|
tabs: const [
|
|
|
|
|
// _tab(0, "被叫接听"),_tab(1, "主叫接听"),
|
|
|
|
|
Tab(text: "被叫接听",),Tab(text: "主叫接听",)
|
|
|
|
|
|
|
|
|
|
]),
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Tab(
|
|
|
|
|
text: "被叫接听",
|
|
|
|
|
),
|
|
|
|
|
Tab(
|
|
|
|
|
text: "主叫接听",
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
Expanded(
|
|
|
|
|
child: TabBarView(controller: _tabController, children: [
|
|
|
|
|
// _getBox(),
|
|
|
|
|
AnswerIdleList(
|
|
|
|
|
// contant: const [],
|
|
|
|
|
refreshController: _answerRefreshController, isIdle: false,
|
|
|
|
|
child: TabBarView(
|
|
|
|
|
controller: _tabController,
|
|
|
|
|
children: [
|
|
|
|
|
CallingIdleList(
|
|
|
|
|
refreshController: _answerRefreshController,
|
|
|
|
|
title: '朋友给你来电接听后所发送的短信',
|
|
|
|
|
status: 1,
|
|
|
|
|
themeColor: const Color(0xFF1890FF),
|
|
|
|
|
),
|
|
|
|
|
CallingIdleList(
|
|
|
|
|
refreshController: _answerRefreshController,
|
|
|
|
|
isIdle: true,
|
|
|
|
|
title: '您给朋友去电接听后所发送的短信',
|
|
|
|
|
status: 3,
|
|
|
|
|
themeColor: const Color(0xFF1890FF),
|
|
|
|
|
),
|
|
|
|
|
AnswerIdleList(
|
|
|
|
|
// contant: const [],
|
|
|
|
|
refreshController: _wasAnswerRefreshController, isIdle: true,
|
|
|
|
|
)
|
|
|
|
|
]))
|
|
|
|
|
],
|
|
|
|
|
));
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@override
|
|
|
|
|