|
|
@ -1,15 +1,13 @@
|
|
|
|
|
|
|
|
|
|
|
|
import 'package:flutter/material.dart';
|
|
|
|
import 'package:flutter/material.dart';
|
|
|
|
import 'package:flutter_easyrefresh/easy_refresh.dart';
|
|
|
|
import 'package:flutter_easyrefresh/easy_refresh.dart';
|
|
|
|
import 'package:project_telephony/base/base_style.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/ui/widget/plone_back_button.dart';
|
|
|
|
import 'package:project_telephony/utils/headers.dart';
|
|
|
|
import 'package:project_telephony/utils/headers.dart';
|
|
|
|
|
|
|
|
|
|
|
|
import 'package:tab_indicator_styler/tab_indicator_styler.dart';
|
|
|
|
import 'package:tab_indicator_styler/tab_indicator_styler.dart';
|
|
|
|
|
|
|
|
|
|
|
|
import 'answer_idle.dart';
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
class ContentConnectPage extends StatefulWidget {
|
|
|
|
class ContentConnectPage extends StatefulWidget {
|
|
|
|
const ContentConnectPage({Key? key}) : super(key: key);
|
|
|
|
const ContentConnectPage({Key? key}) : super(key: key);
|
|
|
|
|
|
|
|
|
|
|
@ -27,7 +25,11 @@ class _ContentConnectPageState extends State<ContentConnectPage>
|
|
|
|
|
|
|
|
|
|
|
|
@override
|
|
|
|
@override
|
|
|
|
void initState() {
|
|
|
|
void initState() {
|
|
|
|
_tabController = TabController(length: 2, initialIndex: 0, vsync: this);
|
|
|
|
_tabController = TabController(
|
|
|
|
|
|
|
|
length: 2,
|
|
|
|
|
|
|
|
initialIndex: 0,
|
|
|
|
|
|
|
|
vsync: this,
|
|
|
|
|
|
|
|
);
|
|
|
|
super.initState();
|
|
|
|
super.initState();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
@ -43,70 +45,81 @@ class _ContentConnectPageState extends State<ContentConnectPage>
|
|
|
|
Widget build(BuildContext context) {
|
|
|
|
Widget build(BuildContext context) {
|
|
|
|
super.build(context);
|
|
|
|
super.build(context);
|
|
|
|
return Scaffold(
|
|
|
|
return Scaffold(
|
|
|
|
appBar: AppBar(
|
|
|
|
appBar: AppBar(
|
|
|
|
elevation: 0,
|
|
|
|
elevation: 0,
|
|
|
|
title: Text(
|
|
|
|
title: Text(
|
|
|
|
'选择短信内容',
|
|
|
|
'选择短信内容',
|
|
|
|
style: Theme.of(context).textTheme.headline6,
|
|
|
|
style: Theme.of(context).textTheme.headline6,
|
|
|
|
),
|
|
|
|
|
|
|
|
leading: const CloudBackButton(isSpecial: true),
|
|
|
|
|
|
|
|
backgroundColor: kForeGroundColor,
|
|
|
|
|
|
|
|
),
|
|
|
|
),
|
|
|
|
backgroundColor: Colors.white,
|
|
|
|
leading: const CloudBackButton(isSpecial: true),
|
|
|
|
body: Column(
|
|
|
|
backgroundColor: kForeGroundColor,
|
|
|
|
children: [
|
|
|
|
),
|
|
|
|
Container(
|
|
|
|
backgroundColor: Colors.white,
|
|
|
|
width:double.infinity,
|
|
|
|
body: Column(
|
|
|
|
height: 88.w,
|
|
|
|
children: [
|
|
|
|
margin: EdgeInsets.symmetric(horizontal: 66.w),
|
|
|
|
Container(
|
|
|
|
padding: EdgeInsets.all(8.w),
|
|
|
|
width: double.infinity,
|
|
|
|
decoration:BoxDecoration(color: const Color(0xFFF9F9F9),borderRadius: BorderRadius.all(Radius.circular(44.w))),
|
|
|
|
height: 88.w,
|
|
|
|
child: TabBar(
|
|
|
|
margin: EdgeInsets.symmetric(horizontal: 66.w),
|
|
|
|
// indicator: Decoration(),
|
|
|
|
padding: EdgeInsets.all(8.w),
|
|
|
|
controller: _tabController,
|
|
|
|
decoration: BoxDecoration(
|
|
|
|
labelColor:const Color(0xFF1890FF),
|
|
|
|
color: const Color(0xFFF9F9F9),
|
|
|
|
unselectedLabelColor:const Color(0xFF999999),
|
|
|
|
borderRadius: BorderRadius.all(Radius.circular(44.w))),
|
|
|
|
unselectedLabelStyle:const TextStyle(fontWeight:FontWeight.bold),
|
|
|
|
child: TabBar(
|
|
|
|
labelStyle:const TextStyle(fontWeight:FontWeight.bold),
|
|
|
|
controller: _tabController,
|
|
|
|
onTap: (num) {
|
|
|
|
labelColor: const Color(0xFF1890FF),
|
|
|
|
if(num==0){
|
|
|
|
unselectedLabelColor: const Color(0xFF999999),
|
|
|
|
_answerRefreshController.callRefresh();
|
|
|
|
unselectedLabelStyle:
|
|
|
|
}else{
|
|
|
|
const TextStyle(fontWeight: FontWeight.bold),
|
|
|
|
_wasAnswerRefreshController.callRefresh();
|
|
|
|
labelStyle: const TextStyle(fontWeight: FontWeight.bold),
|
|
|
|
}
|
|
|
|
onTap: (num) {
|
|
|
|
},
|
|
|
|
if (num == 0) {
|
|
|
|
indicator: RectangularIndicator(
|
|
|
|
_answerRefreshController.callRefresh();
|
|
|
|
color: Colors.white,
|
|
|
|
} else {
|
|
|
|
bottomLeftRadius: 44.w,
|
|
|
|
_wasAnswerRefreshController.callRefresh();
|
|
|
|
bottomRightRadius: 44.w,
|
|
|
|
}
|
|
|
|
topLeftRadius: 44.w,
|
|
|
|
},
|
|
|
|
topRightRadius: 44.w,
|
|
|
|
indicator: RectangularIndicator(
|
|
|
|
// paintingStyle: PaintingStyle.fill,
|
|
|
|
color: Colors.white,
|
|
|
|
),
|
|
|
|
bottomLeftRadius: 44.w,
|
|
|
|
// indicatorSize: TabBarIndicatorSize.label,
|
|
|
|
bottomRightRadius: 44.w,
|
|
|
|
// isScrollable: true,
|
|
|
|
topLeftRadius: 44.w,
|
|
|
|
tabs: const [
|
|
|
|
topRightRadius: 44.w,
|
|
|
|
// _tab(0, "被叫接听"),_tab(1, "主叫接听"),
|
|
|
|
// paintingStyle: PaintingStyle.fill,
|
|
|
|
Tab(text: "被叫接听",),Tab(text: "主叫接听",)
|
|
|
|
),
|
|
|
|
|
|
|
|
tabs: const [
|
|
|
|
]),
|
|
|
|
Tab(
|
|
|
|
|
|
|
|
text: "被叫接听",
|
|
|
|
|
|
|
|
),
|
|
|
|
|
|
|
|
Tab(
|
|
|
|
|
|
|
|
text: "主叫接听",
|
|
|
|
|
|
|
|
),
|
|
|
|
|
|
|
|
],
|
|
|
|
|
|
|
|
),
|
|
|
|
|
|
|
|
),
|
|
|
|
|
|
|
|
Expanded(
|
|
|
|
|
|
|
|
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),
|
|
|
|
|
|
|
|
),
|
|
|
|
|
|
|
|
],
|
|
|
|
),
|
|
|
|
),
|
|
|
|
Expanded(
|
|
|
|
),
|
|
|
|
child: TabBarView(controller: _tabController, children: [
|
|
|
|
],
|
|
|
|
// _getBox(),
|
|
|
|
),
|
|
|
|
AnswerIdleList(
|
|
|
|
);
|
|
|
|
// contant: const [],
|
|
|
|
|
|
|
|
refreshController: _answerRefreshController, isIdle: false,
|
|
|
|
|
|
|
|
),
|
|
|
|
|
|
|
|
AnswerIdleList(
|
|
|
|
|
|
|
|
// contant: const [],
|
|
|
|
|
|
|
|
refreshController: _wasAnswerRefreshController, isIdle: true,
|
|
|
|
|
|
|
|
)
|
|
|
|
|
|
|
|
]))
|
|
|
|
|
|
|
|
],
|
|
|
|
|
|
|
|
));
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@override
|
|
|
|
@override
|
|
|
|