|
|
@ -2,7 +2,7 @@ import 'package:call_log/call_log.dart';
|
|
|
|
import 'package:flutter/material.dart';
|
|
|
|
import 'package:flutter/material.dart';
|
|
|
|
import 'package:project_telephony/ui/widget/plone_bottom.dart';
|
|
|
|
import 'package:project_telephony/ui/widget/plone_bottom.dart';
|
|
|
|
import 'package:project_telephony/utils/headers.dart';
|
|
|
|
import 'package:project_telephony/utils/headers.dart';
|
|
|
|
import 'package:velocity_x/velocity_x.dart';
|
|
|
|
import 'package:flutter_easyrefresh/easy_refresh.dart';
|
|
|
|
|
|
|
|
|
|
|
|
import '../../../../model/phone_num_model.dart';
|
|
|
|
import '../../../../model/phone_num_model.dart';
|
|
|
|
|
|
|
|
|
|
|
@ -15,35 +15,52 @@ class CallRecordsList extends StatefulWidget {
|
|
|
|
|
|
|
|
|
|
|
|
class _CallRecordsListState extends State<CallRecordsList> {
|
|
|
|
class _CallRecordsListState extends State<CallRecordsList> {
|
|
|
|
List<PhoneNumModel> phoneNum = [];
|
|
|
|
List<PhoneNumModel> phoneNum = [];
|
|
|
|
|
|
|
|
final EasyRefreshController _easyRefreshController = EasyRefreshController();
|
|
|
|
List a = [];
|
|
|
|
List a = [];
|
|
|
|
int b = 0;
|
|
|
|
int b = 0;
|
|
|
|
|
|
|
|
|
|
|
|
@override
|
|
|
|
@override
|
|
|
|
Widget build(BuildContext context) {
|
|
|
|
void dispose() {
|
|
|
|
return Column(
|
|
|
|
_easyRefreshController.dispose();
|
|
|
|
children: [
|
|
|
|
super.dispose();
|
|
|
|
Container(
|
|
|
|
}
|
|
|
|
width: 750.w,
|
|
|
|
|
|
|
|
height: 1000.w,
|
|
|
|
|
|
|
|
child: Text("")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// ListView(
|
|
|
|
@override
|
|
|
|
// children: [],
|
|
|
|
Widget build(BuildContext context) {
|
|
|
|
|
|
|
|
return
|
|
|
|
|
|
|
|
Expanded(
|
|
|
|
|
|
|
|
child: EasyRefresh(
|
|
|
|
|
|
|
|
firstRefresh: true,
|
|
|
|
|
|
|
|
header: MaterialHeader(),
|
|
|
|
|
|
|
|
onRefresh: () async {},
|
|
|
|
|
|
|
|
child: ListView.builder(itemBuilder: (context, index) {
|
|
|
|
|
|
|
|
return _getBox(phoneNum[index]);
|
|
|
|
|
|
|
|
}),
|
|
|
|
|
|
|
|
));
|
|
|
|
|
|
|
|
// Column(
|
|
|
|
|
|
|
|
// children: [
|
|
|
|
|
|
|
|
// Container(width: 750.w, height: 1000.w, child: Text("")
|
|
|
|
|
|
|
|
//
|
|
|
|
|
|
|
|
// // ListView(
|
|
|
|
|
|
|
|
// // children: [],
|
|
|
|
|
|
|
|
// // ),
|
|
|
|
// ),
|
|
|
|
// ),
|
|
|
|
),
|
|
|
|
// PloneBottom(onTap: () async {
|
|
|
|
PloneBottom(onTap: () async {
|
|
|
|
// // Iterable<CallLogEntry> entries = await CallLog.get();
|
|
|
|
// Iterable<CallLogEntry> entries = await CallLog.get();
|
|
|
|
// final Iterable<CallLogEntry> entries = await CallLog.query();
|
|
|
|
final Iterable<CallLogEntry> entries = await CallLog.query();
|
|
|
|
// for (CallLogEntry entrie in entries) {
|
|
|
|
|
|
|
|
// a.add(entrie.number);
|
|
|
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
// // var b = entries.length;
|
|
|
|
|
|
|
|
// print("通话记录条数$a");
|
|
|
|
|
|
|
|
// })
|
|
|
|
|
|
|
|
// ],
|
|
|
|
|
|
|
|
// );
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
var b = entries;
|
|
|
|
_getBox(PhoneNumModel item){
|
|
|
|
print("通话记录条数$b");
|
|
|
|
return ListTile(
|
|
|
|
})
|
|
|
|
title: Text(item.num),
|
|
|
|
],
|
|
|
|
|
|
|
|
);
|
|
|
|
);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// _getPhone(){
|
|
|
|
|
|
|
|
// return ListView.builder(itemBuilder: (context,index){},itemCount: ,);
|
|
|
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|