WIP
This commit is contained in:
parent
74d351de72
commit
518bdf412e
Binary file not shown.
After Width: | Height: | Size: 621 B |
|
@ -1,3 +1,4 @@
|
|||
import 'package:cached_network_image/cached_network_image.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:google_fonts/google_fonts.dart';
|
||||
import 'package:provider/provider.dart';
|
||||
|
@ -71,68 +72,57 @@ class _LocalProfileComponentWidgetState
|
|||
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(
|
||||
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(
|
||||
'https://freaccess.com.br/freaccess/Images/Clients/${AppState().cliUUID}.png',
|
||||
child: CachedNetworkImage(
|
||||
imageUrl:
|
||||
'https://freaccess.com.br/freaccess/Images/Clients/${AppState().cliUUID}.png',
|
||||
width: 80.0,
|
||||
height: 80.0,
|
||||
fit: BoxFit.cover,
|
||||
alignment: const Alignment(0.0, 0.0),
|
||||
errorBuilder: (context, error, stackTrace) =>
|
||||
Image.network(
|
||||
'https://storage.googleapis.com/flutterflow-io-6f20.appspot.com/projects/flutter-freaccess-hub-0xgz9q/assets/7ftdetkzc3s0/360_F_64676383_LdbmhiNM6Ypzb3FM4PPuFP9rHe7ri8Ju.jpg',
|
||||
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'),
|
||||
),
|
||||
)),
|
||||
),
|
||||
// errorListener: (Easing) => log(Easing.toString()),
|
||||
errorWidget: (_, __, ___) =>
|
||||
Image.asset('assets/images/error_image.svg'),
|
||||
),
|
||||
)),
|
||||
),
|
||||
),
|
||||
Column(
|
||||
mainAxisSize: MainAxisSize.max,
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
Text(
|
||||
valueOrDefault<String>(
|
||||
functions.convertToUppercase(AppState().local),
|
||||
'NOME DO LOCAL',
|
||||
Text(
|
||||
valueOrDefault<String>(
|
||||
functions.convertToUppercase(AppState().local),
|
||||
'NOME DO LOCAL',
|
||||
),
|
||||
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'),
|
||||
),
|
||||
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))
|
||||
|
|
|
@ -50,7 +50,7 @@ class _HomePageWidgetState extends State<HomePageWidget> {
|
|||
AppState().whatsapp = value.jsonBody['whatsapp'];
|
||||
AppState().provisional = value.jsonBody['provisional'];
|
||||
} else {
|
||||
DialogUtil.errorDefault(context);
|
||||
await DialogUtil.warningDefault(context);
|
||||
}
|
||||
});
|
||||
}();
|
||||
|
@ -164,7 +164,6 @@ class _HomePageWidgetState extends State<HomePageWidget> {
|
|||
item: MenuItem.button,
|
||||
),
|
||||
),
|
||||
|
||||
// Align(
|
||||
// alignment: const AlignmentDirectional(0.0, 0.0),
|
||||
// child: Provider<MessageWellNotifier>(
|
||||
|
@ -177,7 +176,6 @@ class _HomePageWidgetState extends State<HomePageWidget> {
|
|||
// ),
|
||||
// ),
|
||||
//footer
|
||||
|
||||
const SizedBox(
|
||||
height: 100,
|
||||
width: double.infinity,
|
||||
|
@ -249,8 +247,8 @@ class _HomePageWidgetState extends State<HomePageWidget> {
|
|||
60.0, 15.0, 0.0, 0.0),
|
||||
child: ClipRRect(
|
||||
borderRadius: BorderRadius.circular(8.0),
|
||||
child: Image.network(
|
||||
'https://storage.googleapis.com/flutterflow-io-6f20.appspot.com/projects/flutter-freaccess-hub-0xgz9q/assets/8r2vsbd9i03k/logo.png',
|
||||
child: Image.asset(
|
||||
'assets/images/logo.png',
|
||||
width: 50.0,
|
||||
height: 200.0,
|
||||
fit: BoxFit.none,
|
||||
|
@ -264,9 +262,7 @@ class _HomePageWidgetState extends State<HomePageWidget> {
|
|||
padding: const EdgeInsetsDirectional.fromSTEB(
|
||||
0.0, 15.0, 0.0, 0.0),
|
||||
child: Text(
|
||||
FFLocalizations.of(context).getText(
|
||||
'rg9pzkpz' /* FRE ACCESS */,
|
||||
),
|
||||
'FRE ACCESS',
|
||||
style: FlutterFlowTheme.of(context)
|
||||
.bodyMedium
|
||||
.override(
|
||||
|
@ -287,28 +283,28 @@ class _HomePageWidgetState extends State<HomePageWidget> {
|
|||
),
|
||||
),
|
||||
),
|
||||
Align(
|
||||
alignment: const AlignmentDirectional(0.0, 1.0),
|
||||
child: Container(
|
||||
width: 100.0,
|
||||
height: 50.0,
|
||||
decoration: const BoxDecoration(),
|
||||
child: Align(
|
||||
alignment: const AlignmentDirectional(1.0, 1.0),
|
||||
child: FlutterFlowIconButton(
|
||||
borderRadius: 20.0,
|
||||
borderWidth: 1.0,
|
||||
buttonSize: 40.0,
|
||||
icon: Icon(
|
||||
Icons.notifications_sharp,
|
||||
color: FlutterFlowTheme.of(context).info,
|
||||
size: 24.0,
|
||||
),
|
||||
onPressed: () {},
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
// Align(
|
||||
// alignment: const AlignmentDirectional(0.0, 1.0),
|
||||
// child: Container(
|
||||
// width: 100.0,
|
||||
// height: 50.0,
|
||||
// decoration: const BoxDecoration(),
|
||||
// child: Align(
|
||||
// alignment: const AlignmentDirectional(1.0, 1.0),
|
||||
// child: FlutterFlowIconButton(
|
||||
// borderRadius: 20.0,
|
||||
// borderWidth: 1.0,
|
||||
// buttonSize: 40.0,
|
||||
// icon: Icon(
|
||||
// Icons.notifications_sharp,
|
||||
// color: FlutterFlowTheme.of(context).info,
|
||||
// size: 24.0,
|
||||
// ),
|
||||
// onPressed: () {},
|
||||
// ),
|
||||
// ),
|
||||
// ),
|
||||
// ),
|
||||
],
|
||||
),
|
||||
),
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:hub/components/molecular_components/throw_exception/throw_exception_widget.dart';
|
||||
import 'package:hub/flutter_flow/flutter_flow_util.dart';
|
||||
|
@ -8,24 +7,33 @@ class DialogUtil {
|
|||
static const double _height = 350;
|
||||
|
||||
static Future<dynamic> errorDefault(BuildContext context) {
|
||||
return error(context, FFLocalizations.of(context).getVariableText(
|
||||
ptText: "Falha ao efetuar operação, Tente Novamente mais tarde.",
|
||||
enText: "Failed to perform operation, please try again later."
|
||||
));
|
||||
return error(
|
||||
context,
|
||||
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 {
|
||||
return await showDialog(
|
||||
context: context,
|
||||
builder: (context) {
|
||||
return Dialog(
|
||||
child: SizedBox(
|
||||
height: _height,
|
||||
child: Padding(padding: MediaQuery.viewInsetsOf(context), child: ThrowExceptionWidget(msg: message, type: EnumThrowException.error))
|
||||
)
|
||||
);
|
||||
}
|
||||
);
|
||||
context: context,
|
||||
builder: (context) {
|
||||
return Dialog(
|
||||
child: SizedBox(
|
||||
height: _height,
|
||||
child: Padding(
|
||||
padding: MediaQuery.viewInsetsOf(context),
|
||||
child: ThrowExceptionWidget(
|
||||
msg: message, type: EnumThrowException.error))));
|
||||
});
|
||||
}
|
||||
|
||||
static Future<dynamic> warning(BuildContext context, String message) async {
|
||||
|
@ -35,11 +43,11 @@ class DialogUtil {
|
|||
return Dialog(
|
||||
child: SizedBox(
|
||||
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 {
|
||||
|
@ -49,11 +57,10 @@ class DialogUtil {
|
|||
return Dialog(
|
||||
child: SizedBox(
|
||||
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))));
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue