98 lines
2.8 KiB
Dart
98 lines
2.8 KiB
Dart
// ignore: must_be_immutable
|
|
import 'package:flutter/material.dart';
|
|
import 'package:hub/backend/schema/enums/enums.dart';
|
|
import 'package:hub/components/atomic_components/shared_components_atoms/appbar.dart';
|
|
import 'package:hub/components/organism_components/menu_component/menu_component_widget.dart';
|
|
import 'package:hub/flutter_flow/flutter_flow_model.dart';
|
|
import 'package:hub/flutter_flow/flutter_flow_theme.dart';
|
|
import 'package:hub/flutter_flow/flutter_flow_util.dart';
|
|
import 'package:hub/flutter_flow/nav/nav.dart';
|
|
import 'package:hub/pages/about_property_page/about_property_model.dart';
|
|
import 'package:hub/shared/helpers/license/license_helper.dart';
|
|
|
|
enum AboutPropertyModules {
|
|
residents,
|
|
vehicles,
|
|
openedVisits,
|
|
petsHistory,
|
|
}
|
|
|
|
extension AboutPropertyModulesExtension on AboutPropertyModules {
|
|
String get value {
|
|
switch (this) {
|
|
case AboutPropertyModules.openedVisits:
|
|
return 'FRE-HUB-OPENED-VISITS';
|
|
case AboutPropertyModules.vehicles:
|
|
return 'FRE-HUB-VEHICLES';
|
|
case AboutPropertyModules.residents:
|
|
return 'FRE-HUB-RESIDENTS';
|
|
case AboutPropertyModules.petsHistory:
|
|
return 'FRE-HUB-PETS-HISTORY';
|
|
default:
|
|
return '';
|
|
}
|
|
}
|
|
}
|
|
|
|
// ignore: must_be_immutable
|
|
class AboutPropertyPage extends StatefulWidget {
|
|
dynamic pet;
|
|
|
|
AboutPropertyPage({
|
|
super.key,
|
|
this.pet,
|
|
});
|
|
|
|
@override
|
|
State<AboutPropertyPage> createState() => _AboutPropertyPageState();
|
|
}
|
|
|
|
class _AboutPropertyPageState extends State<AboutPropertyPage> with SingleTickerProviderStateMixin {
|
|
late AboutPropertyModel _model;
|
|
|
|
@override
|
|
void initState() {
|
|
super.initState();
|
|
_model = createModel(context, () => AboutPropertyModel());
|
|
_model.updateOnChange = true;
|
|
|
|
_model.safeSetState = () {
|
|
safeSetState(() {});
|
|
};
|
|
}
|
|
|
|
@override
|
|
void dispose() {
|
|
super.dispose();
|
|
_model.dispose();
|
|
}
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
return Scaffold(appBar: _buildAppBar(context), backgroundColor: FlutterFlowTheme.of(context).primaryBackground, body: _buildBody(context));
|
|
}
|
|
|
|
PreferredSizeWidget _buildAppBar(BuildContext context) {
|
|
final String title = FFLocalizations.of(context).getVariableText(ptText: "Sobre a Propriedade", enText: "About the Property");
|
|
return AppBarUtil(
|
|
title: title,
|
|
onBackButtonPressed: () => context.pop(),
|
|
);
|
|
}
|
|
|
|
Widget _buildBody(BuildContext context) {
|
|
return SingleChildScrollView(
|
|
child: Container(
|
|
color: FlutterFlowTheme.of(context).primaryBackground,
|
|
child: MenuComponentWidget(expandable: true, style: MenuView.list_grid, item: MenuItem.button, menuOptions: [
|
|
Module.pets,
|
|
Module.residents,
|
|
Module.openedVisits,
|
|
Module.vehicles,
|
|
Module.orders,
|
|
]),
|
|
),
|
|
);
|
|
}
|
|
}
|