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>"; };
|
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>"; };
|
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>"; };
|
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>"; };
|
6436409E27A31CD500820AF7 /* 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>"; };
|
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>"; };
|
97C147021CF9000F007C117D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
|
||||||
/* End PBXFileReference section */
|
/* End PBXFileReference section */
|
||||||
|
|
||||||
|
@ -225,8 +225,8 @@
|
||||||
6436409C27A31CD800820AF7 /* InfoPlist.strings */ = {
|
6436409C27A31CD800820AF7 /* InfoPlist.strings */ = {
|
||||||
isa = PBXVariantGroup;
|
isa = PBXVariantGroup;
|
||||||
children = (
|
children = (
|
||||||
6436409A27A31CDE00820AF7 /* pt */,
|
6436409E27A31CD500820AF7 /* pt */,
|
||||||
6436409E27A31CD600820AF7 /* en */,
|
6436409527A31CD900820AF7 /* en */,
|
||||||
);
|
);
|
||||||
name = InfoPlist.strings;
|
name = InfoPlist.strings;
|
||||||
sourceTree = "<group>";
|
sourceTree = "<group>";
|
||||||
|
|
|
@ -51,7 +51,7 @@ Future repeatVisitScheduleAction(
|
||||||
'visitorJsonList': serializeParam(
|
'visitorJsonList': serializeParam(
|
||||||
visitorJsonList,
|
visitorJsonList,
|
||||||
ParamType.JSON,
|
ParamType.JSON,
|
||||||
true,
|
isList: true,
|
||||||
),
|
),
|
||||||
}.withoutNulls,
|
}.withoutNulls,
|
||||||
extra: <String, dynamic>{
|
extra: <String, dynamic>{
|
||||||
|
|
|
@ -16,12 +16,14 @@ class ActionStruct extends BaseStruct {
|
||||||
String? _title;
|
String? _title;
|
||||||
String get title => _title ?? '';
|
String get title => _title ?? '';
|
||||||
set title(String? val) => _title = val;
|
set title(String? val) => _title = val;
|
||||||
|
|
||||||
bool hasTitle() => _title != null;
|
bool hasTitle() => _title != null;
|
||||||
|
|
||||||
// "icon" field.
|
// "icon" field.
|
||||||
String? _icon;
|
String? _icon;
|
||||||
String get icon => _icon ?? '';
|
String get icon => _icon ?? '';
|
||||||
set icon(String? val) => _icon = val;
|
set icon(String? val) => _icon = val;
|
||||||
|
|
||||||
bool hasIcon() => _icon != null;
|
bool hasIcon() => _icon != null;
|
||||||
|
|
||||||
static ActionStruct fromMap(Map<String, dynamic> data) => ActionStruct(
|
static ActionStruct fromMap(Map<String, dynamic> data) => ActionStruct(
|
||||||
|
|
|
@ -18,18 +18,21 @@ class DeviceStruct extends BaseStruct {
|
||||||
String? _devUUID;
|
String? _devUUID;
|
||||||
String get devUUID => _devUUID ?? '';
|
String get devUUID => _devUUID ?? '';
|
||||||
set devUUID(String? val) => _devUUID = val;
|
set devUUID(String? val) => _devUUID = val;
|
||||||
|
|
||||||
bool hasDevUUID() => _devUUID != null;
|
bool hasDevUUID() => _devUUID != null;
|
||||||
|
|
||||||
// "version" field.
|
// "version" field.
|
||||||
String? _version;
|
String? _version;
|
||||||
String get version => _version ?? '';
|
String get version => _version ?? '';
|
||||||
set version(String? val) => _version = val;
|
set version(String? val) => _version = val;
|
||||||
|
|
||||||
bool hasVersion() => _version != null;
|
bool hasVersion() => _version != null;
|
||||||
|
|
||||||
// "description" field.
|
// "description" field.
|
||||||
String? _description;
|
String? _description;
|
||||||
String get description => _description ?? '';
|
String get description => _description ?? '';
|
||||||
set description(String? val) => _description = val;
|
set description(String? val) => _description = val;
|
||||||
|
|
||||||
bool hasDescription() => _description != null;
|
bool hasDescription() => _description != null;
|
||||||
|
|
||||||
static DeviceStruct fromMap(Map<String, dynamic> data) => DeviceStruct(
|
static DeviceStruct fromMap(Map<String, dynamic> data) => DeviceStruct(
|
||||||
|
|
|
@ -890,7 +890,7 @@ class _ViewVisitDetailWidgetState extends State<ViewVisitDetailWidget> {
|
||||||
'visitorJsonList': serializeParam(
|
'visitorJsonList': serializeParam(
|
||||||
widget.visitorJsonList,
|
widget.visitorJsonList,
|
||||||
ParamType.JSON,
|
ParamType.JSON,
|
||||||
true,
|
isList: true,
|
||||||
),
|
),
|
||||||
}.withoutNulls,
|
}.withoutNulls,
|
||||||
);
|
);
|
||||||
|
|
|
@ -95,6 +95,9 @@ class _VisitorSearchModalTemplateComponentWidgetState
|
||||||
_model.textController.text,
|
_model.textController.text,
|
||||||
'69696777',
|
'69696777',
|
||||||
);
|
);
|
||||||
|
_model.textController?.selection =
|
||||||
|
TextSelection.collapsed(
|
||||||
|
offset: _model.textController!.text.length);
|
||||||
});
|
});
|
||||||
_model.getVisitorByDoc =
|
_model.getVisitorByDoc =
|
||||||
await PhpGroup.getVisitorByDocCall.call(
|
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
|
// peopleOnThePropertyPage
|
||||||
{
|
{
|
||||||
'omjuk919': {
|
|
||||||
'pt': 'Foto',
|
|
||||||
'en': 'Photo',
|
|
||||||
},
|
|
||||||
'fli7tpz6': {
|
|
||||||
'pt': 'Nome',
|
|
||||||
'en': 'Name',
|
|
||||||
},
|
|
||||||
'nsu13r5d': {
|
'nsu13r5d': {
|
||||||
'pt': 'Pessoas na Propriedade',
|
'pt': 'Pessoas na Propriedade',
|
||||||
'en': 'People on the Property',
|
'en': 'People on the Property',
|
||||||
|
|
|
@ -32,54 +32,56 @@ String uploadedFileToString(FFUploadedFile uploadedFile) =>
|
||||||
|
|
||||||
String? serializeParam(
|
String? serializeParam(
|
||||||
dynamic param,
|
dynamic param,
|
||||||
ParamType paramType, [
|
ParamType paramType, {
|
||||||
bool isList = false,
|
bool isList = false,
|
||||||
]) {
|
}) {
|
||||||
try {
|
try {
|
||||||
if (param == null) {
|
if (param == null) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
if (isList) {
|
if (isList) {
|
||||||
final serializedValues = (param as Iterable)
|
final serializedValues = (param as Iterable)
|
||||||
.map((p) => serializeParam(p, paramType, false))
|
.map((p) => serializeParam(p, paramType, isList: false))
|
||||||
.where((p) => p != null)
|
.where((p) => p != null)
|
||||||
.map((p) => p!)
|
.map((p) => p!)
|
||||||
.toList();
|
.toList();
|
||||||
return json.encode(serializedValues);
|
return json.encode(serializedValues);
|
||||||
}
|
}
|
||||||
|
String? data;
|
||||||
switch (paramType) {
|
switch (paramType) {
|
||||||
case ParamType.int:
|
case ParamType.int:
|
||||||
return param.toString();
|
data = param.toString();
|
||||||
case ParamType.double:
|
case ParamType.double:
|
||||||
return param.toString();
|
data = param.toString();
|
||||||
case ParamType.String:
|
case ParamType.String:
|
||||||
return param;
|
data = param;
|
||||||
case ParamType.bool:
|
case ParamType.bool:
|
||||||
return param ? 'true' : 'false';
|
data = param ? 'true' : 'false';
|
||||||
case ParamType.DateTime:
|
case ParamType.DateTime:
|
||||||
return (param as DateTime).millisecondsSinceEpoch.toString();
|
data = (param as DateTime).millisecondsSinceEpoch.toString();
|
||||||
case ParamType.DateTimeRange:
|
case ParamType.DateTimeRange:
|
||||||
return dateTimeRangeToString(param as DateTimeRange);
|
data = dateTimeRangeToString(param as DateTimeRange);
|
||||||
case ParamType.LatLng:
|
case ParamType.LatLng:
|
||||||
return (param as LatLng).serialize();
|
data = (param as LatLng).serialize();
|
||||||
case ParamType.Color:
|
case ParamType.Color:
|
||||||
return (param as Color).toCssString();
|
data = (param as Color).toCssString();
|
||||||
case ParamType.FFPlace:
|
case ParamType.FFPlace:
|
||||||
return placeToString(param as FFPlace);
|
data = placeToString(param as FFPlace);
|
||||||
case ParamType.FFUploadedFile:
|
case ParamType.FFUploadedFile:
|
||||||
return uploadedFileToString(param as FFUploadedFile);
|
data = uploadedFileToString(param as FFUploadedFile);
|
||||||
case ParamType.JSON:
|
case ParamType.JSON:
|
||||||
return json.encode(param);
|
data = json.encode(param);
|
||||||
|
|
||||||
case ParamType.DataStruct:
|
case ParamType.DataStruct:
|
||||||
return param is BaseStruct ? param.serialize() : null;
|
data = param is BaseStruct ? param.serialize() : null;
|
||||||
|
|
||||||
case ParamType.Enum:
|
case ParamType.Enum:
|
||||||
return (param is Enum) ? param.serialize() : null;
|
data = (param is Enum) ? param.serialize() : null;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
return null;
|
data = null;
|
||||||
}
|
}
|
||||||
|
return data;
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
print('Error serializing parameter: $e');
|
print('Error serializing parameter: $e');
|
||||||
return null;
|
return null;
|
||||||
|
|
|
@ -38,6 +38,7 @@ class MyApp extends StatefulWidget {
|
||||||
|
|
||||||
class _MyAppState extends State<MyApp> {
|
class _MyAppState extends State<MyApp> {
|
||||||
Locale? _locale = FFLocalizations.getStoredLocale();
|
Locale? _locale = FFLocalizations.getStoredLocale();
|
||||||
|
|
||||||
ThemeMode _themeMode = FlutterFlowTheme.themeMode;
|
ThemeMode _themeMode = FlutterFlowTheme.themeMode;
|
||||||
|
|
||||||
late AppStateNotifier _appStateNotifier;
|
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 '/flutter_flow/flutter_flow_util.dart';
|
||||||
import 'people_on_the_property_page_widget.dart'
|
import 'people_on_the_property_page_widget.dart'
|
||||||
show PeopleOnThePropertyPageWidget;
|
show PeopleOnThePropertyPageWidget;
|
||||||
|
@ -9,9 +8,6 @@ class PeopleOnThePropertyPageModel
|
||||||
/// State fields for stateful widgets in this page.
|
/// State fields for stateful widgets in this page.
|
||||||
|
|
||||||
final unfocusNode = FocusNode();
|
final unfocusNode = FocusNode();
|
||||||
// State field(s) for PaginatedDataTable widget.
|
|
||||||
final paginatedDataTableController =
|
|
||||||
FlutterFlowDataTableController<dynamic>();
|
|
||||||
|
|
||||||
@override
|
@override
|
||||||
void initState(BuildContext context) {}
|
void initState(BuildContext context) {}
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
import '/backend/api_requests/api_calls.dart';
|
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_icon_button.dart';
|
||||||
import '/flutter_flow/flutter_flow_theme.dart';
|
import '/flutter_flow/flutter_flow_theme.dart';
|
||||||
import '/flutter_flow/flutter_flow_util.dart';
|
import '/flutter_flow/flutter_flow_util.dart';
|
||||||
|
@ -106,179 +105,72 @@ class _PeopleOnThePropertyPageWidgetState
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
final columnGetPessoasLocalResponse = snapshot.data!;
|
final columnGetPessoasLocalResponse = snapshot.data!;
|
||||||
return Column(
|
return Builder(
|
||||||
mainAxisSize: MainAxisSize.min,
|
builder: (context) {
|
||||||
mainAxisAlignment: MainAxisAlignment.start,
|
final getPoepleProperty = PhpGroup.getPessoasLocalCall
|
||||||
children: [
|
.pessoas(
|
||||||
Expanded(
|
columnGetPessoasLocalResponse.jsonBody,
|
||||||
child: Builder(
|
)
|
||||||
builder: (context) {
|
?.toList() ??
|
||||||
final getPessoaLocal = PhpGroup.getPessoasLocalCall
|
[];
|
||||||
.pessoas(
|
return Column(
|
||||||
columnGetPessoasLocalResponse.jsonBody,
|
mainAxisSize: MainAxisSize.min,
|
||||||
)
|
mainAxisAlignment: MainAxisAlignment.start,
|
||||||
?.toList() ??
|
children: List.generate(getPoepleProperty.length,
|
||||||
[];
|
(getPoeplePropertyIndex) {
|
||||||
return FlutterFlowDataTable<dynamic>(
|
final getPoeplePropertyItem =
|
||||||
controller: _model.paginatedDataTableController,
|
getPoepleProperty[getPoeplePropertyIndex];
|
||||||
data: getPessoaLocal,
|
return Row(
|
||||||
columnsBuilder: (onSortChanged) => [
|
mainAxisSize: MainAxisSize.max,
|
||||||
DataColumn2(
|
mainAxisAlignment: MainAxisAlignment.start,
|
||||||
label: DefaultTextStyle.merge(
|
children: [
|
||||||
softWrap: true,
|
Padding(
|
||||||
child: Row(
|
padding: const EdgeInsets.all(4.0),
|
||||||
mainAxisSize: MainAxisSize.max,
|
child: Container(
|
||||||
mainAxisAlignment: MainAxisAlignment.center,
|
width: 50.0,
|
||||||
children: [
|
height: 50.0,
|
||||||
Text(
|
clipBehavior: Clip.antiAlias,
|
||||||
FFLocalizations.of(context).getText(
|
decoration: const BoxDecoration(
|
||||||
'omjuk919' /* Foto */,
|
shape: BoxShape.circle,
|
||||||
),
|
),
|
||||||
textAlign: TextAlign.center,
|
child: CachedNetworkImage(
|
||||||
style: FlutterFlowTheme.of(context)
|
fadeInDuration: const Duration(milliseconds: 500),
|
||||||
.labelLarge
|
fadeOutDuration: const Duration(milliseconds: 500),
|
||||||
.override(
|
imageUrl: valueOrDefault<String>(
|
||||||
fontFamily:
|
'https://freaccess.com.br/freaccess/getImage.php?devUUID=${FFAppState().devUUID}&userUUID=${FFAppState().userUUID}&cliID=${FFAppState().cliUUID}&atividade=getFoto&Documento=&tipo=E&Email=${getJsonField(
|
||||||
FlutterFlowTheme.of(context)
|
getPoeplePropertyItem,
|
||||||
.labelLargeFamily,
|
r'''$.USU_EMAIL''',
|
||||||
color: FlutterFlowTheme.of(context)
|
).toString()}',
|
||||||
.primaryText,
|
'https://storage.googleapis.com/flutterflow-io-6f20.appspot.com/projects/flutter-freaccess-hub-0xgz9q/assets/7ftdetkzc3s0/360_F_64676383_LdbmhiNM6Ypzb3FM4PPuFP9rHe7ri8Ju.jpg',
|
||||||
letterSpacing: 0.0,
|
|
||||||
useGoogleFonts: GoogleFonts.asMap()
|
|
||||||
.containsKey(
|
|
||||||
FlutterFlowTheme.of(context)
|
|
||||||
.labelLargeFamily),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
],
|
|
||||||
),
|
),
|
||||||
|
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,
|
Text(
|
||||||
selectable: false,
|
getJsonField(
|
||||||
hidePaginator: false,
|
getPoeplePropertyItem,
|
||||||
showFirstLastButtons: false,
|
r'''$.USU_NOME''',
|
||||||
width: MediaQuery.sizeOf(context).width * 1.0,
|
).toString(),
|
||||||
height: MediaQuery.sizeOf(context).height * 1.0,
|
style: FlutterFlowTheme.of(context)
|
||||||
headingRowHeight: 56.0,
|
.bodyMedium
|
||||||
dataRowHeight: 48.0,
|
.override(
|
||||||
columnSpacing: 20.0,
|
fontFamily: FlutterFlowTheme.of(context)
|
||||||
headingRowColor:
|
.bodyMediumFamily,
|
||||||
FlutterFlowTheme.of(context).primaryBackground,
|
fontSize: 14.0,
|
||||||
borderRadius: BorderRadius.circular(0.0),
|
letterSpacing: 0.0,
|
||||||
addHorizontalDivider: true,
|
useGoogleFonts: GoogleFonts.asMap()
|
||||||
addTopAndBottomDivider: true,
|
.containsKey(FlutterFlowTheme.of(context)
|
||||||
hideDefaultHorizontalDivider: false,
|
.bodyMediumFamily),
|
||||||
horizontalDividerColor:
|
),
|
||||||
FlutterFlowTheme.of(context).customColor5,
|
),
|
||||||
horizontalDividerThickness: 0.3,
|
]
|
||||||
addVerticalDivider: false,
|
.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(
|
getJsonField(
|
||||||
e,
|
e,
|
||||||
r'''$.VTE_DOCUMENTO''',
|
r'''$.VTE_DOCUMENTO''',
|
||||||
))
|
).toString().toString())
|
||||||
.toList()
|
.toList()
|
||||||
.toList()
|
.toList()
|
||||||
.cast<dynamic>();
|
.cast<dynamic>();
|
||||||
|
@ -1010,6 +1010,13 @@ class _ScheduleCompleteVisitPageWidgetState
|
||||||
context)
|
context)
|
||||||
.languageCode,
|
.languageCode,
|
||||||
);
|
);
|
||||||
|
_model.textController1
|
||||||
|
?.selection =
|
||||||
|
TextSelection.collapsed(
|
||||||
|
offset: _model
|
||||||
|
.textController1!
|
||||||
|
.text
|
||||||
|
.length);
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
child: Container(
|
child: Container(
|
||||||
|
@ -1397,6 +1404,13 @@ class _ScheduleCompleteVisitPageWidgetState
|
||||||
context)
|
context)
|
||||||
.languageCode,
|
.languageCode,
|
||||||
);
|
);
|
||||||
|
_model.textController2
|
||||||
|
?.selection =
|
||||||
|
TextSelection.collapsed(
|
||||||
|
offset: _model
|
||||||
|
.textController2!
|
||||||
|
.text
|
||||||
|
.length);
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
child: Container(
|
child: Container(
|
||||||
|
|
|
@ -506,6 +506,12 @@ class _ScheduleProvisionalVisitPageWidgetState
|
||||||
locale: FFLocalizations.of(context)
|
locale: FFLocalizations.of(context)
|
||||||
.languageCode,
|
.languageCode,
|
||||||
);
|
);
|
||||||
|
_model.textController1?.selection =
|
||||||
|
TextSelection.collapsed(
|
||||||
|
offset: _model
|
||||||
|
.textController1!
|
||||||
|
.text
|
||||||
|
.length);
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
child: Container(
|
child: Container(
|
||||||
|
|
|
@ -29,7 +29,6 @@ dependencies:
|
||||||
cached_network_image: 3.3.1
|
cached_network_image: 3.3.1
|
||||||
collection: 1.18.0
|
collection: 1.18.0
|
||||||
crop_your_image: 1.0.0
|
crop_your_image: 1.0.0
|
||||||
data_table_2: 2.5.10
|
|
||||||
device_info_plus: 9.1.2
|
device_info_plus: 9.1.2
|
||||||
dropdown_button2: 2.3.9
|
dropdown_button2: 2.3.9
|
||||||
easy_debounce: 2.0.1
|
easy_debounce: 2.0.1
|
||||||
|
|
|
@ -47,6 +47,7 @@
|
||||||
|
|
||||||
<link rel="manifest" href="manifest.json">
|
<link rel="manifest" href="manifest.json">
|
||||||
|
|
||||||
|
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue