import '/flutter_flow/flutter_flow_animations.dart'; import '/flutter_flow/flutter_flow_theme.dart'; import '/flutter_flow/flutter_flow_util.dart'; import 'package:flutter/material.dart'; import 'package:flutter_animate/flutter_animate.dart'; import 'package:google_fonts/google_fonts.dart'; import 'throw_exception_model.dart'; export 'throw_exception_model.dart'; /// class ThrowExceptionWidget extends StatefulWidget { const ThrowExceptionWidget({ super.key, required this.msg, }); final String? msg; @override State createState() => _ThrowExceptionWidgetState(); } class _ThrowExceptionWidgetState extends State with TickerProviderStateMixin { late ThrowExceptionModel _model; final animationsMap = {}; @override void setState(VoidCallback callback) { super.setState(callback); _model.onUpdate(); } @override void initState() { super.initState(); _model = createModel(context, () => ThrowExceptionModel()); animationsMap.addAll({ 'stackOnPageLoadAnimation': AnimationInfo( trigger: AnimationTrigger.onPageLoad, effectsBuilder: () => [ FadeEffect( curve: Curves.easeInOut, delay: 0.0.ms, duration: 600.0.ms, begin: 0.0, end: 1.0, ), ], ), }); } @override void dispose() { _model.maybeDispose(); super.dispose(); } @override Widget build(BuildContext context) { return Column( mainAxisSize: MainAxisSize.max, mainAxisAlignment: MainAxisAlignment.center, children: [ Padding( padding: const EdgeInsetsDirectional.fromSTEB(10.0, 0.0, 10.0, 0.0), child: InkWell( splashColor: Colors.transparent, focusColor: Colors.transparent, hoverColor: Colors.transparent, highlightColor: Colors.transparent, onTap: () async { Navigator.pop(context); }, child: Container( height: 400.0, decoration: BoxDecoration( color: FlutterFlowTheme.of(context).primaryBackground, borderRadius: const BorderRadius.only( bottomLeft: Radius.circular(10.0), bottomRight: Radius.circular(10.0), topLeft: Radius.circular(10.0), topRight: Radius.circular(10.0), ), ), child: Column( mainAxisSize: MainAxisSize.max, mainAxisAlignment: MainAxisAlignment.center, children: [ Stack( children: [ Align( alignment: const AlignmentDirectional(0.0, 0.0), child: Icon( Icons.circle_outlined, color: FlutterFlowTheme.of(context).error, size: 200.0, ), ), Align( alignment: const AlignmentDirectional(0.0, 0.0), child: Icon( Icons.close_outlined, color: FlutterFlowTheme.of(context).error, size: 200.0, ), ), ], ).animateOnPageLoad( animationsMap['stackOnPageLoadAnimation']!), Column( mainAxisSize: MainAxisSize.max, mainAxisAlignment: MainAxisAlignment.start, children: [ Text( FFLocalizations.of(context).getText( 'e58xxxiq' /* ERRO */, ), style: FlutterFlowTheme.of(context).bodyMedium.override( fontFamily: FlutterFlowTheme.of(context).bodyMediumFamily, fontSize: 20.0, letterSpacing: 0.0, fontWeight: FontWeight.bold, useGoogleFonts: GoogleFonts.asMap().containsKey( FlutterFlowTheme.of(context) .bodyMediumFamily), ), ), Padding( padding: const EdgeInsetsDirectional.fromSTEB(0.0, 10.0, 0.0, 0.0), child: Text( valueOrDefault( widget.msg, 'Message Not Found', ), style: FlutterFlowTheme.of(context) .bodyMedium .override( fontFamily: FlutterFlowTheme.of(context) .bodyMediumFamily, letterSpacing: 0.0, useGoogleFonts: GoogleFonts.asMap().containsKey( FlutterFlowTheme.of(context) .bodyMediumFamily), ), ), ), ].addToStart(const SizedBox(height: 50.0)), ), ], ), ), ), ), ], ); } }