update drawer and onPeopleInThePropertyWidget
This commit is contained in:
parent
fc782cfd8d
commit
4d5b71e84f
|
@ -44,8 +44,8 @@
|
|||
97C146FB1CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = "<group>"; };
|
||||
97C146FD1CF9000F007C117D /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = "<group>"; };
|
||||
97C147001CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = "<group>"; };
|
||||
6436409A27A31CDE00820AF7 /* pt */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = pt; path = pt.lproj/InfoPlist.strings; sourceTree = "<group>"; };
|
||||
6436409E27A31CD600820AF7 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = "<group>"; };
|
||||
6436409E27A31CD500820AF7 /* pt */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = pt; path = pt.lproj/InfoPlist.strings; sourceTree = "<group>"; };
|
||||
6436409527A31CD900820AF7 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = "<group>"; };
|
||||
97C147021CF9000F007C117D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
|
||||
/* End PBXFileReference section */
|
||||
|
||||
|
@ -225,8 +225,8 @@
|
|||
6436409C27A31CD800820AF7 /* InfoPlist.strings */ = {
|
||||
isa = PBXVariantGroup;
|
||||
children = (
|
||||
6436409A27A31CDE00820AF7 /* pt */,
|
||||
6436409E27A31CD600820AF7 /* en */,
|
||||
6436409E27A31CD500820AF7 /* pt */,
|
||||
6436409527A31CD900820AF7 /* en */,
|
||||
);
|
||||
name = InfoPlist.strings;
|
||||
sourceTree = "<group>";
|
||||
|
|
|
@ -51,7 +51,7 @@ Future repeatVisitScheduleAction(
|
|||
'visitorJsonList': serializeParam(
|
||||
visitorJsonList,
|
||||
ParamType.JSON,
|
||||
true,
|
||||
isList: true,
|
||||
),
|
||||
}.withoutNulls,
|
||||
extra: <String, dynamic>{
|
||||
|
|
|
@ -16,12 +16,14 @@ class ActionStruct extends BaseStruct {
|
|||
String? _title;
|
||||
String get title => _title ?? '';
|
||||
set title(String? val) => _title = val;
|
||||
|
||||
bool hasTitle() => _title != null;
|
||||
|
||||
// "icon" field.
|
||||
String? _icon;
|
||||
String get icon => _icon ?? '';
|
||||
set icon(String? val) => _icon = val;
|
||||
|
||||
bool hasIcon() => _icon != null;
|
||||
|
||||
static ActionStruct fromMap(Map<String, dynamic> data) => ActionStruct(
|
||||
|
|
|
@ -18,18 +18,21 @@ class DeviceStruct extends BaseStruct {
|
|||
String? _devUUID;
|
||||
String get devUUID => _devUUID ?? '';
|
||||
set devUUID(String? val) => _devUUID = val;
|
||||
|
||||
bool hasDevUUID() => _devUUID != null;
|
||||
|
||||
// "version" field.
|
||||
String? _version;
|
||||
String get version => _version ?? '';
|
||||
set version(String? val) => _version = val;
|
||||
|
||||
bool hasVersion() => _version != null;
|
||||
|
||||
// "description" field.
|
||||
String? _description;
|
||||
String get description => _description ?? '';
|
||||
set description(String? val) => _description = val;
|
||||
|
||||
bool hasDescription() => _description != null;
|
||||
|
||||
static DeviceStruct fromMap(Map<String, dynamic> data) => DeviceStruct(
|
||||
|
|
|
@ -890,7 +890,7 @@ class _ViewVisitDetailWidgetState extends State<ViewVisitDetailWidget> {
|
|||
'visitorJsonList': serializeParam(
|
||||
widget.visitorJsonList,
|
||||
ParamType.JSON,
|
||||
true,
|
||||
isList: true,
|
||||
),
|
||||
}.withoutNulls,
|
||||
);
|
||||
|
|
|
@ -95,6 +95,9 @@ class _VisitorSearchModalTemplateComponentWidgetState
|
|||
_model.textController.text,
|
||||
'69696777',
|
||||
);
|
||||
_model.textController?.selection =
|
||||
TextSelection.collapsed(
|
||||
offset: _model.textController!.text.length);
|
||||
});
|
||||
_model.getVisitorByDoc =
|
||||
await PhpGroup.getVisitorByDocCall.call(
|
||||
|
|
|
@ -1,341 +0,0 @@
|
|||
import 'dart:math' as math;
|
||||
|
||||
import 'package:data_table_2/data_table_2.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
export 'package:data_table_2/data_table_2.dart' show DataColumn2;
|
||||
|
||||
const _kDataTableHorizontalMargin = 48.0;
|
||||
const kDefaultColumnSpacing = 56.0;
|
||||
const _kMinRowsPerPage = 5;
|
||||
|
||||
typedef ColumnsBuilder<T> = List<DataColumn> Function(void Function(int, bool));
|
||||
typedef DataRowBuilder<T> = DataRow? Function(
|
||||
T, int, bool, void Function(bool?)?);
|
||||
|
||||
class FlutterFlowDataTableController<T> extends DataTableSource {
|
||||
FlutterFlowDataTableController({
|
||||
List<T>? initialData,
|
||||
int? numRows,
|
||||
PaginatorController? paginatorController,
|
||||
bool selectable = false,
|
||||
}) {
|
||||
data = initialData?.toList() ?? [];
|
||||
numRows = numRows;
|
||||
this.paginatorController = paginatorController ?? PaginatorController();
|
||||
_selectable = selectable;
|
||||
}
|
||||
|
||||
DataRowBuilder<T>? _dataRowBuilder;
|
||||
late PaginatorController paginatorController;
|
||||
List<T> data = [];
|
||||
int? _numRows;
|
||||
List<T> get selectedData =>
|
||||
selectedRows.where((i) => i < data.length).map(data.elementAt).toList();
|
||||
|
||||
bool _selectable = false;
|
||||
final Set<int> selectedRows = {};
|
||||
|
||||
int rowsPerPage = defaultRowsPerPage;
|
||||
int? sortColumnIndex;
|
||||
bool sortAscending = true;
|
||||
|
||||
void init({
|
||||
DataRowBuilder<T>? dataRowBuilder,
|
||||
bool? selectable,
|
||||
List<T>? initialData,
|
||||
int? initialNumRows,
|
||||
}) {
|
||||
_dataRowBuilder = dataRowBuilder ?? _dataRowBuilder;
|
||||
_selectable = selectable ?? _selectable;
|
||||
data = initialData?.toList() ?? data;
|
||||
_numRows = initialNumRows;
|
||||
}
|
||||
|
||||
void updateData({
|
||||
List<T>? data,
|
||||
int? numRows,
|
||||
bool notify = true,
|
||||
}) {
|
||||
this.data = data?.toList() ?? this.data;
|
||||
_numRows = numRows ?? _numRows;
|
||||
if (notify) {
|
||||
notifyListeners();
|
||||
}
|
||||
}
|
||||
|
||||
void updateSort({
|
||||
required int columnIndex,
|
||||
required bool ascending,
|
||||
Function(int, bool)? onSortChanged,
|
||||
}) {
|
||||
sortColumnIndex = columnIndex;
|
||||
sortAscending = ascending;
|
||||
if (onSortChanged != null) {
|
||||
onSortChanged(columnIndex, ascending);
|
||||
}
|
||||
notifyListeners();
|
||||
}
|
||||
|
||||
@override
|
||||
DataRow? getRow(int index) {
|
||||
final row = data.elementAtOrNull(index);
|
||||
return _dataRowBuilder != null && row != null
|
||||
? _dataRowBuilder!(
|
||||
row,
|
||||
index,
|
||||
selectedRows.contains(index),
|
||||
_selectable
|
||||
? (selected) {
|
||||
if (selected == null) {
|
||||
return;
|
||||
}
|
||||
selected
|
||||
? selectedRows.add(index)
|
||||
: selectedRows.remove(index);
|
||||
notifyListeners();
|
||||
}
|
||||
: null,
|
||||
)
|
||||
: null;
|
||||
}
|
||||
|
||||
@override
|
||||
bool get isRowCountApproximate => false;
|
||||
|
||||
@override
|
||||
int get rowCount => _numRows ?? data.length;
|
||||
|
||||
@override
|
||||
int get selectedRowCount => selectedRows.length;
|
||||
}
|
||||
|
||||
class FlutterFlowDataTable<T> extends StatefulWidget {
|
||||
const FlutterFlowDataTable({
|
||||
super.key,
|
||||
required this.controller,
|
||||
required this.data,
|
||||
this.numRows,
|
||||
required this.columnsBuilder,
|
||||
required this.dataRowBuilder,
|
||||
this.emptyBuilder,
|
||||
this.onPageChanged,
|
||||
this.onSortChanged,
|
||||
this.onRowsPerPageChanged,
|
||||
this.paginated = true,
|
||||
this.selectable = false,
|
||||
this.hidePaginator = false,
|
||||
this.showFirstLastButtons = false,
|
||||
this.width,
|
||||
this.height,
|
||||
this.minWidth,
|
||||
this.headingRowHeight = 56,
|
||||
this.dataRowHeight = kMinInteractiveDimension,
|
||||
this.columnSpacing = kDefaultColumnSpacing,
|
||||
this.headingRowColor,
|
||||
this.sortIconColor,
|
||||
this.borderRadius,
|
||||
this.addHorizontalDivider = true,
|
||||
this.addTopAndBottomDivider = false,
|
||||
this.hideDefaultHorizontalDivider = false,
|
||||
this.addVerticalDivider = false,
|
||||
this.horizontalDividerColor,
|
||||
this.horizontalDividerThickness,
|
||||
this.verticalDividerColor,
|
||||
this.verticalDividerThickness,
|
||||
this.checkboxUnselectedFillColor,
|
||||
this.checkboxSelectedFillColor,
|
||||
this.checkboxUnselectedBorderColor,
|
||||
this.checkboxSelectedBorderColor,
|
||||
this.checkboxCheckColor,
|
||||
});
|
||||
|
||||
final FlutterFlowDataTableController<T> controller;
|
||||
final List<T> data;
|
||||
final int? numRows;
|
||||
final ColumnsBuilder columnsBuilder;
|
||||
final DataRowBuilder<T> dataRowBuilder;
|
||||
final Widget? Function()? emptyBuilder;
|
||||
// Callback functions
|
||||
final Function(int)? onPageChanged;
|
||||
final Function(int, bool)? onSortChanged;
|
||||
final Function(int)? onRowsPerPageChanged;
|
||||
// Functionality options
|
||||
final bool paginated;
|
||||
final bool selectable;
|
||||
final bool showFirstLastButtons;
|
||||
final bool hidePaginator;
|
||||
// Size and shape options
|
||||
final double? width;
|
||||
final double? height;
|
||||
final double? minWidth;
|
||||
final double headingRowHeight;
|
||||
final double dataRowHeight;
|
||||
final double columnSpacing;
|
||||
// Table style options
|
||||
final Color? headingRowColor;
|
||||
final Color? sortIconColor;
|
||||
final BorderRadius? borderRadius;
|
||||
final bool addHorizontalDivider;
|
||||
final bool addTopAndBottomDivider;
|
||||
final bool hideDefaultHorizontalDivider;
|
||||
final Color? horizontalDividerColor;
|
||||
final double? horizontalDividerThickness;
|
||||
final bool addVerticalDivider;
|
||||
final Color? verticalDividerColor;
|
||||
final double? verticalDividerThickness;
|
||||
// Checkbox style options
|
||||
final Color? checkboxUnselectedFillColor;
|
||||
final Color? checkboxSelectedFillColor;
|
||||
final Color? checkboxUnselectedBorderColor;
|
||||
final Color? checkboxSelectedBorderColor;
|
||||
final Color? checkboxCheckColor;
|
||||
|
||||
@override
|
||||
State<FlutterFlowDataTable<T>> createState() =>
|
||||
_FlutterFlowDataTableState<T>();
|
||||
}
|
||||
|
||||
class _FlutterFlowDataTableState<T> extends State<FlutterFlowDataTable<T>> {
|
||||
FlutterFlowDataTableController<T> get controller => widget.controller;
|
||||
int get rowCount => controller.rowCount;
|
||||
|
||||
int get initialRowsPerPage =>
|
||||
rowCount > _kMinRowsPerPage ? defaultRowsPerPage : _kMinRowsPerPage;
|
||||
|
||||
@override
|
||||
void initState() {
|
||||
super.initState();
|
||||
dataTableShowLogs = false; // Disables noisy DataTable2 debug statements.
|
||||
controller.init(
|
||||
dataRowBuilder: widget.dataRowBuilder,
|
||||
selectable: widget.selectable,
|
||||
initialData: widget.data,
|
||||
initialNumRows: widget.numRows,
|
||||
);
|
||||
// ignore: cascade_invocations
|
||||
controller.addListener(() => setState(() {}));
|
||||
}
|
||||
|
||||
@override
|
||||
void didUpdateWidget(FlutterFlowDataTable<T> oldWidget) {
|
||||
super.didUpdateWidget(oldWidget);
|
||||
controller.updateData(
|
||||
data: widget.data,
|
||||
numRows: widget.numRows,
|
||||
notify: true,
|
||||
);
|
||||
}
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
final columns = widget.columnsBuilder(
|
||||
(index, ascending) {
|
||||
controller.updateSort(
|
||||
columnIndex: index,
|
||||
ascending: ascending,
|
||||
onSortChanged: widget.onSortChanged,
|
||||
);
|
||||
setState(() {});
|
||||
},
|
||||
);
|
||||
|
||||
final checkboxThemeData = CheckboxThemeData(
|
||||
checkColor: MaterialStateProperty.all(
|
||||
widget.checkboxCheckColor ?? Colors.black54,
|
||||
),
|
||||
fillColor: MaterialStateProperty.resolveWith(
|
||||
(states) => states.contains(MaterialState.selected)
|
||||
? widget.checkboxSelectedFillColor ?? Colors.white.withOpacity(0.01)
|
||||
: widget.checkboxUnselectedFillColor ??
|
||||
Colors.white.withOpacity(0.01),
|
||||
),
|
||||
side: MaterialStateBorderSide.resolveWith(
|
||||
(states) => BorderSide(
|
||||
width: 2.0,
|
||||
color: states.contains(MaterialState.selected)
|
||||
? widget.checkboxSelectedBorderColor ?? Colors.black54
|
||||
: widget.checkboxUnselectedBorderColor ?? Colors.black54,
|
||||
),
|
||||
),
|
||||
overlayColor: MaterialStateProperty.all(Colors.transparent),
|
||||
);
|
||||
|
||||
final horizontalBorder = widget.addHorizontalDivider
|
||||
? BorderSide(
|
||||
color: widget.horizontalDividerColor ?? Colors.transparent,
|
||||
width: widget.horizontalDividerThickness ?? 1.0,
|
||||
)
|
||||
: BorderSide.none;
|
||||
|
||||
return ClipRRect(
|
||||
borderRadius: widget.borderRadius ?? BorderRadius.zero,
|
||||
child: SizedBox(
|
||||
width: widget.width,
|
||||
height: widget.height,
|
||||
child: Theme(
|
||||
data: Theme.of(context).copyWith(
|
||||
iconTheme: widget.sortIconColor != null
|
||||
? IconThemeData(color: widget.sortIconColor)
|
||||
: null,
|
||||
),
|
||||
child: PaginatedDataTable2(
|
||||
source: controller,
|
||||
controller:
|
||||
widget.paginated ? controller.paginatorController : null,
|
||||
rowsPerPage: widget.paginated ? initialRowsPerPage : rowCount,
|
||||
availableRowsPerPage: const [5, 10, 25, 50, 100],
|
||||
onPageChanged: widget.onPageChanged != null
|
||||
? (index) => widget.onPageChanged!(index)
|
||||
: null,
|
||||
columnSpacing: widget.columnSpacing,
|
||||
onRowsPerPageChanged: widget.paginated
|
||||
? (value) {
|
||||
controller.rowsPerPage = value ?? initialRowsPerPage;
|
||||
if (widget.onRowsPerPageChanged != null) {
|
||||
widget.onRowsPerPageChanged!(controller.rowsPerPage);
|
||||
}
|
||||
}
|
||||
: null,
|
||||
columns: columns,
|
||||
empty: widget.emptyBuilder != null ? widget.emptyBuilder!() : null,
|
||||
sortColumnIndex: controller.sortColumnIndex,
|
||||
sortAscending: controller.sortAscending,
|
||||
showCheckboxColumn: widget.selectable,
|
||||
datarowCheckboxTheme: checkboxThemeData,
|
||||
headingCheckboxTheme: checkboxThemeData,
|
||||
hidePaginator: !widget.paginated || widget.hidePaginator,
|
||||
wrapInCard: false,
|
||||
renderEmptyRowsInTheEnd: false,
|
||||
border: TableBorder(
|
||||
horizontalInside: horizontalBorder,
|
||||
verticalInside: widget.addVerticalDivider
|
||||
? BorderSide(
|
||||
color: widget.verticalDividerColor ?? Colors.transparent,
|
||||
width: widget.verticalDividerThickness ?? 1.0,
|
||||
)
|
||||
: BorderSide.none,
|
||||
bottom: widget.addTopAndBottomDivider
|
||||
? horizontalBorder
|
||||
: BorderSide.none,
|
||||
),
|
||||
dividerThickness: widget.hideDefaultHorizontalDivider ? 0.0 : null,
|
||||
headingRowColor: MaterialStateProperty.all(widget.headingRowColor),
|
||||
headingRowHeight: widget.headingRowHeight,
|
||||
dataRowHeight: widget.dataRowHeight,
|
||||
showFirstLastButtons: widget.showFirstLastButtons,
|
||||
minWidth: math.max(widget.minWidth ?? 0, _getColumnsWidth(columns)),
|
||||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
// Return the total fixed width of all columns that have a specified width,
|
||||
// plus one to make the data table scrollable if there is insufficient space.
|
||||
double _getColumnsWidth(List<DataColumn> columns) =>
|
||||
columns.where((c) => c is DataColumn2 && c.fixedWidth != null).fold(
|
||||
((widget.selectable ? 2 : 1) * _kDataTableHorizontalMargin) + 1,
|
||||
(sum, col) => sum + (col as DataColumn2).fixedWidth!,
|
||||
);
|
||||
}
|
|
@ -562,14 +562,6 @@ final kTranslationsMap = <Map<String, Map<String, String>>>[
|
|||
},
|
||||
// peopleOnThePropertyPage
|
||||
{
|
||||
'omjuk919': {
|
||||
'pt': 'Foto',
|
||||
'en': 'Photo',
|
||||
},
|
||||
'fli7tpz6': {
|
||||
'pt': 'Nome',
|
||||
'en': 'Name',
|
||||
},
|
||||
'nsu13r5d': {
|
||||
'pt': 'Pessoas na Propriedade',
|
||||
'en': 'People on the Property',
|
||||
|
|
|
@ -32,54 +32,56 @@ String uploadedFileToString(FFUploadedFile uploadedFile) =>
|
|||
|
||||
String? serializeParam(
|
||||
dynamic param,
|
||||
ParamType paramType, [
|
||||
ParamType paramType, {
|
||||
bool isList = false,
|
||||
]) {
|
||||
}) {
|
||||
try {
|
||||
if (param == null) {
|
||||
return null;
|
||||
}
|
||||
if (isList) {
|
||||
final serializedValues = (param as Iterable)
|
||||
.map((p) => serializeParam(p, paramType, false))
|
||||
.map((p) => serializeParam(p, paramType, isList: false))
|
||||
.where((p) => p != null)
|
||||
.map((p) => p!)
|
||||
.toList();
|
||||
return json.encode(serializedValues);
|
||||
}
|
||||
String? data;
|
||||
switch (paramType) {
|
||||
case ParamType.int:
|
||||
return param.toString();
|
||||
data = param.toString();
|
||||
case ParamType.double:
|
||||
return param.toString();
|
||||
data = param.toString();
|
||||
case ParamType.String:
|
||||
return param;
|
||||
data = param;
|
||||
case ParamType.bool:
|
||||
return param ? 'true' : 'false';
|
||||
data = param ? 'true' : 'false';
|
||||
case ParamType.DateTime:
|
||||
return (param as DateTime).millisecondsSinceEpoch.toString();
|
||||
data = (param as DateTime).millisecondsSinceEpoch.toString();
|
||||
case ParamType.DateTimeRange:
|
||||
return dateTimeRangeToString(param as DateTimeRange);
|
||||
data = dateTimeRangeToString(param as DateTimeRange);
|
||||
case ParamType.LatLng:
|
||||
return (param as LatLng).serialize();
|
||||
data = (param as LatLng).serialize();
|
||||
case ParamType.Color:
|
||||
return (param as Color).toCssString();
|
||||
data = (param as Color).toCssString();
|
||||
case ParamType.FFPlace:
|
||||
return placeToString(param as FFPlace);
|
||||
data = placeToString(param as FFPlace);
|
||||
case ParamType.FFUploadedFile:
|
||||
return uploadedFileToString(param as FFUploadedFile);
|
||||
data = uploadedFileToString(param as FFUploadedFile);
|
||||
case ParamType.JSON:
|
||||
return json.encode(param);
|
||||
data = json.encode(param);
|
||||
|
||||
case ParamType.DataStruct:
|
||||
return param is BaseStruct ? param.serialize() : null;
|
||||
data = param is BaseStruct ? param.serialize() : null;
|
||||
|
||||
case ParamType.Enum:
|
||||
return (param is Enum) ? param.serialize() : null;
|
||||
data = (param is Enum) ? param.serialize() : null;
|
||||
|
||||
default:
|
||||
return null;
|
||||
data = null;
|
||||
}
|
||||
return data;
|
||||
} catch (e) {
|
||||
print('Error serializing parameter: $e');
|
||||
return null;
|
||||
|
|
|
@ -38,6 +38,7 @@ class MyApp extends StatefulWidget {
|
|||
|
||||
class _MyAppState extends State<MyApp> {
|
||||
Locale? _locale = FFLocalizations.getStoredLocale();
|
||||
|
||||
ThemeMode _themeMode = FlutterFlowTheme.themeMode;
|
||||
|
||||
late AppStateNotifier _appStateNotifier;
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -1,4 +1,3 @@
|
|||
import '/flutter_flow/flutter_flow_data_table.dart';
|
||||
import '/flutter_flow/flutter_flow_util.dart';
|
||||
import 'people_on_the_property_page_widget.dart'
|
||||
show PeopleOnThePropertyPageWidget;
|
||||
|
@ -9,9 +8,6 @@ class PeopleOnThePropertyPageModel
|
|||
/// State fields for stateful widgets in this page.
|
||||
|
||||
final unfocusNode = FocusNode();
|
||||
// State field(s) for PaginatedDataTable widget.
|
||||
final paginatedDataTableController =
|
||||
FlutterFlowDataTableController<dynamic>();
|
||||
|
||||
@override
|
||||
void initState(BuildContext context) {}
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
import '/backend/api_requests/api_calls.dart';
|
||||
import '/flutter_flow/flutter_flow_data_table.dart';
|
||||
import '/flutter_flow/flutter_flow_icon_button.dart';
|
||||
import '/flutter_flow/flutter_flow_theme.dart';
|
||||
import '/flutter_flow/flutter_flow_util.dart';
|
||||
|
@ -106,179 +105,72 @@ class _PeopleOnThePropertyPageWidgetState
|
|||
);
|
||||
}
|
||||
final columnGetPessoasLocalResponse = snapshot.data!;
|
||||
return Column(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
mainAxisAlignment: MainAxisAlignment.start,
|
||||
children: [
|
||||
Expanded(
|
||||
child: Builder(
|
||||
builder: (context) {
|
||||
final getPessoaLocal = PhpGroup.getPessoasLocalCall
|
||||
.pessoas(
|
||||
columnGetPessoasLocalResponse.jsonBody,
|
||||
)
|
||||
?.toList() ??
|
||||
[];
|
||||
return FlutterFlowDataTable<dynamic>(
|
||||
controller: _model.paginatedDataTableController,
|
||||
data: getPessoaLocal,
|
||||
columnsBuilder: (onSortChanged) => [
|
||||
DataColumn2(
|
||||
label: DefaultTextStyle.merge(
|
||||
softWrap: true,
|
||||
child: Row(
|
||||
mainAxisSize: MainAxisSize.max,
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
Text(
|
||||
FFLocalizations.of(context).getText(
|
||||
'omjuk919' /* Foto */,
|
||||
),
|
||||
textAlign: TextAlign.center,
|
||||
style: FlutterFlowTheme.of(context)
|
||||
.labelLarge
|
||||
.override(
|
||||
fontFamily:
|
||||
FlutterFlowTheme.of(context)
|
||||
.labelLargeFamily,
|
||||
color: FlutterFlowTheme.of(context)
|
||||
.primaryText,
|
||||
letterSpacing: 0.0,
|
||||
useGoogleFonts: GoogleFonts.asMap()
|
||||
.containsKey(
|
||||
FlutterFlowTheme.of(context)
|
||||
.labelLargeFamily),
|
||||
),
|
||||
),
|
||||
],
|
||||
return Builder(
|
||||
builder: (context) {
|
||||
final getPoepleProperty = PhpGroup.getPessoasLocalCall
|
||||
.pessoas(
|
||||
columnGetPessoasLocalResponse.jsonBody,
|
||||
)
|
||||
?.toList() ??
|
||||
[];
|
||||
return Column(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
mainAxisAlignment: MainAxisAlignment.start,
|
||||
children: List.generate(getPoepleProperty.length,
|
||||
(getPoeplePropertyIndex) {
|
||||
final getPoeplePropertyItem =
|
||||
getPoepleProperty[getPoeplePropertyIndex];
|
||||
return Row(
|
||||
mainAxisSize: MainAxisSize.max,
|
||||
mainAxisAlignment: MainAxisAlignment.start,
|
||||
children: [
|
||||
Padding(
|
||||
padding: const EdgeInsets.all(4.0),
|
||||
child: Container(
|
||||
width: 50.0,
|
||||
height: 50.0,
|
||||
clipBehavior: Clip.antiAlias,
|
||||
decoration: const BoxDecoration(
|
||||
shape: BoxShape.circle,
|
||||
),
|
||||
child: CachedNetworkImage(
|
||||
fadeInDuration: const Duration(milliseconds: 500),
|
||||
fadeOutDuration: const Duration(milliseconds: 500),
|
||||
imageUrl: valueOrDefault<String>(
|
||||
'https://freaccess.com.br/freaccess/getImage.php?devUUID=${FFAppState().devUUID}&userUUID=${FFAppState().userUUID}&cliID=${FFAppState().cliUUID}&atividade=getFoto&Documento=&tipo=E&Email=${getJsonField(
|
||||
getPoeplePropertyItem,
|
||||
r'''$.USU_EMAIL''',
|
||||
).toString()}',
|
||||
'https://storage.googleapis.com/flutterflow-io-6f20.appspot.com/projects/flutter-freaccess-hub-0xgz9q/assets/7ftdetkzc3s0/360_F_64676383_LdbmhiNM6Ypzb3FM4PPuFP9rHe7ri8Ju.jpg',
|
||||
),
|
||||
fit: BoxFit.cover,
|
||||
),
|
||||
),
|
||||
DataColumn2(
|
||||
label: DefaultTextStyle.merge(
|
||||
softWrap: true,
|
||||
child: Row(
|
||||
mainAxisSize: MainAxisSize.max,
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
Text(
|
||||
FFLocalizations.of(context).getText(
|
||||
'fli7tpz6' /* Nome */,
|
||||
),
|
||||
style: FlutterFlowTheme.of(context)
|
||||
.labelLarge
|
||||
.override(
|
||||
fontFamily:
|
||||
FlutterFlowTheme.of(context)
|
||||
.labelLargeFamily,
|
||||
color: FlutterFlowTheme.of(context)
|
||||
.primaryText,
|
||||
letterSpacing: 0.0,
|
||||
useGoogleFonts: GoogleFonts.asMap()
|
||||
.containsKey(
|
||||
FlutterFlowTheme.of(context)
|
||||
.labelLargeFamily),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
dataRowBuilder: (getPessoaLocalItem,
|
||||
getPessoaLocalIndex,
|
||||
selected,
|
||||
onSelectChanged) =>
|
||||
DataRow(
|
||||
color: MaterialStateProperty.all(
|
||||
getPessoaLocalIndex % 2 == 0
|
||||
? FlutterFlowTheme.of(context)
|
||||
.primaryBackground
|
||||
: FlutterFlowTheme.of(context)
|
||||
.primaryBackground,
|
||||
),
|
||||
cells: [
|
||||
Row(
|
||||
mainAxisSize: MainAxisSize.max,
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
Padding(
|
||||
padding: const EdgeInsets.all(4.0),
|
||||
child: Container(
|
||||
width: 100.0,
|
||||
height: 100.0,
|
||||
clipBehavior: Clip.antiAlias,
|
||||
decoration: const BoxDecoration(
|
||||
shape: BoxShape.circle,
|
||||
),
|
||||
child: CachedNetworkImage(
|
||||
fadeInDuration:
|
||||
const Duration(milliseconds: 500),
|
||||
fadeOutDuration:
|
||||
const Duration(milliseconds: 500),
|
||||
imageUrl: valueOrDefault<String>(
|
||||
'https://freaccess.com.br/freaccess/getImage.php?devUUID=${FFAppState().devUUID}&userUUID=${FFAppState().userUUID}&cliID=${FFAppState().cliUUID}&atividade=getFoto&Documento=&tipo=E&Email=${getJsonField(
|
||||
getPessoaLocalItem,
|
||||
r'''$.USU_EMAIL''',
|
||||
).toString()}',
|
||||
'https://storage.googleapis.com/flutterflow-io-6f20.appspot.com/projects/flutter-freaccess-hub-0xgz9q/assets/7ftdetkzc3s0/360_F_64676383_LdbmhiNM6Ypzb3FM4PPuFP9rHe7ri8Ju.jpg',
|
||||
),
|
||||
fit: BoxFit.cover,
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
Container(
|
||||
width: 500.0,
|
||||
height: 21.0,
|
||||
decoration: const BoxDecoration(),
|
||||
alignment: const AlignmentDirectional(-1.0, 0.0),
|
||||
child: Text(
|
||||
getJsonField(
|
||||
getPessoaLocalItem,
|
||||
r'''$.USU_NOME''',
|
||||
).toString(),
|
||||
style: FlutterFlowTheme.of(context)
|
||||
.bodyMedium
|
||||
.override(
|
||||
fontFamily: FlutterFlowTheme.of(context)
|
||||
.bodyMediumFamily,
|
||||
fontSize: 14.0,
|
||||
letterSpacing: 0.0,
|
||||
useGoogleFonts: GoogleFonts.asMap()
|
||||
.containsKey(
|
||||
FlutterFlowTheme.of(context)
|
||||
.bodyMediumFamily),
|
||||
),
|
||||
),
|
||||
),
|
||||
].map((c) => DataCell(c)).toList(),
|
||||
),
|
||||
paginated: true,
|
||||
selectable: false,
|
||||
hidePaginator: false,
|
||||
showFirstLastButtons: false,
|
||||
width: MediaQuery.sizeOf(context).width * 1.0,
|
||||
height: MediaQuery.sizeOf(context).height * 1.0,
|
||||
headingRowHeight: 56.0,
|
||||
dataRowHeight: 48.0,
|
||||
columnSpacing: 20.0,
|
||||
headingRowColor:
|
||||
FlutterFlowTheme.of(context).primaryBackground,
|
||||
borderRadius: BorderRadius.circular(0.0),
|
||||
addHorizontalDivider: true,
|
||||
addTopAndBottomDivider: true,
|
||||
hideDefaultHorizontalDivider: false,
|
||||
horizontalDividerColor:
|
||||
FlutterFlowTheme.of(context).customColor5,
|
||||
horizontalDividerThickness: 0.3,
|
||||
addVerticalDivider: false,
|
||||
);
|
||||
},
|
||||
),
|
||||
),
|
||||
],
|
||||
Text(
|
||||
getJsonField(
|
||||
getPoeplePropertyItem,
|
||||
r'''$.USU_NOME''',
|
||||
).toString(),
|
||||
style: FlutterFlowTheme.of(context)
|
||||
.bodyMedium
|
||||
.override(
|
||||
fontFamily: FlutterFlowTheme.of(context)
|
||||
.bodyMediumFamily,
|
||||
fontSize: 14.0,
|
||||
letterSpacing: 0.0,
|
||||
useGoogleFonts: GoogleFonts.asMap()
|
||||
.containsKey(FlutterFlowTheme.of(context)
|
||||
.bodyMediumFamily),
|
||||
),
|
||||
),
|
||||
]
|
||||
.divide(const SizedBox(width: 20.0))
|
||||
.addToStart(const SizedBox(width: 40.0)),
|
||||
);
|
||||
}).divide(const SizedBox(height: 3.0)),
|
||||
);
|
||||
},
|
||||
);
|
||||
},
|
||||
),
|
||||
|
|
|
@ -72,7 +72,7 @@ class _ScheduleCompleteVisitPageWidgetState
|
|||
getJsonField(
|
||||
e,
|
||||
r'''$.VTE_DOCUMENTO''',
|
||||
))
|
||||
).toString().toString())
|
||||
.toList()
|
||||
.toList()
|
||||
.cast<dynamic>();
|
||||
|
@ -1010,6 +1010,13 @@ class _ScheduleCompleteVisitPageWidgetState
|
|||
context)
|
||||
.languageCode,
|
||||
);
|
||||
_model.textController1
|
||||
?.selection =
|
||||
TextSelection.collapsed(
|
||||
offset: _model
|
||||
.textController1!
|
||||
.text
|
||||
.length);
|
||||
});
|
||||
},
|
||||
child: Container(
|
||||
|
@ -1397,6 +1404,13 @@ class _ScheduleCompleteVisitPageWidgetState
|
|||
context)
|
||||
.languageCode,
|
||||
);
|
||||
_model.textController2
|
||||
?.selection =
|
||||
TextSelection.collapsed(
|
||||
offset: _model
|
||||
.textController2!
|
||||
.text
|
||||
.length);
|
||||
});
|
||||
},
|
||||
child: Container(
|
||||
|
|
|
@ -506,6 +506,12 @@ class _ScheduleProvisionalVisitPageWidgetState
|
|||
locale: FFLocalizations.of(context)
|
||||
.languageCode,
|
||||
);
|
||||
_model.textController1?.selection =
|
||||
TextSelection.collapsed(
|
||||
offset: _model
|
||||
.textController1!
|
||||
.text
|
||||
.length);
|
||||
});
|
||||
},
|
||||
child: Container(
|
||||
|
|
|
@ -29,7 +29,6 @@ dependencies:
|
|||
cached_network_image: 3.3.1
|
||||
collection: 1.18.0
|
||||
crop_your_image: 1.0.0
|
||||
data_table_2: 2.5.10
|
||||
device_info_plus: 9.1.2
|
||||
dropdown_button2: 2.3.9
|
||||
easy_debounce: 2.0.1
|
||||
|
|
|
@ -47,6 +47,7 @@
|
|||
|
||||
<link rel="manifest" href="manifest.json">
|
||||
|
||||
|
||||
</head>
|
||||
<body>
|
||||
|
||||
|
|
Loading…
Reference in New Issue