This commit is contained in:
jantunesmesias 2024-08-22 09:36:52 -03:00
parent 74d351de72
commit 518bdf412e
4 changed files with 104 additions and 111 deletions

BIN
assets/images/logo.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 621 B

View File

@ -1,3 +1,4 @@
import 'package:cached_network_image/cached_network_image.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:google_fonts/google_fonts.dart'; import 'package:google_fonts/google_fonts.dart';
import 'package:provider/provider.dart'; import 'package:provider/provider.dart';
@ -71,68 +72,57 @@ class _LocalProfileComponentWidgetState
child: Padding( child: Padding(
padding: const EdgeInsets.all(2.0), padding: const EdgeInsets.all(2.0),
child: InkWell( child: InkWell(
splashColor: Colors.transparent, splashColor: Colors.transparent,
focusColor: Colors.transparent, focusColor: Colors.transparent,
hoverColor: Colors.transparent, hoverColor: Colors.transparent,
highlightColor: Colors.transparent, highlightColor: Colors.transparent,
onTap: () async { onTap: () async {
showModalBottomSheet( showModalBottomSheet(
isScrollControlled: true, isScrollControlled: true,
backgroundColor: const Color(0x00FFFFFF), backgroundColor: const Color(0x00FFFFFF),
context: context, context: context,
builder: (context) { builder: (context) {
return Padding( return Padding(
padding: MediaQuery.viewInsetsOf(context), padding: MediaQuery.viewInsetsOf(context),
child: const SizedBox( child: const SizedBox(
height: double.infinity, height: double.infinity,
child: BottomArrowLinkedLocalsComponentWidget(), child:
), BottomArrowLinkedLocalsComponentWidget(),
); ),
}, );
).then((value) => safeSetState(() {})); },
}, ).then((value) => safeSetState(() {}));
child: ClipRRect( },
child: ClipRRect(
borderRadius: BorderRadius.circular(200.0), borderRadius: BorderRadius.circular(200.0),
child: Image.network( child: CachedNetworkImage(
'https://freaccess.com.br/freaccess/Images/Clients/${AppState().cliUUID}.png', imageUrl:
'https://freaccess.com.br/freaccess/Images/Clients/${AppState().cliUUID}.png',
width: 80.0, width: 80.0,
height: 80.0, height: 80.0,
fit: BoxFit.cover, fit: BoxFit.cover,
alignment: const Alignment(0.0, 0.0), alignment: const Alignment(0.0, 0.0),
errorBuilder: (context, error, stackTrace) => // errorListener: (Easing) => log(Easing.toString()),
Image.network( errorWidget: (_, __, ___) =>
'https://storage.googleapis.com/flutterflow-io-6f20.appspot.com/projects/flutter-freaccess-hub-0xgz9q/assets/7ftdetkzc3s0/360_F_64676383_LdbmhiNM6Ypzb3FM4PPuFP9rHe7ri8Ju.jpg', Image.asset('assets/images/error_image.svg'),
width: 80.0, ),
height: 80.0, )),
fit: BoxFit.cover,
alignment: const Alignment(0.0, 0.0),
errorBuilder: (context, error, stackTrace) =>
Image.asset('assets/images/error_image.svg'),
),
)),
),
), ),
), ),
Column( Text(
mainAxisSize: MainAxisSize.max, valueOrDefault<String>(
mainAxisAlignment: MainAxisAlignment.center, functions.convertToUppercase(AppState().local),
children: [ 'NOME DO LOCAL',
Text( ),
valueOrDefault<String>( style: FlutterFlowTheme.of(context).labelMedium.override(
functions.convertToUppercase(AppState().local), fontFamily: 'Nunito',
'NOME DO LOCAL', color: FlutterFlowTheme.of(context).info,
fontSize: 14.0,
letterSpacing: 0.0,
fontWeight: FontWeight.w500,
useGoogleFonts:
GoogleFonts.asMap().containsKey('Nunito'),
), ),
style: FlutterFlowTheme.of(context).labelMedium.override(
fontFamily: 'Nunito',
color: FlutterFlowTheme.of(context).info,
fontSize: 14.0,
letterSpacing: 0.0,
fontWeight: FontWeight.w500,
useGoogleFonts:
GoogleFonts.asMap().containsKey('Nunito'),
),
),
],
), ),
] ]
.divide(const SizedBox(width: 20.0)) .divide(const SizedBox(width: 20.0))

View File

@ -50,7 +50,7 @@ class _HomePageWidgetState extends State<HomePageWidget> {
AppState().whatsapp = value.jsonBody['whatsapp']; AppState().whatsapp = value.jsonBody['whatsapp'];
AppState().provisional = value.jsonBody['provisional']; AppState().provisional = value.jsonBody['provisional'];
} else { } else {
DialogUtil.errorDefault(context); await DialogUtil.warningDefault(context);
} }
}); });
}(); }();
@ -164,7 +164,6 @@ class _HomePageWidgetState extends State<HomePageWidget> {
item: MenuItem.button, item: MenuItem.button,
), ),
), ),
// Align( // Align(
// alignment: const AlignmentDirectional(0.0, 0.0), // alignment: const AlignmentDirectional(0.0, 0.0),
// child: Provider<MessageWellNotifier>( // child: Provider<MessageWellNotifier>(
@ -177,7 +176,6 @@ class _HomePageWidgetState extends State<HomePageWidget> {
// ), // ),
// ), // ),
//footer //footer
const SizedBox( const SizedBox(
height: 100, height: 100,
width: double.infinity, width: double.infinity,
@ -249,8 +247,8 @@ class _HomePageWidgetState extends State<HomePageWidget> {
60.0, 15.0, 0.0, 0.0), 60.0, 15.0, 0.0, 0.0),
child: ClipRRect( child: ClipRRect(
borderRadius: BorderRadius.circular(8.0), borderRadius: BorderRadius.circular(8.0),
child: Image.network( child: Image.asset(
'https://storage.googleapis.com/flutterflow-io-6f20.appspot.com/projects/flutter-freaccess-hub-0xgz9q/assets/8r2vsbd9i03k/logo.png', 'assets/images/logo.png',
width: 50.0, width: 50.0,
height: 200.0, height: 200.0,
fit: BoxFit.none, fit: BoxFit.none,
@ -264,9 +262,7 @@ class _HomePageWidgetState extends State<HomePageWidget> {
padding: const EdgeInsetsDirectional.fromSTEB( padding: const EdgeInsetsDirectional.fromSTEB(
0.0, 15.0, 0.0, 0.0), 0.0, 15.0, 0.0, 0.0),
child: Text( child: Text(
FFLocalizations.of(context).getText( 'FRE ACCESS',
'rg9pzkpz' /* FRE ACCESS */,
),
style: FlutterFlowTheme.of(context) style: FlutterFlowTheme.of(context)
.bodyMedium .bodyMedium
.override( .override(
@ -287,28 +283,28 @@ class _HomePageWidgetState extends State<HomePageWidget> {
), ),
), ),
), ),
Align( // Align(
alignment: const AlignmentDirectional(0.0, 1.0), // alignment: const AlignmentDirectional(0.0, 1.0),
child: Container( // child: Container(
width: 100.0, // width: 100.0,
height: 50.0, // height: 50.0,
decoration: const BoxDecoration(), // decoration: const BoxDecoration(),
child: Align( // child: Align(
alignment: const AlignmentDirectional(1.0, 1.0), // alignment: const AlignmentDirectional(1.0, 1.0),
child: FlutterFlowIconButton( // child: FlutterFlowIconButton(
borderRadius: 20.0, // borderRadius: 20.0,
borderWidth: 1.0, // borderWidth: 1.0,
buttonSize: 40.0, // buttonSize: 40.0,
icon: Icon( // icon: Icon(
Icons.notifications_sharp, // Icons.notifications_sharp,
color: FlutterFlowTheme.of(context).info, // color: FlutterFlowTheme.of(context).info,
size: 24.0, // size: 24.0,
), // ),
onPressed: () {}, // onPressed: () {},
), // ),
), // ),
), // ),
), // ),
], ],
), ),
), ),

View File

@ -1,4 +1,3 @@
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:hub/components/molecular_components/throw_exception/throw_exception_widget.dart'; import 'package:hub/components/molecular_components/throw_exception/throw_exception_widget.dart';
import 'package:hub/flutter_flow/flutter_flow_util.dart'; import 'package:hub/flutter_flow/flutter_flow_util.dart';
@ -8,24 +7,33 @@ class DialogUtil {
static const double _height = 350; static const double _height = 350;
static Future<dynamic> errorDefault(BuildContext context) { static Future<dynamic> errorDefault(BuildContext context) {
return error(context, FFLocalizations.of(context).getVariableText( return error(
ptText: "Falha ao efetuar operação, Tente Novamente mais tarde.", context,
enText: "Failed to perform operation, please try again later." FFLocalizations.of(context).getVariableText(
)); ptText: "Falha ao efetuar operação, Tente Novamente mais tarde.",
enText: "Failed to perform operation, please try again later."));
}
static Future<dynamic> warningDefault(BuildContext context) {
return warning(
context,
FFLocalizations.of(context).getVariableText(
ptText: "Atenção, algo deu errado. Tente novamente mais tarde.",
enText: "Warning, something went wrong. Try again later."));
} }
static Future<dynamic> error(BuildContext context, String message) async { static Future<dynamic> error(BuildContext context, String message) async {
return await showDialog( return await showDialog(
context: context, context: context,
builder: (context) { builder: (context) {
return Dialog( return Dialog(
child: SizedBox( child: SizedBox(
height: _height, height: _height,
child: Padding(padding: MediaQuery.viewInsetsOf(context), child: ThrowExceptionWidget(msg: message, type: EnumThrowException.error)) child: Padding(
) padding: MediaQuery.viewInsetsOf(context),
); child: ThrowExceptionWidget(
} msg: message, type: EnumThrowException.error))));
); });
} }
static Future<dynamic> warning(BuildContext context, String message) async { static Future<dynamic> warning(BuildContext context, String message) async {
@ -35,11 +43,11 @@ class DialogUtil {
return Dialog( return Dialog(
child: SizedBox( child: SizedBox(
height: _height, height: _height,
child: Padding(padding: MediaQuery.viewInsetsOf(context), child: ThrowExceptionWidget(msg: message, type: EnumThrowException.warning)) child: Padding(
) padding: MediaQuery.viewInsetsOf(context),
); child: ThrowExceptionWidget(
} msg: message, type: EnumThrowException.warning))));
); });
} }
static Future<dynamic> success(BuildContext context, String message) async { static Future<dynamic> success(BuildContext context, String message) async {
@ -49,11 +57,10 @@ class DialogUtil {
return Dialog( return Dialog(
child: SizedBox( child: SizedBox(
height: _height, height: _height,
child: Padding(padding: MediaQuery.viewInsetsOf(context), child: ThrowExceptionWidget(msg: message, type: EnumThrowException.success)) child: Padding(
) padding: MediaQuery.viewInsetsOf(context),
); child: ThrowExceptionWidget(
} msg: message, type: EnumThrowException.success))));
); });
} }
}
}