Merge pull request #13 from FRE-Informatica/fd-604
FD-604/FIX: Pessoas na Propriedade
This commit is contained in:
commit
70670ee816
|
@ -1,8 +1,11 @@
|
||||||
|
import 'dart:developer';
|
||||||
|
|
||||||
import 'package:hub/backend/api_requests/api_calls.dart';
|
import 'package:hub/backend/api_requests/api_calls.dart';
|
||||||
|
|
||||||
import 'package:hub/flutter_flow/flutter_flow_icon_button.dart';
|
import 'package:hub/flutter_flow/flutter_flow_icon_button.dart';
|
||||||
import 'package:hub/flutter_flow/flutter_flow_theme.dart';
|
import 'package:hub/flutter_flow/flutter_flow_theme.dart';
|
||||||
import 'package:hub/flutter_flow/flutter_flow_util.dart';
|
import 'package:hub/flutter_flow/flutter_flow_util.dart';
|
||||||
|
import 'package:hub/flutter_flow/internationalization.dart';
|
||||||
import 'package:hub/flutter_flow/nav/nav.dart';
|
import 'package:hub/flutter_flow/nav/nav.dart';
|
||||||
import 'package:hub/pages/people_on_the_property_page/people_on_the_property_page_model.dart';
|
import 'package:hub/pages/people_on_the_property_page/people_on_the_property_page_model.dart';
|
||||||
|
|
||||||
|
@ -13,6 +16,9 @@ import 'package:flutter_spinkit/flutter_spinkit.dart';
|
||||||
import 'package:google_fonts/google_fonts.dart';
|
import 'package:google_fonts/google_fonts.dart';
|
||||||
import 'package:provider/provider.dart';
|
import 'package:provider/provider.dart';
|
||||||
|
|
||||||
|
import '../../shared/utils/dialog_util.dart';
|
||||||
|
import '../../shared/utils/log_util.dart';
|
||||||
|
|
||||||
|
|
||||||
class PeopleOnThePropertyPageWidget extends StatefulWidget {
|
class PeopleOnThePropertyPageWidget extends StatefulWidget {
|
||||||
const PeopleOnThePropertyPageWidget({super.key});
|
const PeopleOnThePropertyPageWidget({super.key});
|
||||||
|
@ -106,9 +112,30 @@ class _PeopleOnThePropertyPageWidgetState
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (snapshot.hasError || snapshot.data?.exception != null) {
|
||||||
|
if (snapshot.error != null && snapshot.stackTrace != null) {
|
||||||
|
LogUtil.requestAPIFailed('getPessoasLocal.php', "", 'Busca Pessoas no Local', snapshot.error, snapshot.stackTrace!);
|
||||||
|
}
|
||||||
|
|
||||||
|
return Center(
|
||||||
|
child: SizedBox(
|
||||||
|
width: double.infinity,
|
||||||
|
height: 100,
|
||||||
|
child: Text(
|
||||||
|
FFLocalizations.of(context).getVariableText(
|
||||||
|
ptText: "Pessoas não encontradas",
|
||||||
|
enText: "Persons not found"
|
||||||
|
),
|
||||||
|
textAlign: TextAlign.center,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
final columnGetPessoasLocalResponse = snapshot.data!;
|
final columnGetPessoasLocalResponse = snapshot.data!;
|
||||||
final getPoepleProperty = PhpGroup.getPessoasLocalCall.pessoas(columnGetPessoasLocalResponse.jsonBody,)?.toList() ??
|
final getPoepleProperty = PhpGroup.getPessoasLocalCall.pessoas(columnGetPessoasLocalResponse.jsonBody,)?.toList() ?? [];
|
||||||
[];
|
|
||||||
return ListView.builder(
|
return ListView.builder(
|
||||||
physics: const AlwaysScrollableScrollPhysics(),
|
physics: const AlwaysScrollableScrollPhysics(),
|
||||||
shrinkWrap: true,
|
shrinkWrap: true,
|
||||||
|
|
Loading…
Reference in New Issue