50 lines
1.3 KiB
Dart
50 lines
1.3 KiB
Dart
part of 'index.dart';
|
|
|
|
class DocumentManagerScreen extends StatelessScreen {
|
|
final DocumentPageModel model;
|
|
final DocumentPageState state;
|
|
|
|
const DocumentManagerScreen({
|
|
super.key,
|
|
required this.model,
|
|
required this.state,
|
|
});
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
final String title = FFLocalizations.of(context).getVariableText(
|
|
enText: 'Documents',
|
|
ptText: 'Documentos',
|
|
);
|
|
final theme = FlutterFlowTheme.of(context);
|
|
action() => Navigator.pop(context);
|
|
|
|
return Scaffold(
|
|
backgroundColor: theme.primaryBackground,
|
|
appBar: buildAppBar(title, context, action),
|
|
body: buildBody(context),
|
|
);
|
|
}
|
|
|
|
Widget buildBody(BuildContext context) {
|
|
final SizedBox space = SizedBox(height: 30);
|
|
return Column(
|
|
children: [
|
|
Expanded(
|
|
child: EnhancedRemoteListView<Document, Category>(
|
|
key: model.managerKey,
|
|
pagingController: model._pagingController,
|
|
headerBuilder: model.listHeaderBuilder,
|
|
headerItems: model.generateCategories,
|
|
bodyBuilder: model.documentItemBuilder,
|
|
dataProvider: model.generateDocuments,
|
|
onFetchError: model.onFetchError,
|
|
),
|
|
),
|
|
] //
|
|
.addToStart(space)
|
|
.addToEnd(space),
|
|
);
|
|
}
|
|
}
|