import '/flutter_flow/flutter_flow_theme.dart'; import '/flutter_flow/flutter_flow_util.dart'; import '/flutter_flow/flutter_flow_widgets.dart'; import 'package:flutter/material.dart'; import 'package:google_fonts/google_fonts.dart'; import 'package:provider/provider.dart'; import 'setting_model.dart'; export 'setting_model.dart'; class SettingWidget extends StatefulWidget { const SettingWidget({super.key}); @override State createState() => _SettingWidgetState(); } class _SettingWidgetState extends State { late SettingModel _model; final scaffoldKey = GlobalKey(); @override void initState() { super.initState(); _model = createModel(context, () => SettingModel()); } @override void dispose() { _model.dispose(); super.dispose(); } @override Widget build(BuildContext context) { return Scaffold( key: scaffoldKey, backgroundColor: FlutterFlowTheme.of(context).secondaryBackground, appBar: AppBar( backgroundColor: FlutterFlowTheme.of(context).secondaryBackground, automaticallyImplyLeading: false, title: Text( 'Settings Page', style: FlutterFlowTheme.of(context).headlineSmall.override( fontFamily: 'Inter Tight', letterSpacing: 0.0, ), ), actions: [], centerTitle: false, elevation: 0.0, ), body: Column( mainAxisSize: MainAxisSize.max, children: [ Padding( padding: EdgeInsetsDirectional.fromSTEB(20.0, 0.0, 20.0, 0.0), child: Row( mainAxisSize: MainAxisSize.max, children: [ Expanded( child: Text( 'Choose what notifcations you want to recieve below and we will update the settings.', style: FlutterFlowTheme.of(context).labelMedium.override( fontFamily: 'Inter', letterSpacing: 0.0, ), ), ), ], ), ), Padding( padding: EdgeInsetsDirectional.fromSTEB(0.0, 12.0, 0.0, 0.0), child: SwitchListTile.adaptive( value: _model.switchListTileValue1 ??= true, onChanged: (newValue) async { safeSetState(() => _model.switchListTileValue1 = newValue!); }, title: Text( 'Push Notifications', style: FlutterFlowTheme.of(context).bodyLarge.override( fontFamily: 'Inter', letterSpacing: 0.0, lineHeight: 2.0, ), ), subtitle: Text( 'Receive Push notifications from our application on a semi regular basis.', style: FlutterFlowTheme.of(context).bodyMedium.override( fontFamily: 'Inter', color: Color(0xFF8B97A2), letterSpacing: 0.0, ), ), tileColor: FlutterFlowTheme.of(context).secondaryBackground, activeColor: Color(0xFFEF3939), activeTrackColor: Color(0x4CEF3939), dense: false, controlAffinity: ListTileControlAffinity.trailing, contentPadding: EdgeInsetsDirectional.fromSTEB(24.0, 12.0, 24.0, 12.0), ), ), SwitchListTile.adaptive( value: _model.switchListTileValue2 ??= true, onChanged: (newValue) async { safeSetState(() => _model.switchListTileValue2 = newValue!); }, title: Text( 'Email Notifications', style: FlutterFlowTheme.of(context).bodyLarge.override( fontFamily: 'Inter', letterSpacing: 0.0, lineHeight: 2.0, ), ), subtitle: Text( 'Receive email notifications from our marketing team about new features.', style: FlutterFlowTheme.of(context).bodyMedium.override( fontFamily: 'Inter', color: Color(0xFF8B97A2), letterSpacing: 0.0, ), ), tileColor: FlutterFlowTheme.of(context).secondaryBackground, activeColor: Color(0xFFEF3939), activeTrackColor: Color(0x4CEF3939), dense: false, controlAffinity: ListTileControlAffinity.trailing, contentPadding: EdgeInsetsDirectional.fromSTEB(24.0, 12.0, 24.0, 12.0), ), SwitchListTile.adaptive( value: _model.switchListTileValue3 ??= true, onChanged: (newValue) async { safeSetState(() => _model.switchListTileValue3 = newValue!); }, title: Text( 'Location Services', style: FlutterFlowTheme.of(context).bodyLarge.override( fontFamily: 'Inter', letterSpacing: 0.0, lineHeight: 2.0, ), ), subtitle: Text( 'Allow us to track your location, this helps keep track of spending and keeps you safe.', style: FlutterFlowTheme.of(context).bodyMedium.override( fontFamily: 'Inter', color: Color(0xFF8B97A2), letterSpacing: 0.0, ), ), tileColor: FlutterFlowTheme.of(context).secondaryBackground, activeColor: Color(0xFFEF3939), activeTrackColor: Color(0x4CEF5239), dense: false, controlAffinity: ListTileControlAffinity.trailing, contentPadding: EdgeInsetsDirectional.fromSTEB(24.0, 12.0, 24.0, 12.0), ), ], ), ); } }