Remoção de lixo de código

This commit is contained in:
Lucas 2024-08-12 17:32:07 -03:00
parent 4d45de2890
commit 61e23044d9
1 changed files with 2 additions and 23 deletions

View File

@ -62,8 +62,6 @@ class _AcessHistoryPageWidgetState extends State<AcessHistoryPageWidget> {
bool _loading = false;
String _personType = '.*';
String _accessType = '.*';
String _search = '.*';
late Future<void> _accessFuture;
List<dynamic> _accessWrap = [];
@ -84,13 +82,6 @@ class _AcessHistoryPageWidgetState extends State<AcessHistoryPageWidget> {
if (_scrollController.position.atEdge &&
_scrollController.position.pixels != 0) {
_loadMoreAccess();
WidgetsBinding.instance.addPostFrameCallback((_) {
Timer(const Duration(seconds: 3), () {
if (!_hasData && _pageNumber > 1) {
_showNoMoreDataSnackbar(context);
}
});
});
}
});
}
@ -176,9 +167,6 @@ class _AcessHistoryPageWidgetState extends State<AcessHistoryPageWidget> {
child: GestureDetector(
onTap: () {},
child: OptModalWidget(
defaultAccessType:
selectedTypeSubject.value['accessType'] ??
'.*',
defaultPersonType:
selectedTypeSubject.value['personType'] ??
'.*',
@ -235,14 +223,7 @@ class _AcessHistoryPageWidgetState extends State<AcessHistoryPageWidget> {
List<dynamic> filteredAccess = accessHistory.where((item) {
final personTypeMatches =
_personType == '.*' || item["PES_TIPO"].toString() == _personType;
final accessTypeMatches =
_accessType == '.*' || item["ACE_TIPO"].toString() == _accessType;
final searchMatches = _search == '.*' ||
item["PES_NOME"]
.toString()
.toLowerCase()
.contains(_search.toLowerCase());
return personTypeMatches && accessTypeMatches && searchMatches;
return personTypeMatches;
}).toList();
if (filteredAccess != null && filteredAccess.isNotEmpty) {
@ -253,7 +234,7 @@ class _AcessHistoryPageWidgetState extends State<AcessHistoryPageWidget> {
});
return response;
}
_showNoMoreDataSnackbar(context);
setState(() {
_hasData = false;
_loading = false;
@ -327,8 +308,6 @@ class _AcessHistoryPageWidgetState extends State<AcessHistoryPageWidget> {
void fetchCardListViewService(Map<String, String> select) {
_personType = select['personType']!;
_accessType = select['accessType']!;
_search = select['search']!;
_accessWrap = [];
_pageNumber = 1;
_accessFuture = fetchAccessHistoryService();