168 lines
6.2 KiB
Dart
168 lines
6.2 KiB
Dart
import '/flutter_flow/flutter_flow_icon_button.dart';
|
|
import '/flutter_flow/flutter_flow_theme.dart';
|
|
import '/flutter_flow/flutter_flow_util.dart';
|
|
import 'package:flutter/material.dart';
|
|
import 'package:google_fonts/google_fonts.dart';
|
|
import 'preferences_page_model.dart';
|
|
export 'preferences_page_model.dart';
|
|
|
|
class PreferencesPageWidget extends StatefulWidget {
|
|
const PreferencesPageWidget({super.key});
|
|
|
|
@override
|
|
State<PreferencesPageWidget> createState() => _PreferencesPageWidgetState();
|
|
}
|
|
|
|
class _PreferencesPageWidgetState extends State<PreferencesPageWidget> {
|
|
late PreferencesPageModel _model;
|
|
|
|
final scaffoldKey = GlobalKey<ScaffoldState>();
|
|
|
|
@override
|
|
void initState() {
|
|
super.initState();
|
|
_model = createModel(context, () => PreferencesPageModel());
|
|
}
|
|
|
|
@override
|
|
void dispose() {
|
|
_model.dispose();
|
|
|
|
super.dispose();
|
|
}
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
return GestureDetector(
|
|
onTap: () => _model.unfocusNode.canRequestFocus
|
|
? FocusScope.of(context).requestFocus(_model.unfocusNode)
|
|
: FocusScope.of(context).unfocus(),
|
|
child: Scaffold(
|
|
key: scaffoldKey,
|
|
backgroundColor: FlutterFlowTheme.of(context).primaryBackground,
|
|
appBar: AppBar(
|
|
backgroundColor: FlutterFlowTheme.of(context).primaryBackground,
|
|
automaticallyImplyLeading: false,
|
|
title: Text(
|
|
FFLocalizations.of(context).getText(
|
|
'1vyj6y7n' /* Preferencias */,
|
|
),
|
|
style: FlutterFlowTheme.of(context).headlineMedium.override(
|
|
fontFamily: 'Nunito',
|
|
color: FlutterFlowTheme.of(context).primaryText,
|
|
fontSize: 17.0,
|
|
letterSpacing: 0.0,
|
|
useGoogleFonts: GoogleFonts.asMap().containsKey('Nunito'),
|
|
),
|
|
),
|
|
actions: const [],
|
|
centerTitle: true,
|
|
elevation: 0.0,
|
|
),
|
|
body: SafeArea(
|
|
top: true,
|
|
child: Column(
|
|
mainAxisSize: MainAxisSize.max,
|
|
mainAxisAlignment: MainAxisAlignment.center,
|
|
children: [
|
|
Padding(
|
|
padding: const EdgeInsetsDirectional.fromSTEB(20.0, 0.0, 20.0, 0.0),
|
|
child: GridView(
|
|
padding: const EdgeInsets.fromLTRB(
|
|
0,
|
|
20.0,
|
|
0,
|
|
20.0,
|
|
),
|
|
gridDelegate: const SliverGridDelegateWithFixedCrossAxisCount(
|
|
crossAxisCount: 3,
|
|
crossAxisSpacing: 10.0,
|
|
mainAxisSpacing: 10.0,
|
|
childAspectRatio: 1.0,
|
|
),
|
|
shrinkWrap: true,
|
|
scrollDirection: Axis.vertical,
|
|
children: [
|
|
FlutterFlowIconButton(
|
|
borderRadius: 20.0,
|
|
borderWidth: 1.0,
|
|
buttonSize: double.infinity,
|
|
fillColor: FlutterFlowTheme.of(context).primary,
|
|
disabledColor: FlutterFlowTheme.of(context).alternate,
|
|
disabledIconColor: FlutterFlowTheme.of(context).primary,
|
|
icon: Icon(
|
|
Icons.fingerprint,
|
|
color: FlutterFlowTheme.of(context).primaryBackground,
|
|
size: 40.0,
|
|
),
|
|
onPressed: _model.fingerprint
|
|
? null
|
|
: () {
|
|
print('IconButton pressed ...');
|
|
},
|
|
),
|
|
FlutterFlowIconButton(
|
|
borderRadius: 20.0,
|
|
borderWidth: 1.0,
|
|
buttonSize: 40.0,
|
|
fillColor: FlutterFlowTheme.of(context).primary,
|
|
disabledColor: FlutterFlowTheme.of(context).alternate,
|
|
disabledIconColor: FlutterFlowTheme.of(context).primary,
|
|
icon: Icon(
|
|
Icons.person,
|
|
color: FlutterFlowTheme.of(context).primaryBackground,
|
|
size: 40.0,
|
|
),
|
|
onPressed: _model.person!
|
|
? null
|
|
: () {
|
|
print('IconButton pressed ...');
|
|
},
|
|
),
|
|
FlutterFlowIconButton(
|
|
borderRadius: 20.0,
|
|
borderWidth: 1.0,
|
|
buttonSize: 40.0,
|
|
fillColor: FlutterFlowTheme.of(context).primary,
|
|
disabledColor: FlutterFlowTheme.of(context).alternate,
|
|
disabledIconColor: FlutterFlowTheme.of(context).primary,
|
|
icon: Icon(
|
|
Icons.notifications_active,
|
|
color: FlutterFlowTheme.of(context).primaryBackground,
|
|
size: 40.0,
|
|
),
|
|
onPressed: _model.notify!
|
|
? null
|
|
: () {
|
|
print('IconButton pressed ...');
|
|
},
|
|
),
|
|
FlutterFlowIconButton(
|
|
borderRadius: 20.0,
|
|
borderWidth: 1.0,
|
|
buttonSize: 40.0,
|
|
fillColor: FlutterFlowTheme.of(context).primary,
|
|
disabledColor: FlutterFlowTheme.of(context).alternate,
|
|
disabledIconColor: FlutterFlowTheme.of(context).primary,
|
|
icon: Icon(
|
|
Icons.password_sharp,
|
|
color: FlutterFlowTheme.of(context).primaryBackground,
|
|
size: 40.0,
|
|
),
|
|
onPressed: _model.changPass!
|
|
? null
|
|
: () {
|
|
print('IconButton pressed ...');
|
|
},
|
|
),
|
|
],
|
|
),
|
|
),
|
|
],
|
|
),
|
|
),
|
|
),
|
|
);
|
|
}
|
|
}
|