import 'dart:io'; import 'package:flutter/material.dart'; import 'package:flutter_svg/svg.dart'; import 'package:google_fonts/google_fonts.dart'; import 'package:hub/backend/api_requests/api_calls.dart'; import 'package:hub/flutter_flow/flutter_flow_icon_button.dart'; import 'package:hub/flutter_flow/flutter_flow_theme.dart'; import 'package:hub/flutter_flow/flutter_flow_util.dart'; import 'package:hub/flutter_flow/internationalization.dart'; import 'package:package_info_plus/package_info_plus.dart'; import 'package:yaml/yaml.dart'; class AboutSystemPage extends StatefulWidget { @override _AboutSystemPageState createState() => _AboutSystemPageState(); } class _AboutSystemPageState extends State { String _appVersion = ''; @override void initState() { super.initState(); _loadAppVersion(); } Future _loadAppVersion() async { try { final PackageInfo packageInfo = await PackageInfo.fromPlatform(); setState(() { _appVersion = packageInfo.version; }); } catch (e) { setState(() { _appVersion = 'Erro ao carregar versão'; }); } } @override Widget build(BuildContext context) { final theme = FlutterFlowTheme.of(context); return Scaffold( backgroundColor: theme.primaryBackground, appBar: _buildAppBar(context, theme), body: _buildBody(), ); } PreferredSizeWidget _buildAppBar(BuildContext context, FlutterFlowTheme theme) { return AppBar( backgroundColor: theme.primaryBackground, automaticallyImplyLeading: false, leading: _buildBackButton(context, theme), title: _buildTitle(context, theme), centerTitle: true, elevation: 0.0, ); } Widget _buildBackButton(BuildContext context, FlutterFlowTheme theme) { return FlutterFlowIconButton( borderColor: Colors.transparent, borderRadius: 30.0, borderWidth: 1.0, buttonSize: 60.0, icon: Icon( Icons.keyboard_arrow_left, color: theme.primaryText, size: 30.0, ), onPressed: () => Navigator.of(context).pop(), ); } Widget _buildTitle(BuildContext context, FlutterFlowTheme theme) { return Text( FFLocalizations.of(context).getVariableText( ptText: 'Sobre o Sistema', enText: 'About the System', ), style: theme.headlineMedium.override( fontFamily: theme.headlineMediumFamily, color: theme.primaryText, fontSize: 16.0, letterSpacing: 0.0, useGoogleFonts: GoogleFonts.asMap().containsKey(theme.headlineMediumFamily), ), ); } Widget _buildBody() { return Center( child: Column( mainAxisAlignment: MainAxisAlignment.start, children: [ SizedBox(height: 20), SizedBox( height: 50, width: 50, child: Image.asset('assets/images/fre.png'), ), SizedBox(height: 20), Text( 'App Version: $_appVersion', style: TextStyle(fontSize: 18), ), ], ), ); } }