flutter-freaccess-hub/lib/features/property/presentation/pages/about_property_screen.dart

89 lines
2.3 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/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/shared/components/molecules/menu/index.dart';
import 'package:hub/shared/components/molecules/modules/index.dart';
class AboutPropertyModel extends FlutterFlowModel<AboutPropertyPage> {
dynamic item;
VoidCallback? safeSetState;
Future<void> initAsync() async {
safeSetState?.call();
}
@override
void initState(BuildContext context) {
initAsync();
}
@override
void dispose() {}
}
// 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: MenuFactory(
menuEntry: MenuEntries.AboutProperty,
menuItem: MenuItem.button,
menuView: MenuView.list_grid,
),
),
);
}
}