flutter-freaccess-hub/lib/legacy/legacy_local_component/legacy_local_component_widg...

168 lines
6.5 KiB
Dart

import '/application_components/organism_components/bottom_arrow_linked_locals_component/bottom_arrow_linked_locals_component_widget.dart';
import '/flutter_flow/flutter_flow_theme.dart';
import '/flutter_flow/flutter_flow_util.dart';
import '/flutter_flow/custom_functions.dart' as functions;
import '/flutter_flow/random_data_util.dart' as random_data;
import 'package:flutter/material.dart';
import 'package:google_fonts/google_fonts.dart';
import 'package:provider/provider.dart';
import 'legacy_local_component_model.dart';
export 'legacy_local_component_model.dart';
class LegacyLocalComponentWidget extends StatefulWidget {
const LegacyLocalComponentWidget({super.key});
@override
State<LegacyLocalComponentWidget> createState() =>
_LegacyLocalComponentWidgetState();
}
class _LegacyLocalComponentWidgetState
extends State<LegacyLocalComponentWidget> {
late LegacyLocalComponentModel _model;
@override
void setState(VoidCallback callback) {
super.setState(callback);
_model.onUpdate();
}
@override
void initState() {
super.initState();
_model = createModel(context, () => LegacyLocalComponentModel());
}
@override
void dispose() {
_model.maybeDispose();
super.dispose();
}
@override
Widget build(BuildContext context) {
context.watch<FFAppState>();
return Visibility(
visible: random_data.randomInteger(0, 10) != null,
child: Container(
height: 284.0,
decoration: const BoxDecoration(),
child: Column(
mainAxisSize: MainAxisSize.max,
children: [
Stack(
children: [
Align(
alignment: const AlignmentDirectional(0.0, 0.0),
child: Material(
color: Colors.transparent,
elevation: 0.0,
child: Container(
width: double.infinity,
height: 119.0,
decoration: BoxDecoration(
color: const Color(0xFF1AAB5F),
border: Border.all(
color: const Color(0xFF1AAB5F),
),
),
),
),
),
Align(
alignment: const AlignmentDirectional(0.0, 0.0),
child: Padding(
padding: const EdgeInsets.all(24.0),
child: Container(
width: 200.0,
height: 200.0,
decoration: BoxDecoration(
color: FlutterFlowTheme.of(context).primaryBackground,
shape: BoxShape.circle,
),
alignment: const AlignmentDirectional(0.0, 0.0),
child: Align(
alignment: const AlignmentDirectional(0.0, 0.0),
child: Padding(
padding: const EdgeInsets.all(2.0),
child: InkWell(
splashColor: Colors.transparent,
focusColor: Colors.transparent,
hoverColor: Colors.transparent,
highlightColor: Colors.transparent,
onTap: () async {
showModalBottomSheet(
isScrollControlled: true,
backgroundColor: const Color(0x00FFFFFF),
context: context,
builder: (context) {
return Padding(
padding: MediaQuery.viewInsetsOf(context),
child: const SizedBox(
height: double.infinity,
child:
BottomArrowLinkedLocalsComponentWidget(),
),
);
},
).then((value) => safeSetState(() {}));
},
child: ClipRRect(
borderRadius: BorderRadius.circular(200.0),
child: Image.network(
valueOrDefault<String>(
'https://freaccess.com.br/freaccess/Images/Clients/${FFAppState().cliUUID}.png',
'https://storage.googleapis.com/flutterflow-io-6f20.appspot.com/projects/flutter-freaccess-hub-0xgz9q/assets/7ftdetkzc3s0/360_F_64676383_LdbmhiNM6Ypzb3FM4PPuFP9rHe7ri8Ju.jpg',
),
width: 300.0,
height: 200.0,
fit: BoxFit.cover,
alignment: const Alignment(0.0, 0.0),
errorBuilder: (context, error, stackTrace) =>
Image.asset(
'assets/images/error_image.svg',
width: 300.0,
height: 200.0,
fit: BoxFit.cover,
alignment: const Alignment(0.0, 0.0),
),
),
),
),
),
),
),
),
),
],
),
Column(
mainAxisSize: MainAxisSize.max,
mainAxisAlignment: MainAxisAlignment.center,
children: [
Text(
valueOrDefault<String>(
functions.convertToUppercase(FFAppState().local),
'NOME DO LOCAL',
),
style: FlutterFlowTheme.of(context).labelMedium.override(
fontFamily: 'Nunito',
color: FlutterFlowTheme.of(context).primaryText,
fontSize: 20.0,
letterSpacing: 0.0,
fontWeight: FontWeight.w500,
useGoogleFonts:
GoogleFonts.asMap().containsKey('Nunito'),
),
),
],
),
],
),
),
);
}
}