first commit
This commit is contained in:
BIN
lib/settings/.DS_Store
vendored
Normal file
BIN
lib/settings/.DS_Store
vendored
Normal file
Binary file not shown.
78
lib/settings/enquiry/enquiry_model.dart
Normal file
78
lib/settings/enquiry/enquiry_model.dart
Normal file
@@ -0,0 +1,78 @@
|
||||
import '/components/appbar_widget.dart';
|
||||
import '/components/nav_bar1_widget.dart';
|
||||
import '/flutterlib/flutter_drop_down.dart';
|
||||
import '/flutterlib/flutter_theme.dart';
|
||||
import '/flutterlib/flutter_util.dart';
|
||||
import '/flutterlib/flutter_widgets.dart';
|
||||
import '/flutterlib/form_field_controller.dart';
|
||||
import 'enquiry_widget.dart' show EnquiryWidget;
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter/services.dart';
|
||||
import 'package:flutter_svg/flutter_svg.dart';
|
||||
import 'package:google_fonts/google_fonts.dart';
|
||||
import 'package:provider/provider.dart';
|
||||
|
||||
class EnquiryModel extends FlutterModel<EnquiryWidget> {
|
||||
/// State fields for stateful widgets in this page.
|
||||
|
||||
final unfocusNode = FocusNode();
|
||||
// State field(s) for TextField widget.
|
||||
FocusNode? textFieldFocusNode1;
|
||||
TextEditingController? textController1;
|
||||
String? Function(BuildContext, String?)? textController1Validator;
|
||||
// State field(s) for TextField widget.
|
||||
FocusNode? textFieldFocusNode2;
|
||||
TextEditingController? textController2;
|
||||
String? Function(BuildContext, String?)? textController2Validator;
|
||||
// State field(s) for TextField widget.
|
||||
FocusNode? textFieldFocusNode3;
|
||||
TextEditingController? textController3;
|
||||
String? Function(BuildContext, String?)? textController3Validator;
|
||||
// State field(s) for DropDown widget.
|
||||
String? dropDownValue;
|
||||
FormFieldController<String>? dropDownValueController;
|
||||
// State field(s) for TextField widget.
|
||||
FocusNode? textFieldFocusNode4;
|
||||
TextEditingController? textController4;
|
||||
String? Function(BuildContext, String?)? textController4Validator;
|
||||
// State field(s) for TextField widget.
|
||||
FocusNode? textFieldFocusNode5;
|
||||
TextEditingController? textController5;
|
||||
String? Function(BuildContext, String?)? textController5Validator;
|
||||
// Model for NavBar1 component.
|
||||
late NavBar1Model navBar1Model;
|
||||
// Model for appbar component.
|
||||
late AppbarModel appbarModel;
|
||||
|
||||
/// Initialization and disposal methods.
|
||||
|
||||
void initState(BuildContext context) {
|
||||
navBar1Model = createModel(context, () => NavBar1Model());
|
||||
appbarModel = createModel(context, () => AppbarModel());
|
||||
}
|
||||
|
||||
void dispose() {
|
||||
unfocusNode.dispose();
|
||||
textFieldFocusNode1?.dispose();
|
||||
textController1?.dispose();
|
||||
|
||||
textFieldFocusNode2?.dispose();
|
||||
textController2?.dispose();
|
||||
|
||||
textFieldFocusNode3?.dispose();
|
||||
textController3?.dispose();
|
||||
|
||||
textFieldFocusNode4?.dispose();
|
||||
textController4?.dispose();
|
||||
|
||||
textFieldFocusNode5?.dispose();
|
||||
textController5?.dispose();
|
||||
|
||||
navBar1Model.dispose();
|
||||
appbarModel.dispose();
|
||||
}
|
||||
|
||||
/// Action blocks are added here.
|
||||
|
||||
/// Additional helper methods are added here.
|
||||
}
|
||||
1340
lib/settings/enquiry/enquiry_widget.dart
Normal file
1340
lib/settings/enquiry/enquiry_widget.dart
Normal file
File diff suppressed because it is too large
Load Diff
42
lib/settings/language/language_model.dart
Normal file
42
lib/settings/language/language_model.dart
Normal file
@@ -0,0 +1,42 @@
|
||||
import '/components/appbar_widget.dart';
|
||||
import '/components/nav_bar1_widget.dart';
|
||||
import '/flutterlib/flutter_theme.dart';
|
||||
import '/flutterlib/flutter_util.dart';
|
||||
import '/flutterlib/flutter_widgets.dart';
|
||||
import 'language_widget.dart' show LanguageWidget;
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter/services.dart';
|
||||
import 'package:flutter_svg/flutter_svg.dart';
|
||||
import 'package:google_fonts/google_fonts.dart';
|
||||
import 'package:provider/provider.dart';
|
||||
|
||||
class LanguageModel extends FlutterModel<LanguageWidget> {
|
||||
/// State fields for stateful widgets in this page.
|
||||
|
||||
final unfocusNode = FocusNode();
|
||||
// State field(s) for Checkbox widget.
|
||||
bool? checkboxValue1;
|
||||
// State field(s) for Checkbox widget.
|
||||
bool? checkboxValue2;
|
||||
// Model for NavBar1 component.
|
||||
late NavBar1Model navBar1Model;
|
||||
// Model for appbar component.
|
||||
late AppbarModel appbarModel;
|
||||
|
||||
/// Initialization and disposal methods.
|
||||
|
||||
void initState(BuildContext context) {
|
||||
navBar1Model = createModel(context, () => NavBar1Model());
|
||||
appbarModel = createModel(context, () => AppbarModel());
|
||||
}
|
||||
|
||||
void dispose() {
|
||||
unfocusNode.dispose();
|
||||
navBar1Model.dispose();
|
||||
appbarModel.dispose();
|
||||
}
|
||||
|
||||
/// Action blocks are added here.
|
||||
|
||||
/// Additional helper methods are added here.
|
||||
}
|
||||
727
lib/settings/language/language_widget.dart
Normal file
727
lib/settings/language/language_widget.dart
Normal file
@@ -0,0 +1,727 @@
|
||||
import '/components/appbar_widget.dart';
|
||||
import '/components/nav_bar1_widget.dart';
|
||||
import '/flutterlib/flutter_theme.dart';
|
||||
import '/flutterlib/flutter_util.dart';
|
||||
import '/flutterlib/flutter_widgets.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter/services.dart';
|
||||
import 'package:flutter_svg/flutter_svg.dart';
|
||||
import 'package:google_fonts/google_fonts.dart';
|
||||
import 'package:provider/provider.dart';
|
||||
import 'language_model.dart';
|
||||
export 'language_model.dart';
|
||||
|
||||
class LanguageWidget extends StatefulWidget {
|
||||
const LanguageWidget({Key? key}) : super(key: key);
|
||||
|
||||
@override
|
||||
_LanguageWidgetState createState() => _LanguageWidgetState();
|
||||
}
|
||||
|
||||
class _LanguageWidgetState extends State<LanguageWidget> {
|
||||
late LanguageModel _model;
|
||||
|
||||
final scaffoldKey = GlobalKey<ScaffoldState>();
|
||||
|
||||
@override
|
||||
void initState() {
|
||||
super.initState();
|
||||
_model = createModel(context, () => LanguageModel());
|
||||
}
|
||||
|
||||
@override
|
||||
void dispose() {
|
||||
_model.dispose();
|
||||
|
||||
super.dispose();
|
||||
}
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
if (isiOS) {
|
||||
SystemChrome.setSystemUIOverlayStyle(
|
||||
SystemUiOverlayStyle(
|
||||
statusBarBrightness: Theme.of(context).brightness,
|
||||
systemStatusBarContrastEnforced: true,
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
context.watch<FFAppState>();
|
||||
|
||||
return GestureDetector(
|
||||
onTap: () => _model.unfocusNode.canRequestFocus
|
||||
? FocusScope.of(context).requestFocus(_model.unfocusNode)
|
||||
: FocusScope.of(context).unfocus(),
|
||||
child: Scaffold(
|
||||
key: scaffoldKey,
|
||||
backgroundColor: Color(0xFFEBEBE4),
|
||||
drawer: Container(
|
||||
width: 180.0,
|
||||
child: Drawer(
|
||||
elevation: 16.0,
|
||||
child: Container(
|
||||
width: 100.0,
|
||||
height: 100.0,
|
||||
decoration: BoxDecoration(
|
||||
color: Color(0xFF009B9A),
|
||||
),
|
||||
child: Column(
|
||||
mainAxisSize: MainAxisSize.max,
|
||||
children: [
|
||||
Padding(
|
||||
padding:
|
||||
EdgeInsetsDirectional.fromSTEB(0.0, 80.0, 0.0, 0.0),
|
||||
child: Row(
|
||||
mainAxisSize: MainAxisSize.max,
|
||||
children: [
|
||||
Container(
|
||||
width: 180.0,
|
||||
height: 61.0,
|
||||
decoration: BoxDecoration(
|
||||
color: Color(0xFF009B9A),
|
||||
),
|
||||
child: InkWell(
|
||||
splashColor: Colors.transparent,
|
||||
focusColor: Colors.transparent,
|
||||
hoverColor: Colors.transparent,
|
||||
highlightColor: Colors.transparent,
|
||||
onTap: () async {
|
||||
context.pushNamed('account');
|
||||
},
|
||||
child: Row(
|
||||
mainAxisSize: MainAxisSize.max,
|
||||
mainAxisAlignment: MainAxisAlignment.start,
|
||||
children: [
|
||||
Padding(
|
||||
padding: EdgeInsetsDirectional.fromSTEB(
|
||||
15.0, 8.0, 0.0, 0.0),
|
||||
child: Container(
|
||||
width: 40.0,
|
||||
height: 40.0,
|
||||
decoration: BoxDecoration(
|
||||
color: FlutterTheme.of(context)
|
||||
.secondaryBackground,
|
||||
shape: BoxShape.circle,
|
||||
),
|
||||
child: Align(
|
||||
alignment: AlignmentDirectional(0.0, 0.0),
|
||||
child: ClipRRect(
|
||||
borderRadius:
|
||||
BorderRadius.circular(8.0),
|
||||
child: SvgPicture.asset(
|
||||
'assets/images/company.svg',
|
||||
width: 30.0,
|
||||
height: 30.0,
|
||||
fit: BoxFit.contain,
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
Padding(
|
||||
padding: EdgeInsetsDirectional.fromSTEB(
|
||||
8.0, 8.0, 0.0, 0.0),
|
||||
child: Text(
|
||||
FFLocalizations.of(context).getText(
|
||||
'5gtxvjov' /* ABC Ltd */,
|
||||
),
|
||||
style: FlutterTheme.of(context)
|
||||
.bodyMedium
|
||||
.override(
|
||||
fontFamily: 'Readex Pro',
|
||||
color: Colors.white,
|
||||
fontSize: 16.0,
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
Container(
|
||||
width: 180.0,
|
||||
height: 61.0,
|
||||
decoration: BoxDecoration(
|
||||
color: Color(0xFF009B9A),
|
||||
),
|
||||
child: InkWell(
|
||||
splashColor: Colors.transparent,
|
||||
focusColor: Colors.transparent,
|
||||
hoverColor: Colors.transparent,
|
||||
highlightColor: Colors.transparent,
|
||||
onTap: () async {
|
||||
context.pushNamed('account1');
|
||||
},
|
||||
child: Row(
|
||||
mainAxisSize: MainAxisSize.max,
|
||||
mainAxisAlignment: MainAxisAlignment.start,
|
||||
children: [
|
||||
ClipRRect(
|
||||
borderRadius: BorderRadius.circular(8.0),
|
||||
child: SvgPicture.asset(
|
||||
'assets/images/Group_2640.svg',
|
||||
width: 0.0,
|
||||
height: 0.0,
|
||||
fit: BoxFit.contain,
|
||||
),
|
||||
),
|
||||
Align(
|
||||
alignment: AlignmentDirectional(0.0, 0.0),
|
||||
child: Padding(
|
||||
padding: EdgeInsetsDirectional.fromSTEB(
|
||||
5.0, 0.0, 0.0, 0.0),
|
||||
child: ClipRRect(
|
||||
borderRadius: BorderRadius.circular(8.0),
|
||||
child: Image.asset(
|
||||
'assets/images/account.png',
|
||||
width: 50.0,
|
||||
height: 50.0,
|
||||
fit: BoxFit.cover,
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
Padding(
|
||||
padding: EdgeInsetsDirectional.fromSTEB(
|
||||
8.0, 0.0, 0.0, 0.0),
|
||||
child: Text(
|
||||
FFLocalizations.of(context).getText(
|
||||
'9do5xcnm' /* Account */,
|
||||
),
|
||||
style: FlutterTheme.of(context)
|
||||
.bodyMedium
|
||||
.override(
|
||||
fontFamily: 'Readex Pro',
|
||||
color: Colors.white,
|
||||
fontSize: 16.0,
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
Container(
|
||||
width: 180.0,
|
||||
height: 61.0,
|
||||
decoration: BoxDecoration(
|
||||
color: Color(0xFF009B9A),
|
||||
),
|
||||
child: InkWell(
|
||||
splashColor: Colors.transparent,
|
||||
focusColor: Colors.transparent,
|
||||
hoverColor: Colors.transparent,
|
||||
highlightColor: Colors.transparent,
|
||||
onTap: () async {
|
||||
context.pushNamed('tnc');
|
||||
},
|
||||
child: Row(
|
||||
mainAxisSize: MainAxisSize.max,
|
||||
mainAxisAlignment: MainAxisAlignment.start,
|
||||
children: [
|
||||
ClipRRect(
|
||||
borderRadius: BorderRadius.circular(8.0),
|
||||
child: SvgPicture.asset(
|
||||
'assets/images/document.svg',
|
||||
width: 0.0,
|
||||
height: 0.0,
|
||||
fit: BoxFit.contain,
|
||||
),
|
||||
),
|
||||
Align(
|
||||
alignment: AlignmentDirectional(0.0, 0.0),
|
||||
child: Padding(
|
||||
padding: EdgeInsetsDirectional.fromSTEB(
|
||||
16.0, 0.0, 0.0, 0.0),
|
||||
child: ClipRRect(
|
||||
borderRadius: BorderRadius.circular(8.0),
|
||||
child: SvgPicture.asset(
|
||||
'assets/images/tnc.svg',
|
||||
width: 30.0,
|
||||
height: 30.0,
|
||||
fit: BoxFit.cover,
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
Padding(
|
||||
padding: EdgeInsetsDirectional.fromSTEB(
|
||||
17.0, 0.0, 0.0, 0.0),
|
||||
child: Text(
|
||||
FFLocalizations.of(context).getText(
|
||||
'y1flaaot' /* T&C */,
|
||||
),
|
||||
style: FlutterTheme.of(context)
|
||||
.bodyMedium
|
||||
.override(
|
||||
fontFamily: 'Readex Pro',
|
||||
color: Colors.white,
|
||||
fontSize: 16.0,
|
||||
),
|
||||
),
|
||||
),
|
||||
ClipRRect(
|
||||
borderRadius: BorderRadius.circular(8.0),
|
||||
child: SvgPicture.asset(
|
||||
'assets/images/Group_2640.svg',
|
||||
width: 0.0,
|
||||
height: 0.0,
|
||||
fit: BoxFit.fitHeight,
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
Container(
|
||||
width: 180.0,
|
||||
height: 61.0,
|
||||
decoration: BoxDecoration(
|
||||
color: Color(0xFF009B9A),
|
||||
),
|
||||
child: InkWell(
|
||||
splashColor: Colors.transparent,
|
||||
focusColor: Colors.transparent,
|
||||
hoverColor: Colors.transparent,
|
||||
highlightColor: Colors.transparent,
|
||||
onTap: () async {
|
||||
context.pushNamed('policy');
|
||||
},
|
||||
child: Row(
|
||||
mainAxisSize: MainAxisSize.max,
|
||||
mainAxisAlignment: MainAxisAlignment.start,
|
||||
children: [
|
||||
ClipRRect(
|
||||
borderRadius: BorderRadius.circular(8.0),
|
||||
child: SvgPicture.asset(
|
||||
'assets/images/Group_2640.svg',
|
||||
width: 0.0,
|
||||
height: 0.0,
|
||||
fit: BoxFit.contain,
|
||||
),
|
||||
),
|
||||
Align(
|
||||
alignment: AlignmentDirectional(0.0, 0.0),
|
||||
child: Padding(
|
||||
padding: EdgeInsetsDirectional.fromSTEB(
|
||||
16.0, 0.0, 0.0, 0.0),
|
||||
child: ClipRRect(
|
||||
borderRadius: BorderRadius.circular(8.0),
|
||||
child: SvgPicture.asset(
|
||||
'assets/images/pp.svg',
|
||||
width: 30.0,
|
||||
height: 30.0,
|
||||
fit: BoxFit.cover,
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
Padding(
|
||||
padding: EdgeInsetsDirectional.fromSTEB(
|
||||
16.0, 0.0, 0.0, 0.0),
|
||||
child: Text(
|
||||
FFLocalizations.of(context).getText(
|
||||
'itkijhjm' /* Privacy
|
||||
Policy */
|
||||
,
|
||||
),
|
||||
style: FlutterTheme.of(context)
|
||||
.bodyMedium
|
||||
.override(
|
||||
fontFamily: 'Readex Pro',
|
||||
color: Colors.white,
|
||||
fontSize: 16.0,
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
Container(
|
||||
width: 180.0,
|
||||
height: 61.0,
|
||||
decoration: BoxDecoration(
|
||||
color: Color(0xFF009B9A),
|
||||
),
|
||||
child: InkWell(
|
||||
splashColor: Colors.transparent,
|
||||
focusColor: Colors.transparent,
|
||||
hoverColor: Colors.transparent,
|
||||
highlightColor: Colors.transparent,
|
||||
onTap: () async {
|
||||
context.pushNamed('language');
|
||||
},
|
||||
child: Row(
|
||||
mainAxisSize: MainAxisSize.max,
|
||||
mainAxisAlignment: MainAxisAlignment.start,
|
||||
children: [
|
||||
ClipRRect(
|
||||
borderRadius: BorderRadius.circular(8.0),
|
||||
child: SvgPicture.asset(
|
||||
'assets/images/Group_2640.svg',
|
||||
width: 0.0,
|
||||
height: 0.0,
|
||||
fit: BoxFit.contain,
|
||||
),
|
||||
),
|
||||
Align(
|
||||
alignment: AlignmentDirectional(0.0, 0.0),
|
||||
child: Padding(
|
||||
padding: EdgeInsetsDirectional.fromSTEB(
|
||||
16.0, 0.0, 0.0, 0.0),
|
||||
child: ClipRRect(
|
||||
borderRadius: BorderRadius.circular(8.0),
|
||||
child: SvgPicture.asset(
|
||||
'assets/images/language.svg',
|
||||
width: 30.0,
|
||||
height: 30.0,
|
||||
fit: BoxFit.contain,
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
Padding(
|
||||
padding: EdgeInsetsDirectional.fromSTEB(
|
||||
15.0, 0.0, 0.0, 0.0),
|
||||
child: Text(
|
||||
FFLocalizations.of(context).getText(
|
||||
'484xe37a' /* Languages */,
|
||||
),
|
||||
style: FlutterTheme.of(context)
|
||||
.bodyMedium
|
||||
.override(
|
||||
fontFamily: 'Readex Pro',
|
||||
color: Colors.white,
|
||||
fontSize: 16.0,
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
Container(
|
||||
width: 180.0,
|
||||
height: 61.0,
|
||||
decoration: BoxDecoration(
|
||||
color: Color(0xFF009B9A),
|
||||
),
|
||||
child: InkWell(
|
||||
splashColor: Colors.transparent,
|
||||
focusColor: Colors.transparent,
|
||||
hoverColor: Colors.transparent,
|
||||
highlightColor: Colors.transparent,
|
||||
onTap: () async {
|
||||
context.pushNamed('setting');
|
||||
},
|
||||
child: Row(
|
||||
mainAxisSize: MainAxisSize.max,
|
||||
mainAxisAlignment: MainAxisAlignment.start,
|
||||
children: [
|
||||
ClipRRect(
|
||||
borderRadius: BorderRadius.circular(8.0),
|
||||
child: SvgPicture.asset(
|
||||
'assets/images/Group_2640.svg',
|
||||
width: 0.0,
|
||||
height: 0.0,
|
||||
fit: BoxFit.contain,
|
||||
),
|
||||
),
|
||||
Align(
|
||||
alignment: AlignmentDirectional(0.0, 0.0),
|
||||
child: Padding(
|
||||
padding: EdgeInsetsDirectional.fromSTEB(
|
||||
16.0, 0.0, 0.0, 0.0),
|
||||
child: ClipRRect(
|
||||
borderRadius: BorderRadius.circular(8.0),
|
||||
child: SvgPicture.asset(
|
||||
'assets/images/setting-2.svg',
|
||||
width: 30.0,
|
||||
height: 30.0,
|
||||
fit: BoxFit.contain,
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
Padding(
|
||||
padding: EdgeInsetsDirectional.fromSTEB(
|
||||
15.0, 0.0, 0.0, 0.0),
|
||||
child: Text(
|
||||
FFLocalizations.of(context).getText(
|
||||
'176la97d' /* Settings */,
|
||||
),
|
||||
style: FlutterTheme.of(context)
|
||||
.bodyMedium
|
||||
.override(
|
||||
fontFamily: 'Readex Pro',
|
||||
color: Colors.white,
|
||||
fontSize: 16.0,
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
appBar: PreferredSize(
|
||||
preferredSize: Size.fromHeight(0.0),
|
||||
child: AppBar(
|
||||
backgroundColor: Color(0xFFE7E36B),
|
||||
automaticallyImplyLeading: false,
|
||||
actions: [],
|
||||
centerTitle: false,
|
||||
elevation: 0.0,
|
||||
),
|
||||
),
|
||||
body: SafeArea(
|
||||
top: true,
|
||||
child: Stack(
|
||||
children: [
|
||||
Align(
|
||||
alignment: AlignmentDirectional(0.0, 0.0),
|
||||
child: Column(
|
||||
mainAxisSize: MainAxisSize.max,
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
Padding(
|
||||
padding:
|
||||
EdgeInsetsDirectional.fromSTEB(0.0, 24.0, 0.0, 0.0),
|
||||
child: Column(
|
||||
mainAxisSize: MainAxisSize.max,
|
||||
mainAxisAlignment: MainAxisAlignment.end,
|
||||
children: [
|
||||
Padding(
|
||||
padding: EdgeInsetsDirectional.fromSTEB(
|
||||
0.0, 60.0, 0.0, 0.0),
|
||||
child: Container(
|
||||
width: () {
|
||||
if (MediaQuery.sizeOf(context).width < 428.0) {
|
||||
return 330.0;
|
||||
} else if (MediaQuery.sizeOf(context).width >=
|
||||
428.0) {
|
||||
return 358.0;
|
||||
} else {
|
||||
return 340.0;
|
||||
}
|
||||
}(),
|
||||
height: 170.0,
|
||||
decoration: BoxDecoration(
|
||||
color: FlutterTheme.of(context)
|
||||
.secondaryBackground,
|
||||
borderRadius: BorderRadius.circular(8.0),
|
||||
),
|
||||
child: Column(
|
||||
mainAxisSize: MainAxisSize.max,
|
||||
children: [
|
||||
Expanded(
|
||||
child: Row(
|
||||
mainAxisSize: MainAxisSize.max,
|
||||
mainAxisAlignment:
|
||||
MainAxisAlignment.start,
|
||||
children: [
|
||||
Padding(
|
||||
padding:
|
||||
EdgeInsetsDirectional.fromSTEB(
|
||||
15.0, 0.0, 0.0, 0.0),
|
||||
child: Text(
|
||||
FFLocalizations.of(context).getText(
|
||||
'qj1agihd' /* English */,
|
||||
),
|
||||
style: FlutterTheme.of(context)
|
||||
.bodyMedium
|
||||
.override(
|
||||
fontFamily: 'Readex Pro',
|
||||
fontSize: 16.0,
|
||||
),
|
||||
),
|
||||
),
|
||||
Expanded(
|
||||
child: Align(
|
||||
alignment:
|
||||
AlignmentDirectional(1.0, 0.0),
|
||||
child: Padding(
|
||||
padding: EdgeInsetsDirectional
|
||||
.fromSTEB(
|
||||
0.0, 0.0, 30.0, 0.0),
|
||||
child: Theme(
|
||||
data: ThemeData(
|
||||
checkboxTheme:
|
||||
CheckboxThemeData(
|
||||
visualDensity:
|
||||
VisualDensity.compact,
|
||||
materialTapTargetSize:
|
||||
MaterialTapTargetSize
|
||||
.shrinkWrap,
|
||||
shape:
|
||||
RoundedRectangleBorder(
|
||||
borderRadius:
|
||||
BorderRadius.circular(
|
||||
4.0),
|
||||
),
|
||||
),
|
||||
unselectedWidgetColor:
|
||||
Colors.white,
|
||||
),
|
||||
child: Checkbox(
|
||||
value: _model
|
||||
.checkboxValue1 ??= true,
|
||||
onChanged: (newValue) async {
|
||||
setState(() =>
|
||||
_model.checkboxValue1 =
|
||||
newValue!);
|
||||
},
|
||||
activeColor: Colors.white,
|
||||
checkColor: Color(0xFF009B9A),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
SizedBox(
|
||||
width: 330.0,
|
||||
child: Divider(
|
||||
thickness: 1.0,
|
||||
color: Color(0xFFE8E8E8),
|
||||
),
|
||||
),
|
||||
Expanded(
|
||||
child: Row(
|
||||
mainAxisSize: MainAxisSize.max,
|
||||
children: [
|
||||
Padding(
|
||||
padding:
|
||||
EdgeInsetsDirectional.fromSTEB(
|
||||
15.0, 0.0, 0.0, 0.0),
|
||||
child: Text(
|
||||
FFLocalizations.of(context).getText(
|
||||
'un274qr2' /* 繁體中文 */,
|
||||
),
|
||||
style: FlutterTheme.of(context)
|
||||
.bodyMedium
|
||||
.override(
|
||||
fontFamily: 'Readex Pro',
|
||||
fontSize: 16.0,
|
||||
),
|
||||
),
|
||||
),
|
||||
Expanded(
|
||||
child: Align(
|
||||
alignment:
|
||||
AlignmentDirectional(1.0, 0.0),
|
||||
child: Padding(
|
||||
padding: EdgeInsetsDirectional
|
||||
.fromSTEB(
|
||||
0.0, 0.0, 30.0, 0.0),
|
||||
child: Theme(
|
||||
data: ThemeData(
|
||||
checkboxTheme:
|
||||
CheckboxThemeData(
|
||||
visualDensity:
|
||||
VisualDensity.compact,
|
||||
materialTapTargetSize:
|
||||
MaterialTapTargetSize
|
||||
.shrinkWrap,
|
||||
shape:
|
||||
RoundedRectangleBorder(
|
||||
borderRadius:
|
||||
BorderRadius.circular(
|
||||
4.0),
|
||||
),
|
||||
),
|
||||
unselectedWidgetColor:
|
||||
Colors.white,
|
||||
),
|
||||
child: Checkbox(
|
||||
value: _model
|
||||
.checkboxValue2 ??= true,
|
||||
onChanged: (newValue) async {
|
||||
setState(() =>
|
||||
_model.checkboxValue2 =
|
||||
newValue!);
|
||||
},
|
||||
activeColor: Colors.white,
|
||||
checkColor: Color(0xFF009B9A),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
Padding(
|
||||
padding:
|
||||
EdgeInsetsDirectional.fromSTEB(0.0, 230.0, 0.0, 0.0),
|
||||
child: FFButtonWidget(
|
||||
onPressed: () {
|
||||
print('Button pressed ...');
|
||||
},
|
||||
text: FFLocalizations.of(context).getText(
|
||||
'9bt7m857' /* Save */,
|
||||
),
|
||||
options: FFButtonOptions(
|
||||
width: 339.0,
|
||||
height: 50.0,
|
||||
padding: EdgeInsetsDirectional.fromSTEB(
|
||||
24.0, 0.0, 24.0, 0.0),
|
||||
iconPadding: EdgeInsetsDirectional.fromSTEB(
|
||||
0.0, 0.0, 0.0, 0.0),
|
||||
color: Color(0xFF9B0025),
|
||||
textStyle:
|
||||
FlutterTheme.of(context).titleSmall.override(
|
||||
fontFamily: 'Readex Pro',
|
||||
color: Colors.white,
|
||||
fontSize: 20.0,
|
||||
),
|
||||
elevation: 3.0,
|
||||
borderSide: BorderSide(
|
||||
color: Colors.transparent,
|
||||
width: 1.0,
|
||||
),
|
||||
borderRadius: BorderRadius.circular(40.0),
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
Align(
|
||||
alignment: AlignmentDirectional(0.0, 1.0),
|
||||
child: wrapWithModel(
|
||||
model: _model.navBar1Model,
|
||||
updateCallback: () => setState(() {}),
|
||||
child: NavBar1Widget(),
|
||||
),
|
||||
),
|
||||
wrapWithModel(
|
||||
model: _model.appbarModel,
|
||||
updateCallback: () => setState(() {}),
|
||||
child: AppbarWidget(),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
43
lib/settings/myenquiry/myenquiry_model.dart
Normal file
43
lib/settings/myenquiry/myenquiry_model.dart
Normal file
@@ -0,0 +1,43 @@
|
||||
import '/components/appbar_widget.dart';
|
||||
import '/components/nav_bar1_widget.dart';
|
||||
import '/flutterlib/flutter_choice_chips.dart';
|
||||
import '/flutterlib/flutter_theme.dart';
|
||||
import '/flutterlib/flutter_util.dart';
|
||||
import '/flutterlib/flutter_widgets.dart';
|
||||
import '/flutterlib/form_field_controller.dart';
|
||||
import 'myenquiry_widget.dart' show MyenquiryWidget;
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter/services.dart';
|
||||
import 'package:flutter_svg/flutter_svg.dart';
|
||||
import 'package:google_fonts/google_fonts.dart';
|
||||
import 'package:provider/provider.dart';
|
||||
|
||||
class MyenquiryModel extends FlutterModel<MyenquiryWidget> {
|
||||
/// State fields for stateful widgets in this page.
|
||||
|
||||
final unfocusNode = FocusNode();
|
||||
// State field(s) for ChoiceChips widget.
|
||||
String? choiceChipsValue;
|
||||
FormFieldController<List<String>>? choiceChipsValueController;
|
||||
// Model for NavBar1 component.
|
||||
late NavBar1Model navBar1Model;
|
||||
// Model for appbar component.
|
||||
late AppbarModel appbarModel;
|
||||
|
||||
/// Initialization and disposal methods.
|
||||
|
||||
void initState(BuildContext context) {
|
||||
navBar1Model = createModel(context, () => NavBar1Model());
|
||||
appbarModel = createModel(context, () => AppbarModel());
|
||||
}
|
||||
|
||||
void dispose() {
|
||||
unfocusNode.dispose();
|
||||
navBar1Model.dispose();
|
||||
appbarModel.dispose();
|
||||
}
|
||||
|
||||
/// Action blocks are added here.
|
||||
|
||||
/// Additional helper methods are added here.
|
||||
}
|
||||
819
lib/settings/myenquiry/myenquiry_widget.dart
Normal file
819
lib/settings/myenquiry/myenquiry_widget.dart
Normal file
@@ -0,0 +1,819 @@
|
||||
import '/components/appbar_widget.dart';
|
||||
import '/components/nav_bar1_widget.dart';
|
||||
import '/flutterlib/flutter_choice_chips.dart';
|
||||
import '/flutterlib/flutter_theme.dart';
|
||||
import '/flutterlib/flutter_util.dart';
|
||||
import '/flutterlib/flutter_widgets.dart';
|
||||
import '/flutterlib/form_field_controller.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter/services.dart';
|
||||
import 'package:flutter_svg/flutter_svg.dart';
|
||||
import 'package:google_fonts/google_fonts.dart';
|
||||
import 'package:provider/provider.dart';
|
||||
import 'myenquiry_model.dart';
|
||||
export 'myenquiry_model.dart';
|
||||
|
||||
class MyenquiryWidget extends StatefulWidget {
|
||||
const MyenquiryWidget({Key? key}) : super(key: key);
|
||||
|
||||
@override
|
||||
_MyenquiryWidgetState createState() => _MyenquiryWidgetState();
|
||||
}
|
||||
|
||||
class _MyenquiryWidgetState extends State<MyenquiryWidget> {
|
||||
late MyenquiryModel _model;
|
||||
|
||||
final scaffoldKey = GlobalKey<ScaffoldState>();
|
||||
|
||||
@override
|
||||
void initState() {
|
||||
super.initState();
|
||||
_model = createModel(context, () => MyenquiryModel());
|
||||
}
|
||||
|
||||
@override
|
||||
void dispose() {
|
||||
_model.dispose();
|
||||
|
||||
super.dispose();
|
||||
}
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
if (isiOS) {
|
||||
SystemChrome.setSystemUIOverlayStyle(
|
||||
SystemUiOverlayStyle(
|
||||
statusBarBrightness: Theme.of(context).brightness,
|
||||
systemStatusBarContrastEnforced: true,
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
context.watch<FFAppState>();
|
||||
|
||||
return GestureDetector(
|
||||
onTap: () => _model.unfocusNode.canRequestFocus
|
||||
? FocusScope.of(context).requestFocus(_model.unfocusNode)
|
||||
: FocusScope.of(context).unfocus(),
|
||||
child: Scaffold(
|
||||
key: scaffoldKey,
|
||||
backgroundColor: Color(0xFFEBEBE4),
|
||||
drawer: Container(
|
||||
width: 180.0,
|
||||
child: Drawer(
|
||||
elevation: 16.0,
|
||||
child: Container(
|
||||
width: 100.0,
|
||||
height: 100.0,
|
||||
decoration: BoxDecoration(
|
||||
color: Color(0xFF009B9A),
|
||||
),
|
||||
child: Column(
|
||||
mainAxisSize: MainAxisSize.max,
|
||||
children: [
|
||||
Padding(
|
||||
padding:
|
||||
EdgeInsetsDirectional.fromSTEB(0.0, 80.0, 0.0, 0.0),
|
||||
child: Row(
|
||||
mainAxisSize: MainAxisSize.max,
|
||||
children: [
|
||||
Container(
|
||||
width: 180.0,
|
||||
height: 61.0,
|
||||
decoration: BoxDecoration(
|
||||
color: Color(0xFF009B9A),
|
||||
),
|
||||
child: InkWell(
|
||||
splashColor: Colors.transparent,
|
||||
focusColor: Colors.transparent,
|
||||
hoverColor: Colors.transparent,
|
||||
highlightColor: Colors.transparent,
|
||||
onTap: () async {
|
||||
context.pushNamed('account');
|
||||
},
|
||||
child: Row(
|
||||
mainAxisSize: MainAxisSize.max,
|
||||
mainAxisAlignment: MainAxisAlignment.start,
|
||||
children: [
|
||||
Padding(
|
||||
padding: EdgeInsetsDirectional.fromSTEB(
|
||||
15.0, 8.0, 0.0, 0.0),
|
||||
child: Container(
|
||||
width: 40.0,
|
||||
height: 40.0,
|
||||
decoration: BoxDecoration(
|
||||
color: FlutterTheme.of(context)
|
||||
.secondaryBackground,
|
||||
shape: BoxShape.circle,
|
||||
),
|
||||
child: Align(
|
||||
alignment: AlignmentDirectional(0.0, 0.0),
|
||||
child: ClipRRect(
|
||||
borderRadius:
|
||||
BorderRadius.circular(8.0),
|
||||
child: SvgPicture.asset(
|
||||
'assets/images/company.svg',
|
||||
width: 30.0,
|
||||
height: 30.0,
|
||||
fit: BoxFit.contain,
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
Padding(
|
||||
padding: EdgeInsetsDirectional.fromSTEB(
|
||||
8.0, 8.0, 0.0, 0.0),
|
||||
child: Text(
|
||||
FFLocalizations.of(context).getText(
|
||||
'cs7ctifb' /* ABC Ltd */,
|
||||
),
|
||||
style: FlutterTheme.of(context)
|
||||
.bodyMedium
|
||||
.override(
|
||||
fontFamily: 'Readex Pro',
|
||||
color: Colors.white,
|
||||
fontSize: 16.0,
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
Container(
|
||||
width: 180.0,
|
||||
height: 61.0,
|
||||
decoration: BoxDecoration(
|
||||
color: Color(0xFF009B9A),
|
||||
),
|
||||
child: InkWell(
|
||||
splashColor: Colors.transparent,
|
||||
focusColor: Colors.transparent,
|
||||
hoverColor: Colors.transparent,
|
||||
highlightColor: Colors.transparent,
|
||||
onTap: () async {
|
||||
context.pushNamed('account1');
|
||||
},
|
||||
child: Row(
|
||||
mainAxisSize: MainAxisSize.max,
|
||||
mainAxisAlignment: MainAxisAlignment.start,
|
||||
children: [
|
||||
ClipRRect(
|
||||
borderRadius: BorderRadius.circular(8.0),
|
||||
child: SvgPicture.asset(
|
||||
'assets/images/Group_2640.svg',
|
||||
width: 0.0,
|
||||
height: 0.0,
|
||||
fit: BoxFit.contain,
|
||||
),
|
||||
),
|
||||
Align(
|
||||
alignment: AlignmentDirectional(0.0, 0.0),
|
||||
child: Padding(
|
||||
padding: EdgeInsetsDirectional.fromSTEB(
|
||||
5.0, 0.0, 0.0, 0.0),
|
||||
child: ClipRRect(
|
||||
borderRadius: BorderRadius.circular(8.0),
|
||||
child: Image.asset(
|
||||
'assets/images/account.png',
|
||||
width: 50.0,
|
||||
height: 50.0,
|
||||
fit: BoxFit.cover,
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
Padding(
|
||||
padding: EdgeInsetsDirectional.fromSTEB(
|
||||
8.0, 0.0, 0.0, 0.0),
|
||||
child: Text(
|
||||
FFLocalizations.of(context).getText(
|
||||
'v7ifiq92' /* Account */,
|
||||
),
|
||||
style: FlutterTheme.of(context)
|
||||
.bodyMedium
|
||||
.override(
|
||||
fontFamily: 'Readex Pro',
|
||||
color: Colors.white,
|
||||
fontSize: 16.0,
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
Container(
|
||||
width: 180.0,
|
||||
height: 61.0,
|
||||
decoration: BoxDecoration(
|
||||
color: Color(0xFF009B9A),
|
||||
),
|
||||
child: InkWell(
|
||||
splashColor: Colors.transparent,
|
||||
focusColor: Colors.transparent,
|
||||
hoverColor: Colors.transparent,
|
||||
highlightColor: Colors.transparent,
|
||||
onTap: () async {
|
||||
context.pushNamed('tnc');
|
||||
},
|
||||
child: Row(
|
||||
mainAxisSize: MainAxisSize.max,
|
||||
mainAxisAlignment: MainAxisAlignment.start,
|
||||
children: [
|
||||
ClipRRect(
|
||||
borderRadius: BorderRadius.circular(8.0),
|
||||
child: SvgPicture.asset(
|
||||
'assets/images/document.svg',
|
||||
width: 0.0,
|
||||
height: 0.0,
|
||||
fit: BoxFit.contain,
|
||||
),
|
||||
),
|
||||
Align(
|
||||
alignment: AlignmentDirectional(0.0, 0.0),
|
||||
child: Padding(
|
||||
padding: EdgeInsetsDirectional.fromSTEB(
|
||||
16.0, 0.0, 0.0, 0.0),
|
||||
child: ClipRRect(
|
||||
borderRadius: BorderRadius.circular(8.0),
|
||||
child: SvgPicture.asset(
|
||||
'assets/images/tnc.svg',
|
||||
width: 30.0,
|
||||
height: 30.0,
|
||||
fit: BoxFit.cover,
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
Padding(
|
||||
padding: EdgeInsetsDirectional.fromSTEB(
|
||||
17.0, 0.0, 0.0, 0.0),
|
||||
child: Text(
|
||||
FFLocalizations.of(context).getText(
|
||||
'krtv5pcu' /* T&C */,
|
||||
),
|
||||
style: FlutterTheme.of(context)
|
||||
.bodyMedium
|
||||
.override(
|
||||
fontFamily: 'Readex Pro',
|
||||
color: Colors.white,
|
||||
fontSize: 16.0,
|
||||
),
|
||||
),
|
||||
),
|
||||
ClipRRect(
|
||||
borderRadius: BorderRadius.circular(8.0),
|
||||
child: SvgPicture.asset(
|
||||
'assets/images/Group_2640.svg',
|
||||
width: 0.0,
|
||||
height: 0.0,
|
||||
fit: BoxFit.fitHeight,
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
Container(
|
||||
width: 180.0,
|
||||
height: 61.0,
|
||||
decoration: BoxDecoration(
|
||||
color: Color(0xFF009B9A),
|
||||
),
|
||||
child: InkWell(
|
||||
splashColor: Colors.transparent,
|
||||
focusColor: Colors.transparent,
|
||||
hoverColor: Colors.transparent,
|
||||
highlightColor: Colors.transparent,
|
||||
onTap: () async {
|
||||
context.pushNamed('policy');
|
||||
},
|
||||
child: Row(
|
||||
mainAxisSize: MainAxisSize.max,
|
||||
mainAxisAlignment: MainAxisAlignment.start,
|
||||
children: [
|
||||
ClipRRect(
|
||||
borderRadius: BorderRadius.circular(8.0),
|
||||
child: SvgPicture.asset(
|
||||
'assets/images/Group_2640.svg',
|
||||
width: 0.0,
|
||||
height: 0.0,
|
||||
fit: BoxFit.contain,
|
||||
),
|
||||
),
|
||||
Align(
|
||||
alignment: AlignmentDirectional(0.0, 0.0),
|
||||
child: Padding(
|
||||
padding: EdgeInsetsDirectional.fromSTEB(
|
||||
16.0, 0.0, 0.0, 0.0),
|
||||
child: ClipRRect(
|
||||
borderRadius: BorderRadius.circular(8.0),
|
||||
child: SvgPicture.asset(
|
||||
'assets/images/pp.svg',
|
||||
width: 30.0,
|
||||
height: 30.0,
|
||||
fit: BoxFit.cover,
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
Padding(
|
||||
padding: EdgeInsetsDirectional.fromSTEB(
|
||||
16.0, 0.0, 0.0, 0.0),
|
||||
child: Text(
|
||||
FFLocalizations.of(context).getText(
|
||||
'uyu5ayab' /* Privacy
|
||||
Policy */
|
||||
,
|
||||
),
|
||||
style: FlutterTheme.of(context)
|
||||
.bodyMedium
|
||||
.override(
|
||||
fontFamily: 'Readex Pro',
|
||||
color: Colors.white,
|
||||
fontSize: 16.0,
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
Container(
|
||||
width: 180.0,
|
||||
height: 61.0,
|
||||
decoration: BoxDecoration(
|
||||
color: Color(0xFF009B9A),
|
||||
),
|
||||
child: InkWell(
|
||||
splashColor: Colors.transparent,
|
||||
focusColor: Colors.transparent,
|
||||
hoverColor: Colors.transparent,
|
||||
highlightColor: Colors.transparent,
|
||||
onTap: () async {
|
||||
context.pushNamed('language');
|
||||
},
|
||||
child: Row(
|
||||
mainAxisSize: MainAxisSize.max,
|
||||
mainAxisAlignment: MainAxisAlignment.start,
|
||||
children: [
|
||||
ClipRRect(
|
||||
borderRadius: BorderRadius.circular(8.0),
|
||||
child: SvgPicture.asset(
|
||||
'assets/images/Group_2640.svg',
|
||||
width: 0.0,
|
||||
height: 0.0,
|
||||
fit: BoxFit.contain,
|
||||
),
|
||||
),
|
||||
Align(
|
||||
alignment: AlignmentDirectional(0.0, 0.0),
|
||||
child: Padding(
|
||||
padding: EdgeInsetsDirectional.fromSTEB(
|
||||
16.0, 0.0, 0.0, 0.0),
|
||||
child: ClipRRect(
|
||||
borderRadius: BorderRadius.circular(8.0),
|
||||
child: SvgPicture.asset(
|
||||
'assets/images/language.svg',
|
||||
width: 30.0,
|
||||
height: 30.0,
|
||||
fit: BoxFit.contain,
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
Padding(
|
||||
padding: EdgeInsetsDirectional.fromSTEB(
|
||||
15.0, 0.0, 0.0, 0.0),
|
||||
child: Text(
|
||||
FFLocalizations.of(context).getText(
|
||||
'hw4aysgg' /* Languages */,
|
||||
),
|
||||
style: FlutterTheme.of(context)
|
||||
.bodyMedium
|
||||
.override(
|
||||
fontFamily: 'Readex Pro',
|
||||
color: Colors.white,
|
||||
fontSize: 16.0,
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
Container(
|
||||
width: 180.0,
|
||||
height: 61.0,
|
||||
decoration: BoxDecoration(
|
||||
color: Color(0xFF009B9A),
|
||||
),
|
||||
child: InkWell(
|
||||
splashColor: Colors.transparent,
|
||||
focusColor: Colors.transparent,
|
||||
hoverColor: Colors.transparent,
|
||||
highlightColor: Colors.transparent,
|
||||
onTap: () async {
|
||||
context.pushNamed('setting');
|
||||
},
|
||||
child: Row(
|
||||
mainAxisSize: MainAxisSize.max,
|
||||
mainAxisAlignment: MainAxisAlignment.start,
|
||||
children: [
|
||||
ClipRRect(
|
||||
borderRadius: BorderRadius.circular(8.0),
|
||||
child: SvgPicture.asset(
|
||||
'assets/images/Group_2640.svg',
|
||||
width: 0.0,
|
||||
height: 0.0,
|
||||
fit: BoxFit.contain,
|
||||
),
|
||||
),
|
||||
Align(
|
||||
alignment: AlignmentDirectional(0.0, 0.0),
|
||||
child: Padding(
|
||||
padding: EdgeInsetsDirectional.fromSTEB(
|
||||
16.0, 0.0, 0.0, 0.0),
|
||||
child: ClipRRect(
|
||||
borderRadius: BorderRadius.circular(8.0),
|
||||
child: SvgPicture.asset(
|
||||
'assets/images/setting-2.svg',
|
||||
width: 30.0,
|
||||
height: 30.0,
|
||||
fit: BoxFit.contain,
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
Padding(
|
||||
padding: EdgeInsetsDirectional.fromSTEB(
|
||||
15.0, 0.0, 0.0, 0.0),
|
||||
child: Text(
|
||||
FFLocalizations.of(context).getText(
|
||||
'ivd7mirp' /* Settings */,
|
||||
),
|
||||
style: FlutterTheme.of(context)
|
||||
.bodyMedium
|
||||
.override(
|
||||
fontFamily: 'Readex Pro',
|
||||
color: Colors.white,
|
||||
fontSize: 16.0,
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
appBar: PreferredSize(
|
||||
preferredSize: Size.fromHeight(0.0),
|
||||
child: AppBar(
|
||||
backgroundColor: Color(0xFFE7E36B),
|
||||
automaticallyImplyLeading: false,
|
||||
actions: [],
|
||||
centerTitle: false,
|
||||
elevation: 0.0,
|
||||
),
|
||||
),
|
||||
body: SafeArea(
|
||||
top: true,
|
||||
child: Stack(
|
||||
children: [
|
||||
Padding(
|
||||
padding: EdgeInsetsDirectional.fromSTEB(0.0, 100.0, 0.0, 0.0),
|
||||
child: Column(
|
||||
mainAxisSize: MainAxisSize.max,
|
||||
children: [
|
||||
Column(
|
||||
mainAxisSize: MainAxisSize.max,
|
||||
children: [
|
||||
Padding(
|
||||
padding: EdgeInsetsDirectional.fromSTEB(
|
||||
0.0, 16.0, 16.0, 0.0),
|
||||
child: Row(
|
||||
mainAxisSize: MainAxisSize.max,
|
||||
mainAxisAlignment: MainAxisAlignment.end,
|
||||
children: [
|
||||
Align(
|
||||
alignment: AlignmentDirectional(1.0, 0.0),
|
||||
child: FFButtonWidget(
|
||||
onPressed: () async {
|
||||
context.pushNamed('setting');
|
||||
},
|
||||
text: FFLocalizations.of(context).getText(
|
||||
'nbpofa82' /* Leave */,
|
||||
),
|
||||
options: FFButtonOptions(
|
||||
width: 100.0,
|
||||
height: 50.0,
|
||||
padding: EdgeInsetsDirectional.fromSTEB(
|
||||
24.0, 0.0, 24.0, 0.0),
|
||||
iconPadding: EdgeInsetsDirectional.fromSTEB(
|
||||
0.0, 0.0, 0.0, 0.0),
|
||||
color: Color(0xFF9B0025),
|
||||
textStyle: FlutterTheme.of(context)
|
||||
.titleSmall
|
||||
.override(
|
||||
fontFamily: 'Readex Pro',
|
||||
color: Colors.white,
|
||||
),
|
||||
elevation: 3.0,
|
||||
borderSide: BorderSide(
|
||||
color: Colors.transparent,
|
||||
width: 1.0,
|
||||
),
|
||||
borderRadius: BorderRadius.circular(40.0),
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
Padding(
|
||||
padding:
|
||||
EdgeInsetsDirectional.fromSTEB(0.0, 16.0, 0.0, 0.0),
|
||||
child: Row(
|
||||
mainAxisSize: MainAxisSize.max,
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
Text(
|
||||
FFLocalizations.of(context).getText(
|
||||
'0qwzktdi' /* My Enquiries */,
|
||||
),
|
||||
style: FlutterTheme.of(context)
|
||||
.bodyMedium
|
||||
.override(
|
||||
fontFamily: 'Readex Pro',
|
||||
fontSize: 24.0,
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
Padding(
|
||||
padding:
|
||||
EdgeInsetsDirectional.fromSTEB(0.0, 16.0, 0.0, 0.0),
|
||||
child: ListView(
|
||||
padding: EdgeInsets.zero,
|
||||
shrinkWrap: true,
|
||||
scrollDirection: Axis.vertical,
|
||||
children: [
|
||||
Align(
|
||||
alignment: AlignmentDirectional(0.0, 0.0),
|
||||
child: InkWell(
|
||||
splashColor: Colors.transparent,
|
||||
focusColor: Colors.transparent,
|
||||
hoverColor: Colors.transparent,
|
||||
highlightColor: Colors.transparent,
|
||||
onTap: () async {
|
||||
context.pushNamed('myenquiry1');
|
||||
},
|
||||
child: Container(
|
||||
width: 358.0,
|
||||
height: 166.0,
|
||||
decoration: BoxDecoration(
|
||||
color: FlutterTheme.of(context)
|
||||
.secondaryBackground,
|
||||
borderRadius: BorderRadius.only(
|
||||
bottomLeft: Radius.circular(0.0),
|
||||
bottomRight: Radius.circular(19.1),
|
||||
topLeft: Radius.circular(19.1),
|
||||
topRight: Radius.circular(0.0),
|
||||
),
|
||||
),
|
||||
child: Column(
|
||||
mainAxisSize: MainAxisSize.max,
|
||||
children: [
|
||||
Padding(
|
||||
padding: EdgeInsetsDirectional.fromSTEB(
|
||||
0.0, 12.0, 0.0, 0.0),
|
||||
child: Row(
|
||||
mainAxisSize: MainAxisSize.max,
|
||||
mainAxisAlignment:
|
||||
MainAxisAlignment.start,
|
||||
children: [
|
||||
Padding(
|
||||
padding:
|
||||
EdgeInsetsDirectional.fromSTEB(
|
||||
14.0, 0.0, 0.0, 0.0),
|
||||
child: Column(
|
||||
mainAxisSize: MainAxisSize.max,
|
||||
crossAxisAlignment:
|
||||
CrossAxisAlignment.start,
|
||||
children: [
|
||||
Text(
|
||||
FFLocalizations.of(context)
|
||||
.getText(
|
||||
'clffto0c' /* Enquiry 1 */,
|
||||
),
|
||||
style: FlutterTheme.of(
|
||||
context)
|
||||
.bodyMedium
|
||||
.override(
|
||||
fontFamily:
|
||||
'Readex Pro',
|
||||
fontSize: 18.0,
|
||||
decoration:
|
||||
TextDecoration
|
||||
.underline,
|
||||
),
|
||||
),
|
||||
Padding(
|
||||
padding: EdgeInsetsDirectional
|
||||
.fromSTEB(
|
||||
0.0, 8.0, 0.0, 0.0),
|
||||
child: Text(
|
||||
FFLocalizations.of(context)
|
||||
.getText(
|
||||
'ikeuol16' /* Submitted date 2023/05/23 15:5... */,
|
||||
),
|
||||
style: FlutterTheme.of(
|
||||
context)
|
||||
.bodyMedium,
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
Expanded(
|
||||
child: Align(
|
||||
alignment: AlignmentDirectional(
|
||||
1.0, 0.0),
|
||||
child: Padding(
|
||||
padding: EdgeInsetsDirectional
|
||||
.fromSTEB(
|
||||
0.0, 0.0, 20.0, 0.0),
|
||||
child: Icon(
|
||||
Icons.search,
|
||||
color: Color(0xFF009B9A),
|
||||
size: 30.0,
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
Expanded(
|
||||
child: Padding(
|
||||
padding: EdgeInsetsDirectional.fromSTEB(
|
||||
14.0, 0.0, 0.0, 20.0),
|
||||
child: Row(
|
||||
mainAxisSize: MainAxisSize.max,
|
||||
crossAxisAlignment:
|
||||
CrossAxisAlignment.end,
|
||||
children: [
|
||||
FlutterChoiceChips(
|
||||
options: [
|
||||
ChipData(
|
||||
FFLocalizations.of(context)
|
||||
.getText(
|
||||
'a5svpxrh' /* Waiting for reply */,
|
||||
))
|
||||
],
|
||||
onChanged: (val) => setState(() =>
|
||||
_model.choiceChipsValue =
|
||||
val?.first),
|
||||
selectedChipStyle: ChipStyle(
|
||||
backgroundColor:
|
||||
Color(0xFFD6DEE9),
|
||||
textStyle: FlutterTheme.of(
|
||||
context)
|
||||
.bodyMedium
|
||||
.override(
|
||||
fontFamily: 'Readex Pro',
|
||||
color:
|
||||
FlutterTheme.of(
|
||||
context)
|
||||
.primaryText,
|
||||
),
|
||||
iconColor:
|
||||
FlutterTheme.of(context)
|
||||
.primaryText,
|
||||
iconSize: 18.0,
|
||||
elevation: 4.0,
|
||||
borderRadius:
|
||||
BorderRadius.circular(16.0),
|
||||
),
|
||||
unselectedChipStyle: ChipStyle(
|
||||
backgroundColor:
|
||||
FlutterTheme.of(context)
|
||||
.alternate,
|
||||
textStyle: FlutterTheme.of(
|
||||
context)
|
||||
.bodyMedium
|
||||
.override(
|
||||
fontFamily: 'Readex Pro',
|
||||
color:
|
||||
FlutterTheme.of(
|
||||
context)
|
||||
.secondaryText,
|
||||
),
|
||||
iconColor:
|
||||
FlutterTheme.of(context)
|
||||
.secondaryText,
|
||||
iconSize: 18.0,
|
||||
elevation: 0.0,
|
||||
borderRadius:
|
||||
BorderRadius.circular(16.0),
|
||||
),
|
||||
chipSpacing: 12.0,
|
||||
rowSpacing: 12.0,
|
||||
multiselect: false,
|
||||
alignment: WrapAlignment.start,
|
||||
controller: _model
|
||||
.choiceChipsValueController ??=
|
||||
FormFieldController<
|
||||
List<String>>(
|
||||
[],
|
||||
),
|
||||
wrapped: true,
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
Align(
|
||||
alignment: AlignmentDirectional(0.0, 1.0),
|
||||
child: wrapWithModel(
|
||||
model: _model.navBar1Model,
|
||||
updateCallback: () => setState(() {}),
|
||||
child: NavBar1Widget(),
|
||||
),
|
||||
),
|
||||
Align(
|
||||
alignment: AlignmentDirectional(0.0, -1.0),
|
||||
child: wrapWithModel(
|
||||
model: _model.appbarModel,
|
||||
updateCallback: () => setState(() {}),
|
||||
child: AppbarWidget(),
|
||||
),
|
||||
),
|
||||
Align(
|
||||
alignment: AlignmentDirectional(1.07, -0.97),
|
||||
child: Padding(
|
||||
padding:
|
||||
EdgeInsetsDirectional.fromSTEB(0.0, 550.0, 30.0, 0.0),
|
||||
child: InkWell(
|
||||
splashColor: Colors.transparent,
|
||||
focusColor: Colors.transparent,
|
||||
hoverColor: Colors.transparent,
|
||||
highlightColor: Colors.transparent,
|
||||
onTap: () async {
|
||||
context.pushNamed('chatbox');
|
||||
},
|
||||
child: Container(
|
||||
width: 71.0,
|
||||
height: 71.0,
|
||||
decoration: BoxDecoration(
|
||||
gradient: LinearGradient(
|
||||
colors: [Color(0xFFE7E63B), Color(0xFFC6E6D7)],
|
||||
stops: [0.0, 1.0],
|
||||
begin: AlignmentDirectional(-1.0, 0.0),
|
||||
end: AlignmentDirectional(1.0, 0),
|
||||
),
|
||||
shape: BoxShape.circle,
|
||||
),
|
||||
child: ClipRRect(
|
||||
borderRadius: BorderRadius.circular(8.0),
|
||||
child: SvgPicture.asset(
|
||||
'assets/images/message-2.svg',
|
||||
width: 100.0,
|
||||
height: 100.0,
|
||||
fit: BoxFit.none,
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
43
lib/settings/myenquiry1/myenquiry1_model.dart
Normal file
43
lib/settings/myenquiry1/myenquiry1_model.dart
Normal file
@@ -0,0 +1,43 @@
|
||||
import '/components/appbar_widget.dart';
|
||||
import '/components/nav_bar1_widget.dart';
|
||||
import '/flutterlib/flutter_choice_chips.dart';
|
||||
import '/flutterlib/flutter_theme.dart';
|
||||
import '/flutterlib/flutter_util.dart';
|
||||
import '/flutterlib/flutter_widgets.dart';
|
||||
import '/flutterlib/form_field_controller.dart';
|
||||
import 'myenquiry1_widget.dart' show Myenquiry1Widget;
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter/services.dart';
|
||||
import 'package:flutter_svg/flutter_svg.dart';
|
||||
import 'package:google_fonts/google_fonts.dart';
|
||||
import 'package:provider/provider.dart';
|
||||
|
||||
class Myenquiry1Model extends FlutterModel<Myenquiry1Widget> {
|
||||
/// State fields for stateful widgets in this page.
|
||||
|
||||
final unfocusNode = FocusNode();
|
||||
// State field(s) for ChoiceChips widget.
|
||||
String? choiceChipsValue;
|
||||
FormFieldController<List<String>>? choiceChipsValueController;
|
||||
// Model for NavBar1 component.
|
||||
late NavBar1Model navBar1Model;
|
||||
// Model for appbar component.
|
||||
late AppbarModel appbarModel;
|
||||
|
||||
/// Initialization and disposal methods.
|
||||
|
||||
void initState(BuildContext context) {
|
||||
navBar1Model = createModel(context, () => NavBar1Model());
|
||||
appbarModel = createModel(context, () => AppbarModel());
|
||||
}
|
||||
|
||||
void dispose() {
|
||||
unfocusNode.dispose();
|
||||
navBar1Model.dispose();
|
||||
appbarModel.dispose();
|
||||
}
|
||||
|
||||
/// Action blocks are added here.
|
||||
|
||||
/// Additional helper methods are added here.
|
||||
}
|
||||
799
lib/settings/myenquiry1/myenquiry1_widget.dart
Normal file
799
lib/settings/myenquiry1/myenquiry1_widget.dart
Normal file
@@ -0,0 +1,799 @@
|
||||
import '/components/appbar_widget.dart';
|
||||
import '/components/nav_bar1_widget.dart';
|
||||
import '/flutterlib/flutter_choice_chips.dart';
|
||||
import '/flutterlib/flutter_theme.dart';
|
||||
import '/flutterlib/flutter_util.dart';
|
||||
import '/flutterlib/flutter_widgets.dart';
|
||||
import '/flutterlib/form_field_controller.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter/services.dart';
|
||||
import 'package:flutter_svg/flutter_svg.dart';
|
||||
import 'package:google_fonts/google_fonts.dart';
|
||||
import 'package:provider/provider.dart';
|
||||
import 'myenquiry1_model.dart';
|
||||
export 'myenquiry1_model.dart';
|
||||
|
||||
class Myenquiry1Widget extends StatefulWidget {
|
||||
const Myenquiry1Widget({Key? key}) : super(key: key);
|
||||
|
||||
@override
|
||||
_Myenquiry1WidgetState createState() => _Myenquiry1WidgetState();
|
||||
}
|
||||
|
||||
class _Myenquiry1WidgetState extends State<Myenquiry1Widget> {
|
||||
late Myenquiry1Model _model;
|
||||
|
||||
final scaffoldKey = GlobalKey<ScaffoldState>();
|
||||
|
||||
@override
|
||||
void initState() {
|
||||
super.initState();
|
||||
_model = createModel(context, () => Myenquiry1Model());
|
||||
}
|
||||
|
||||
@override
|
||||
void dispose() {
|
||||
_model.dispose();
|
||||
|
||||
super.dispose();
|
||||
}
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
if (isiOS) {
|
||||
SystemChrome.setSystemUIOverlayStyle(
|
||||
SystemUiOverlayStyle(
|
||||
statusBarBrightness: Theme.of(context).brightness,
|
||||
systemStatusBarContrastEnforced: true,
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
context.watch<FFAppState>();
|
||||
|
||||
return GestureDetector(
|
||||
onTap: () => _model.unfocusNode.canRequestFocus
|
||||
? FocusScope.of(context).requestFocus(_model.unfocusNode)
|
||||
: FocusScope.of(context).unfocus(),
|
||||
child: Scaffold(
|
||||
key: scaffoldKey,
|
||||
backgroundColor: Color(0xFFEBEBE4),
|
||||
drawer: Container(
|
||||
width: 180.0,
|
||||
child: Drawer(
|
||||
elevation: 16.0,
|
||||
child: Container(
|
||||
width: 100.0,
|
||||
height: 100.0,
|
||||
decoration: BoxDecoration(
|
||||
color: Color(0xFF009B9A),
|
||||
),
|
||||
child: Column(
|
||||
mainAxisSize: MainAxisSize.max,
|
||||
children: [
|
||||
Padding(
|
||||
padding:
|
||||
EdgeInsetsDirectional.fromSTEB(0.0, 80.0, 0.0, 0.0),
|
||||
child: Row(
|
||||
mainAxisSize: MainAxisSize.max,
|
||||
children: [
|
||||
Container(
|
||||
width: 180.0,
|
||||
height: 61.0,
|
||||
decoration: BoxDecoration(
|
||||
color: Color(0xFF009B9A),
|
||||
),
|
||||
child: InkWell(
|
||||
splashColor: Colors.transparent,
|
||||
focusColor: Colors.transparent,
|
||||
hoverColor: Colors.transparent,
|
||||
highlightColor: Colors.transparent,
|
||||
onTap: () async {
|
||||
context.pushNamed('account');
|
||||
},
|
||||
child: Row(
|
||||
mainAxisSize: MainAxisSize.max,
|
||||
mainAxisAlignment: MainAxisAlignment.start,
|
||||
children: [
|
||||
Padding(
|
||||
padding: EdgeInsetsDirectional.fromSTEB(
|
||||
15.0, 8.0, 0.0, 0.0),
|
||||
child: Container(
|
||||
width: 40.0,
|
||||
height: 40.0,
|
||||
decoration: BoxDecoration(
|
||||
color: FlutterTheme.of(context)
|
||||
.secondaryBackground,
|
||||
shape: BoxShape.circle,
|
||||
),
|
||||
child: Align(
|
||||
alignment: AlignmentDirectional(0.0, 0.0),
|
||||
child: ClipRRect(
|
||||
borderRadius:
|
||||
BorderRadius.circular(8.0),
|
||||
child: SvgPicture.asset(
|
||||
'assets/images/company.svg',
|
||||
width: 30.0,
|
||||
height: 30.0,
|
||||
fit: BoxFit.contain,
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
Padding(
|
||||
padding: EdgeInsetsDirectional.fromSTEB(
|
||||
8.0, 8.0, 0.0, 0.0),
|
||||
child: Text(
|
||||
FFLocalizations.of(context).getText(
|
||||
'i2t9t08w' /* ABC Ltd */,
|
||||
),
|
||||
style: FlutterTheme.of(context)
|
||||
.bodyMedium
|
||||
.override(
|
||||
fontFamily: 'Readex Pro',
|
||||
color: Colors.white,
|
||||
fontSize: 16.0,
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
Container(
|
||||
width: 180.0,
|
||||
height: 61.0,
|
||||
decoration: BoxDecoration(
|
||||
color: Color(0xFF009B9A),
|
||||
),
|
||||
child: InkWell(
|
||||
splashColor: Colors.transparent,
|
||||
focusColor: Colors.transparent,
|
||||
hoverColor: Colors.transparent,
|
||||
highlightColor: Colors.transparent,
|
||||
onTap: () async {
|
||||
context.pushNamed('account1');
|
||||
},
|
||||
child: Row(
|
||||
mainAxisSize: MainAxisSize.max,
|
||||
mainAxisAlignment: MainAxisAlignment.start,
|
||||
children: [
|
||||
ClipRRect(
|
||||
borderRadius: BorderRadius.circular(8.0),
|
||||
child: SvgPicture.asset(
|
||||
'assets/images/Group_2640.svg',
|
||||
width: 0.0,
|
||||
height: 0.0,
|
||||
fit: BoxFit.contain,
|
||||
),
|
||||
),
|
||||
Align(
|
||||
alignment: AlignmentDirectional(0.0, 0.0),
|
||||
child: Padding(
|
||||
padding: EdgeInsetsDirectional.fromSTEB(
|
||||
5.0, 0.0, 0.0, 0.0),
|
||||
child: ClipRRect(
|
||||
borderRadius: BorderRadius.circular(8.0),
|
||||
child: Image.asset(
|
||||
'assets/images/account.png',
|
||||
width: 50.0,
|
||||
height: 50.0,
|
||||
fit: BoxFit.cover,
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
Padding(
|
||||
padding: EdgeInsetsDirectional.fromSTEB(
|
||||
8.0, 0.0, 0.0, 0.0),
|
||||
child: Text(
|
||||
FFLocalizations.of(context).getText(
|
||||
'c41hymrq' /* Account */,
|
||||
),
|
||||
style: FlutterTheme.of(context)
|
||||
.bodyMedium
|
||||
.override(
|
||||
fontFamily: 'Readex Pro',
|
||||
color: Colors.white,
|
||||
fontSize: 16.0,
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
Container(
|
||||
width: 180.0,
|
||||
height: 61.0,
|
||||
decoration: BoxDecoration(
|
||||
color: Color(0xFF009B9A),
|
||||
),
|
||||
child: InkWell(
|
||||
splashColor: Colors.transparent,
|
||||
focusColor: Colors.transparent,
|
||||
hoverColor: Colors.transparent,
|
||||
highlightColor: Colors.transparent,
|
||||
onTap: () async {
|
||||
context.pushNamed('tnc');
|
||||
},
|
||||
child: Row(
|
||||
mainAxisSize: MainAxisSize.max,
|
||||
mainAxisAlignment: MainAxisAlignment.start,
|
||||
children: [
|
||||
ClipRRect(
|
||||
borderRadius: BorderRadius.circular(8.0),
|
||||
child: SvgPicture.asset(
|
||||
'assets/images/document.svg',
|
||||
width: 0.0,
|
||||
height: 0.0,
|
||||
fit: BoxFit.contain,
|
||||
),
|
||||
),
|
||||
Align(
|
||||
alignment: AlignmentDirectional(0.0, 0.0),
|
||||
child: Padding(
|
||||
padding: EdgeInsetsDirectional.fromSTEB(
|
||||
16.0, 0.0, 0.0, 0.0),
|
||||
child: ClipRRect(
|
||||
borderRadius: BorderRadius.circular(8.0),
|
||||
child: SvgPicture.asset(
|
||||
'assets/images/tnc.svg',
|
||||
width: 30.0,
|
||||
height: 30.0,
|
||||
fit: BoxFit.cover,
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
Padding(
|
||||
padding: EdgeInsetsDirectional.fromSTEB(
|
||||
17.0, 0.0, 0.0, 0.0),
|
||||
child: Text(
|
||||
FFLocalizations.of(context).getText(
|
||||
'aodw3ago' /* T&C */,
|
||||
),
|
||||
style: FlutterTheme.of(context)
|
||||
.bodyMedium
|
||||
.override(
|
||||
fontFamily: 'Readex Pro',
|
||||
color: Colors.white,
|
||||
fontSize: 16.0,
|
||||
),
|
||||
),
|
||||
),
|
||||
ClipRRect(
|
||||
borderRadius: BorderRadius.circular(8.0),
|
||||
child: SvgPicture.asset(
|
||||
'assets/images/Group_2640.svg',
|
||||
width: 0.0,
|
||||
height: 0.0,
|
||||
fit: BoxFit.fitHeight,
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
Container(
|
||||
width: 180.0,
|
||||
height: 61.0,
|
||||
decoration: BoxDecoration(
|
||||
color: Color(0xFF009B9A),
|
||||
),
|
||||
child: InkWell(
|
||||
splashColor: Colors.transparent,
|
||||
focusColor: Colors.transparent,
|
||||
hoverColor: Colors.transparent,
|
||||
highlightColor: Colors.transparent,
|
||||
onTap: () async {
|
||||
context.pushNamed('policy');
|
||||
},
|
||||
child: Row(
|
||||
mainAxisSize: MainAxisSize.max,
|
||||
mainAxisAlignment: MainAxisAlignment.start,
|
||||
children: [
|
||||
ClipRRect(
|
||||
borderRadius: BorderRadius.circular(8.0),
|
||||
child: SvgPicture.asset(
|
||||
'assets/images/Group_2640.svg',
|
||||
width: 0.0,
|
||||
height: 0.0,
|
||||
fit: BoxFit.contain,
|
||||
),
|
||||
),
|
||||
Align(
|
||||
alignment: AlignmentDirectional(0.0, 0.0),
|
||||
child: Padding(
|
||||
padding: EdgeInsetsDirectional.fromSTEB(
|
||||
16.0, 0.0, 0.0, 0.0),
|
||||
child: ClipRRect(
|
||||
borderRadius: BorderRadius.circular(8.0),
|
||||
child: SvgPicture.asset(
|
||||
'assets/images/pp.svg',
|
||||
width: 30.0,
|
||||
height: 30.0,
|
||||
fit: BoxFit.cover,
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
Padding(
|
||||
padding: EdgeInsetsDirectional.fromSTEB(
|
||||
16.0, 0.0, 0.0, 0.0),
|
||||
child: Text(
|
||||
FFLocalizations.of(context).getText(
|
||||
'i92nit7l' /* Privacy
|
||||
Policy */
|
||||
,
|
||||
),
|
||||
style: FlutterTheme.of(context)
|
||||
.bodyMedium
|
||||
.override(
|
||||
fontFamily: 'Readex Pro',
|
||||
color: Colors.white,
|
||||
fontSize: 16.0,
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
Container(
|
||||
width: 180.0,
|
||||
height: 61.0,
|
||||
decoration: BoxDecoration(
|
||||
color: Color(0xFF009B9A),
|
||||
),
|
||||
child: InkWell(
|
||||
splashColor: Colors.transparent,
|
||||
focusColor: Colors.transparent,
|
||||
hoverColor: Colors.transparent,
|
||||
highlightColor: Colors.transparent,
|
||||
onTap: () async {
|
||||
context.pushNamed('language');
|
||||
},
|
||||
child: Row(
|
||||
mainAxisSize: MainAxisSize.max,
|
||||
mainAxisAlignment: MainAxisAlignment.start,
|
||||
children: [
|
||||
ClipRRect(
|
||||
borderRadius: BorderRadius.circular(8.0),
|
||||
child: SvgPicture.asset(
|
||||
'assets/images/Group_2640.svg',
|
||||
width: 0.0,
|
||||
height: 0.0,
|
||||
fit: BoxFit.contain,
|
||||
),
|
||||
),
|
||||
Align(
|
||||
alignment: AlignmentDirectional(0.0, 0.0),
|
||||
child: Padding(
|
||||
padding: EdgeInsetsDirectional.fromSTEB(
|
||||
16.0, 0.0, 0.0, 0.0),
|
||||
child: ClipRRect(
|
||||
borderRadius: BorderRadius.circular(8.0),
|
||||
child: SvgPicture.asset(
|
||||
'assets/images/language.svg',
|
||||
width: 30.0,
|
||||
height: 30.0,
|
||||
fit: BoxFit.contain,
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
Padding(
|
||||
padding: EdgeInsetsDirectional.fromSTEB(
|
||||
15.0, 0.0, 0.0, 0.0),
|
||||
child: Text(
|
||||
FFLocalizations.of(context).getText(
|
||||
'yvo4qvmt' /* Languages */,
|
||||
),
|
||||
style: FlutterTheme.of(context)
|
||||
.bodyMedium
|
||||
.override(
|
||||
fontFamily: 'Readex Pro',
|
||||
color: Colors.white,
|
||||
fontSize: 16.0,
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
Container(
|
||||
width: 180.0,
|
||||
height: 61.0,
|
||||
decoration: BoxDecoration(
|
||||
color: Color(0xFF009B9A),
|
||||
),
|
||||
child: InkWell(
|
||||
splashColor: Colors.transparent,
|
||||
focusColor: Colors.transparent,
|
||||
hoverColor: Colors.transparent,
|
||||
highlightColor: Colors.transparent,
|
||||
onTap: () async {
|
||||
context.pushNamed('setting');
|
||||
},
|
||||
child: Row(
|
||||
mainAxisSize: MainAxisSize.max,
|
||||
mainAxisAlignment: MainAxisAlignment.start,
|
||||
children: [
|
||||
ClipRRect(
|
||||
borderRadius: BorderRadius.circular(8.0),
|
||||
child: SvgPicture.asset(
|
||||
'assets/images/Group_2640.svg',
|
||||
width: 0.0,
|
||||
height: 0.0,
|
||||
fit: BoxFit.contain,
|
||||
),
|
||||
),
|
||||
Align(
|
||||
alignment: AlignmentDirectional(0.0, 0.0),
|
||||
child: Padding(
|
||||
padding: EdgeInsetsDirectional.fromSTEB(
|
||||
16.0, 0.0, 0.0, 0.0),
|
||||
child: ClipRRect(
|
||||
borderRadius: BorderRadius.circular(8.0),
|
||||
child: SvgPicture.asset(
|
||||
'assets/images/setting-2.svg',
|
||||
width: 30.0,
|
||||
height: 30.0,
|
||||
fit: BoxFit.contain,
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
Padding(
|
||||
padding: EdgeInsetsDirectional.fromSTEB(
|
||||
15.0, 0.0, 0.0, 0.0),
|
||||
child: Text(
|
||||
FFLocalizations.of(context).getText(
|
||||
'm6fxqqmc' /* Settings */,
|
||||
),
|
||||
style: FlutterTheme.of(context)
|
||||
.bodyMedium
|
||||
.override(
|
||||
fontFamily: 'Readex Pro',
|
||||
color: Colors.white,
|
||||
fontSize: 16.0,
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
appBar: PreferredSize(
|
||||
preferredSize: Size.fromHeight(0.0),
|
||||
child: AppBar(
|
||||
backgroundColor: Color(0xFFE7E36B),
|
||||
automaticallyImplyLeading: false,
|
||||
actions: [],
|
||||
centerTitle: false,
|
||||
elevation: 0.0,
|
||||
),
|
||||
),
|
||||
body: SafeArea(
|
||||
top: true,
|
||||
child: Stack(
|
||||
children: [
|
||||
SingleChildScrollView(
|
||||
child: Column(
|
||||
mainAxisSize: MainAxisSize.max,
|
||||
children: [
|
||||
Padding(
|
||||
padding: EdgeInsetsDirectional.fromSTEB(
|
||||
0.0, 120.0, 0.0, 100.0),
|
||||
child: Column(
|
||||
mainAxisSize: MainAxisSize.max,
|
||||
mainAxisAlignment: MainAxisAlignment.end,
|
||||
children: [
|
||||
Align(
|
||||
alignment: AlignmentDirectional(0.0, 0.0),
|
||||
child: Container(
|
||||
width: 358.0,
|
||||
height: 700.0,
|
||||
decoration: BoxDecoration(
|
||||
color: FlutterTheme.of(context)
|
||||
.secondaryBackground,
|
||||
borderRadius: BorderRadius.circular(0.0),
|
||||
),
|
||||
child: Column(
|
||||
mainAxisSize: MainAxisSize.max,
|
||||
children: [
|
||||
Row(
|
||||
mainAxisSize: MainAxisSize.max,
|
||||
children: [
|
||||
Container(
|
||||
width: 358.0,
|
||||
height: 50.0,
|
||||
decoration: BoxDecoration(
|
||||
gradient: LinearGradient(
|
||||
colors: [
|
||||
Color(0xFF7DB979),
|
||||
Color(0xFF26BBAA)
|
||||
],
|
||||
stops: [0.0, 1.0],
|
||||
begin:
|
||||
AlignmentDirectional(-1.0, 0.0),
|
||||
end: AlignmentDirectional(1.0, 0),
|
||||
),
|
||||
),
|
||||
child: Align(
|
||||
alignment:
|
||||
AlignmentDirectional(0.0, 0.0),
|
||||
child: Text(
|
||||
FFLocalizations.of(context).getText(
|
||||
'23yv28iq' /* My Enquiries */,
|
||||
),
|
||||
style: FlutterTheme.of(context)
|
||||
.bodyMedium
|
||||
.override(
|
||||
fontFamily: 'Roboto',
|
||||
fontSize: 24.0,
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
Padding(
|
||||
padding: EdgeInsetsDirectional.fromSTEB(
|
||||
0.0, 19.0, 0.0, 0.0),
|
||||
child: Row(
|
||||
mainAxisSize: MainAxisSize.max,
|
||||
mainAxisAlignment:
|
||||
MainAxisAlignment.center,
|
||||
children: [
|
||||
Expanded(
|
||||
child: Align(
|
||||
alignment:
|
||||
AlignmentDirectional(1.0, 0.0),
|
||||
child: Padding(
|
||||
padding: EdgeInsetsDirectional
|
||||
.fromSTEB(
|
||||
0.0, 0.0, 15.0, 0.0),
|
||||
child: FlutterChoiceChips(
|
||||
options: [
|
||||
ChipData(FFLocalizations.of(
|
||||
context)
|
||||
.getText(
|
||||
'fqmzzrjv' /* Completed */,
|
||||
))
|
||||
],
|
||||
onChanged: (val) => setState(
|
||||
() => _model
|
||||
.choiceChipsValue =
|
||||
val?.first),
|
||||
selectedChipStyle: ChipStyle(
|
||||
backgroundColor:
|
||||
Color(0xFFD6DEE9),
|
||||
textStyle: FlutterTheme
|
||||
.of(context)
|
||||
.bodyMedium
|
||||
.override(
|
||||
fontFamily:
|
||||
'Readex Pro',
|
||||
color:
|
||||
FlutterTheme.of(
|
||||
context)
|
||||
.primaryText,
|
||||
fontSize: 20.0,
|
||||
),
|
||||
iconColor:
|
||||
FlutterTheme.of(
|
||||
context)
|
||||
.primaryText,
|
||||
iconSize: 20.0,
|
||||
elevation: 4.0,
|
||||
borderRadius:
|
||||
BorderRadius.circular(
|
||||
20.0),
|
||||
),
|
||||
unselectedChipStyle: ChipStyle(
|
||||
backgroundColor:
|
||||
FlutterTheme.of(
|
||||
context)
|
||||
.alternate,
|
||||
textStyle: FlutterTheme
|
||||
.of(context)
|
||||
.bodyMedium
|
||||
.override(
|
||||
fontFamily:
|
||||
'Readex Pro',
|
||||
color:
|
||||
FlutterTheme.of(
|
||||
context)
|
||||
.secondaryText,
|
||||
),
|
||||
iconColor:
|
||||
FlutterTheme.of(
|
||||
context)
|
||||
.secondaryText,
|
||||
iconSize: 18.0,
|
||||
elevation: 0.0,
|
||||
borderRadius:
|
||||
BorderRadius.circular(
|
||||
16.0),
|
||||
),
|
||||
chipSpacing: 12.0,
|
||||
rowSpacing: 12.0,
|
||||
multiselect: false,
|
||||
alignment: WrapAlignment.start,
|
||||
controller: _model
|
||||
.choiceChipsValueController ??=
|
||||
FormFieldController<
|
||||
List<String>>(
|
||||
[],
|
||||
),
|
||||
wrapped: true,
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
Padding(
|
||||
padding: EdgeInsetsDirectional.fromSTEB(
|
||||
0.0, 16.0, 0.0, 0.0),
|
||||
child: Row(
|
||||
mainAxisSize: MainAxisSize.max,
|
||||
children: [
|
||||
Padding(
|
||||
padding:
|
||||
EdgeInsetsDirectional.fromSTEB(
|
||||
15.0, 0.0, 0.0, 0.0),
|
||||
child: Text(
|
||||
FFLocalizations.of(context).getText(
|
||||
'n6s63kmq' /* Enquiry 1 */,
|
||||
),
|
||||
style: FlutterTheme.of(context)
|
||||
.bodyMedium
|
||||
.override(
|
||||
fontFamily: 'Readex Pro',
|
||||
fontSize: 24.0,
|
||||
decoration:
|
||||
TextDecoration.underline,
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
Padding(
|
||||
padding: EdgeInsetsDirectional.fromSTEB(
|
||||
0.0, 8.0, 0.0, 0.0),
|
||||
child: Row(
|
||||
mainAxisSize: MainAxisSize.max,
|
||||
children: [
|
||||
Padding(
|
||||
padding:
|
||||
EdgeInsetsDirectional.fromSTEB(
|
||||
15.0, 0.0, 0.0, 0.0),
|
||||
child: Text(
|
||||
FFLocalizations.of(context).getText(
|
||||
'v6y2vo7p' /* Submitted date 2023/05/23 15:5... */,
|
||||
),
|
||||
style: FlutterTheme.of(context)
|
||||
.bodyMedium
|
||||
.override(
|
||||
fontFamily: 'Readex Pro',
|
||||
color: Color(0xFF6D7581),
|
||||
fontSize: 16.0,
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
Align(
|
||||
alignment: AlignmentDirectional(0.0, 1.0),
|
||||
child: wrapWithModel(
|
||||
model: _model.navBar1Model,
|
||||
updateCallback: () => setState(() {}),
|
||||
child: NavBar1Widget(),
|
||||
),
|
||||
),
|
||||
wrapWithModel(
|
||||
model: _model.appbarModel,
|
||||
updateCallback: () => setState(() {}),
|
||||
child: AppbarWidget(),
|
||||
),
|
||||
Align(
|
||||
alignment: AlignmentDirectional(0.0, 0.51),
|
||||
child: FFButtonWidget(
|
||||
onPressed: () {
|
||||
print('Button pressed ...');
|
||||
},
|
||||
text: FFLocalizations.of(context).getText(
|
||||
'su6zcxio' /* Back */,
|
||||
),
|
||||
options: FFButtonOptions(
|
||||
width: 304.0,
|
||||
height: 54.0,
|
||||
padding: EdgeInsets.all(0.0),
|
||||
iconPadding:
|
||||
EdgeInsetsDirectional.fromSTEB(0.0, 0.0, 0.0, 0.0),
|
||||
color: Color(0xFF9B0025),
|
||||
textStyle: FlutterTheme.of(context).titleSmall.override(
|
||||
fontFamily: 'Roboto',
|
||||
color: Colors.white,
|
||||
fontSize: 20.0,
|
||||
),
|
||||
elevation: 3.0,
|
||||
borderSide: BorderSide(
|
||||
color: Colors.transparent,
|
||||
width: 1.0,
|
||||
),
|
||||
borderRadius: BorderRadius.circular(40.0),
|
||||
),
|
||||
),
|
||||
),
|
||||
Align(
|
||||
alignment: AlignmentDirectional(1.07, -0.97),
|
||||
child: Padding(
|
||||
padding:
|
||||
EdgeInsetsDirectional.fromSTEB(0.0, 550.0, 30.0, 0.0),
|
||||
child: InkWell(
|
||||
splashColor: Colors.transparent,
|
||||
focusColor: Colors.transparent,
|
||||
hoverColor: Colors.transparent,
|
||||
highlightColor: Colors.transparent,
|
||||
onTap: () async {
|
||||
context.pushNamed('chatbox');
|
||||
},
|
||||
child: Container(
|
||||
width: 71.0,
|
||||
height: 71.0,
|
||||
decoration: BoxDecoration(
|
||||
gradient: LinearGradient(
|
||||
colors: [Color(0xFFE7E63B), Color(0xFFC6E6D7)],
|
||||
stops: [0.0, 1.0],
|
||||
begin: AlignmentDirectional(-1.0, 0.0),
|
||||
end: AlignmentDirectional(1.0, 0),
|
||||
),
|
||||
shape: BoxShape.circle,
|
||||
),
|
||||
child: ClipRRect(
|
||||
borderRadius: BorderRadius.circular(8.0),
|
||||
child: SvgPicture.asset(
|
||||
'assets/images/message-2.svg',
|
||||
width: 100.0,
|
||||
height: 100.0,
|
||||
fit: BoxFit.none,
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
130
lib/settings/setting/setting_model.dart
Normal file
130
lib/settings/setting/setting_model.dart
Normal file
@@ -0,0 +1,130 @@
|
||||
import '/backend/api_requests/api_calls.dart';
|
||||
import '/components/alert_box_widget.dart';
|
||||
import '/components/appbar_widget.dart';
|
||||
import '/components/nav_bar1_widget.dart';
|
||||
import '/flutterlib/flutter_button_tabbar.dart';
|
||||
import '/flutterlib/flutter_theme.dart';
|
||||
import '/flutterlib/flutter_util.dart';
|
||||
import '/flutterlib/flutter_widgets.dart';
|
||||
import 'setting_widget.dart' show SettingWidget;
|
||||
import 'package:aligned_dialog/aligned_dialog.dart';
|
||||
import 'package:expandable/expandable.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter/services.dart';
|
||||
import 'package:flutter_svg/flutter_svg.dart';
|
||||
import 'package:font_awesome_flutter/font_awesome_flutter.dart';
|
||||
import 'package:google_fonts/google_fonts.dart';
|
||||
import 'package:provider/provider.dart';
|
||||
|
||||
class SettingModel extends FlutterModel<SettingWidget> {
|
||||
/// State fields for stateful widgets in this page.
|
||||
|
||||
final unfocusNode = FocusNode();
|
||||
final formKey = GlobalKey<FormState>();
|
||||
// State field(s) for TabBar widget.
|
||||
TabController? tabBarController;
|
||||
int get tabBarCurrentIndex =>
|
||||
tabBarController != null ? tabBarController!.index : 0;
|
||||
|
||||
// State field(s) for user_push_notification widget.
|
||||
bool? userPushNotificationValue;
|
||||
// State field(s) for user_bookkeeping_queue widget.
|
||||
bool? userBookkeepingQueueValue;
|
||||
// State field(s) for user_company_security_queue widget.
|
||||
bool? userCompanySecurityQueueValue;
|
||||
// State field(s) for user_chat_room widget.
|
||||
bool? userChatRoomValue;
|
||||
// Stores action output result for [Backend Call - API (Get Notifications Settings)] action in Button widget.
|
||||
ApiCallResponse? apiResulti93;
|
||||
// State field(s) for password widget.
|
||||
FocusNode? passwordFocusNode;
|
||||
TextEditingController? passwordController;
|
||||
late bool passwordVisibility;
|
||||
String? Function(BuildContext, String?)? passwordControllerValidator;
|
||||
String? _passwordControllerValidator(BuildContext context, String? val) {
|
||||
if (val == null || val.isEmpty) {
|
||||
return FFLocalizations.of(context).getText(
|
||||
's6d44i6v' /* Field is required */,
|
||||
);
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
// State field(s) for new_password widget.
|
||||
FocusNode? newPasswordFocusNode;
|
||||
TextEditingController? newPasswordController;
|
||||
late bool newPasswordVisibility;
|
||||
String? Function(BuildContext, String?)? newPasswordControllerValidator;
|
||||
String? _newPasswordControllerValidator(BuildContext context, String? val) {
|
||||
if (val == null || val.isEmpty) {
|
||||
return FFLocalizations.of(context).getText(
|
||||
'mcbh27ez' /* Field is required */,
|
||||
);
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
// State field(s) for new_password_confirmation widget.
|
||||
FocusNode? newPasswordConfirmationFocusNode;
|
||||
TextEditingController? newPasswordConfirmationController;
|
||||
late bool newPasswordConfirmationVisibility;
|
||||
String? Function(BuildContext, String?)?
|
||||
newPasswordConfirmationControllerValidator;
|
||||
String? _newPasswordConfirmationControllerValidator(
|
||||
BuildContext context, String? val) {
|
||||
if (val == null || val.isEmpty) {
|
||||
return FFLocalizations.of(context).getText(
|
||||
'7pp0pxok' /* Field is required */,
|
||||
);
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
// Stores action output result for [Backend Call - API (change password)] action in Button widget.
|
||||
ApiCallResponse? apiResultopa;
|
||||
// State field(s) for Expandable widget.
|
||||
late ExpandableController expandableController;
|
||||
|
||||
// Model for NavBar1 component.
|
||||
late NavBar1Model navBar1Model;
|
||||
// Model for appbar component.
|
||||
late AppbarModel appbarModel;
|
||||
|
||||
/// Initialization and disposal methods.
|
||||
|
||||
void initState(BuildContext context) {
|
||||
passwordVisibility = false;
|
||||
passwordControllerValidator = _passwordControllerValidator;
|
||||
newPasswordVisibility = false;
|
||||
newPasswordControllerValidator = _newPasswordControllerValidator;
|
||||
newPasswordConfirmationVisibility = false;
|
||||
newPasswordConfirmationControllerValidator =
|
||||
_newPasswordConfirmationControllerValidator;
|
||||
navBar1Model = createModel(context, () => NavBar1Model());
|
||||
appbarModel = createModel(context, () => AppbarModel());
|
||||
}
|
||||
|
||||
void dispose() {
|
||||
unfocusNode.dispose();
|
||||
tabBarController?.dispose();
|
||||
passwordFocusNode?.dispose();
|
||||
passwordController?.dispose();
|
||||
|
||||
newPasswordFocusNode?.dispose();
|
||||
newPasswordController?.dispose();
|
||||
|
||||
newPasswordConfirmationFocusNode?.dispose();
|
||||
newPasswordConfirmationController?.dispose();
|
||||
|
||||
expandableController.dispose();
|
||||
navBar1Model.dispose();
|
||||
appbarModel.dispose();
|
||||
}
|
||||
|
||||
/// Action blocks are added here.
|
||||
|
||||
/// Additional helper methods are added here.
|
||||
}
|
||||
2358
lib/settings/setting/setting_widget.dart
Normal file
2358
lib/settings/setting/setting_widget.dart
Normal file
File diff suppressed because it is too large
Load Diff
128
lib/settings/setting1/setting1_model.dart
Normal file
128
lib/settings/setting1/setting1_model.dart
Normal file
@@ -0,0 +1,128 @@
|
||||
import '/backend/api_requests/api_calls.dart';
|
||||
import '/components/alert_box_widget.dart';
|
||||
import '/components/appbar_widget.dart';
|
||||
import '/components/nav_bar1_widget.dart';
|
||||
import '/flutterlib/flutter_button_tabbar.dart';
|
||||
import '/flutterlib/flutter_theme.dart';
|
||||
import '/flutterlib/flutter_util.dart';
|
||||
import '/flutterlib/flutter_widgets.dart';
|
||||
import 'setting1_widget.dart' show Setting1Widget;
|
||||
import 'package:aligned_dialog/aligned_dialog.dart';
|
||||
import 'package:expandable/expandable.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter/services.dart';
|
||||
import 'package:flutter_svg/flutter_svg.dart';
|
||||
import 'package:font_awesome_flutter/font_awesome_flutter.dart';
|
||||
import 'package:google_fonts/google_fonts.dart';
|
||||
import 'package:provider/provider.dart';
|
||||
|
||||
class Setting1Model extends FlutterModel<Setting1Widget> {
|
||||
/// State fields for stateful widgets in this page.
|
||||
|
||||
final unfocusNode = FocusNode();
|
||||
final formKey = GlobalKey<FormState>();
|
||||
// State field(s) for TabBar widget.
|
||||
TabController? tabBarController;
|
||||
int get tabBarCurrentIndex =>
|
||||
tabBarController != null ? tabBarController!.index : 0;
|
||||
|
||||
// State field(s) for SwitchListTile widget.
|
||||
bool? switchListTileValue1;
|
||||
// State field(s) for SwitchListTile widget.
|
||||
bool? switchListTileValue2;
|
||||
// State field(s) for SwitchListTile widget.
|
||||
bool? switchListTileValue3;
|
||||
// State field(s) for SwitchListTile widget.
|
||||
bool? switchListTileValue4;
|
||||
// State field(s) for password widget.
|
||||
FocusNode? passwordFocusNode;
|
||||
TextEditingController? passwordController;
|
||||
late bool passwordVisibility;
|
||||
String? Function(BuildContext, String?)? passwordControllerValidator;
|
||||
String? _passwordControllerValidator(BuildContext context, String? val) {
|
||||
if (val == null || val.isEmpty) {
|
||||
return FFLocalizations.of(context).getText(
|
||||
'eyfmp88r' /* Field is required */,
|
||||
);
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
// State field(s) for new_password widget.
|
||||
FocusNode? newPasswordFocusNode;
|
||||
TextEditingController? newPasswordController;
|
||||
late bool newPasswordVisibility;
|
||||
String? Function(BuildContext, String?)? newPasswordControllerValidator;
|
||||
String? _newPasswordControllerValidator(BuildContext context, String? val) {
|
||||
if (val == null || val.isEmpty) {
|
||||
return FFLocalizations.of(context).getText(
|
||||
'i8mpw0ks' /* Field is required */,
|
||||
);
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
// State field(s) for new_password_confirmation widget.
|
||||
FocusNode? newPasswordConfirmationFocusNode;
|
||||
TextEditingController? newPasswordConfirmationController;
|
||||
late bool newPasswordConfirmationVisibility;
|
||||
String? Function(BuildContext, String?)?
|
||||
newPasswordConfirmationControllerValidator;
|
||||
String? _newPasswordConfirmationControllerValidator(
|
||||
BuildContext context, String? val) {
|
||||
if (val == null || val.isEmpty) {
|
||||
return FFLocalizations.of(context).getText(
|
||||
'jsim05nr' /* Field is required */,
|
||||
);
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
// Stores action output result for [Backend Call - API (change password)] action in Button widget.
|
||||
ApiCallResponse? apiResultqep;
|
||||
// State field(s) for Expandable widget.
|
||||
late ExpandableController expandableController;
|
||||
|
||||
// Model for NavBar1 component.
|
||||
late NavBar1Model navBar1Model;
|
||||
// Model for appbar component.
|
||||
late AppbarModel appbarModel;
|
||||
|
||||
/// Initialization and disposal methods.
|
||||
|
||||
void initState(BuildContext context) {
|
||||
passwordVisibility = false;
|
||||
passwordControllerValidator = _passwordControllerValidator;
|
||||
newPasswordVisibility = false;
|
||||
newPasswordControllerValidator = _newPasswordControllerValidator;
|
||||
newPasswordConfirmationVisibility = false;
|
||||
newPasswordConfirmationControllerValidator =
|
||||
_newPasswordConfirmationControllerValidator;
|
||||
navBar1Model = createModel(context, () => NavBar1Model());
|
||||
appbarModel = createModel(context, () => AppbarModel());
|
||||
}
|
||||
|
||||
void dispose() {
|
||||
unfocusNode.dispose();
|
||||
tabBarController?.dispose();
|
||||
passwordFocusNode?.dispose();
|
||||
passwordController?.dispose();
|
||||
|
||||
newPasswordFocusNode?.dispose();
|
||||
newPasswordController?.dispose();
|
||||
|
||||
newPasswordConfirmationFocusNode?.dispose();
|
||||
newPasswordConfirmationController?.dispose();
|
||||
|
||||
expandableController.dispose();
|
||||
navBar1Model.dispose();
|
||||
appbarModel.dispose();
|
||||
}
|
||||
|
||||
/// Action blocks are added here.
|
||||
|
||||
/// Additional helper methods are added here.
|
||||
}
|
||||
2315
lib/settings/setting1/setting1_widget.dart
Normal file
2315
lib/settings/setting1/setting1_widget.dart
Normal file
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user