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