first commit
This commit is contained in:
BIN
lib/general_info/.DS_Store
vendored
Normal file
BIN
lib/general_info/.DS_Store
vendored
Normal file
Binary file not shown.
33
lib/general_info/chatbox/chatbox_model.dart
Normal file
33
lib/general_info/chatbox/chatbox_model.dart
Normal file
@@ -0,0 +1,33 @@
|
||||
import '/components/nav_bar1_widget.dart';
|
||||
import '/flutterlib/flutter_theme.dart';
|
||||
import '/flutterlib/flutter_util.dart';
|
||||
import '/flutterlib/flutter_widgets.dart';
|
||||
import 'chatbox_widget.dart' show ChatboxWidget;
|
||||
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 ChatboxModel extends FlutterModel<ChatboxWidget> {
|
||||
/// State fields for stateful widgets in this page.
|
||||
|
||||
final unfocusNode = FocusNode();
|
||||
// Model for NavBar1 component.
|
||||
late NavBar1Model navBar1Model;
|
||||
|
||||
/// Initialization and disposal methods.
|
||||
|
||||
void initState(BuildContext context) {
|
||||
navBar1Model = createModel(context, () => NavBar1Model());
|
||||
}
|
||||
|
||||
void dispose() {
|
||||
unfocusNode.dispose();
|
||||
navBar1Model.dispose();
|
||||
}
|
||||
|
||||
/// Action blocks are added here.
|
||||
|
||||
/// Additional helper methods are added here.
|
||||
}
|
||||
377
lib/general_info/chatbox/chatbox_widget.dart
Normal file
377
lib/general_info/chatbox/chatbox_widget.dart
Normal file
@@ -0,0 +1,377 @@
|
||||
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 'chatbox_model.dart';
|
||||
export 'chatbox_model.dart';
|
||||
|
||||
class ChatboxWidget extends StatefulWidget {
|
||||
const ChatboxWidget({Key? key}) : super(key: key);
|
||||
|
||||
@override
|
||||
_ChatboxWidgetState createState() => _ChatboxWidgetState();
|
||||
}
|
||||
|
||||
class _ChatboxWidgetState extends State<ChatboxWidget> {
|
||||
late ChatboxModel _model;
|
||||
|
||||
final scaffoldKey = GlobalKey<ScaffoldState>();
|
||||
|
||||
@override
|
||||
void initState() {
|
||||
super.initState();
|
||||
_model = createModel(context, () => ChatboxModel());
|
||||
}
|
||||
|
||||
@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),
|
||||
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: [
|
||||
Container(
|
||||
width: double.infinity,
|
||||
height: 105.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),
|
||||
),
|
||||
borderRadius: BorderRadius.only(
|
||||
bottomLeft: Radius.circular(40.0),
|
||||
bottomRight: Radius.circular(40.0),
|
||||
topLeft: Radius.circular(0.0),
|
||||
topRight: Radius.circular(0.0),
|
||||
),
|
||||
),
|
||||
child: Padding(
|
||||
padding:
|
||||
EdgeInsetsDirectional.fromSTEB(0.0, 35.0, 0.0, 0.0),
|
||||
child: Row(
|
||||
mainAxisSize: MainAxisSize.max,
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
ClipRRect(
|
||||
borderRadius: BorderRadius.circular(8.0),
|
||||
child: Image.asset(
|
||||
'assets/images/numstat+black_1.png',
|
||||
width: 61.0,
|
||||
height: 61.0,
|
||||
fit: BoxFit.cover,
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
Column(
|
||||
mainAxisSize: MainAxisSize.max,
|
||||
children: [
|
||||
Padding(
|
||||
padding: EdgeInsetsDirectional.fromSTEB(
|
||||
0.0, 30.0, 0.0, 0.0),
|
||||
child: Container(
|
||||
width: 335.0,
|
||||
height: () {
|
||||
if (MediaQuery.sizeOf(context).width < 428.0) {
|
||||
return 500.0;
|
||||
} else if (MediaQuery.sizeOf(context).width >=
|
||||
428.0) {
|
||||
return 600.0;
|
||||
} else {
|
||||
return 570.0;
|
||||
}
|
||||
}(),
|
||||
decoration: BoxDecoration(
|
||||
color: Color(0xFF009B9A),
|
||||
borderRadius: BorderRadius.only(
|
||||
bottomLeft: Radius.circular(0.0),
|
||||
bottomRight: Radius.circular(0.0),
|
||||
topLeft: Radius.circular(40.0),
|
||||
topRight: Radius.circular(40.0),
|
||||
),
|
||||
),
|
||||
child: Column(
|
||||
mainAxisSize: MainAxisSize.max,
|
||||
children: [
|
||||
Padding(
|
||||
padding: EdgeInsetsDirectional.fromSTEB(
|
||||
0.0, 10.0, 0.0, 0.0),
|
||||
child: Row(
|
||||
mainAxisSize: MainAxisSize.max,
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
ClipRRect(
|
||||
borderRadius:
|
||||
BorderRadius.circular(8.0),
|
||||
child: SvgPicture.asset(
|
||||
'assets/images/whitemessage.svg',
|
||||
width: 61.0,
|
||||
height: 72.0,
|
||||
fit: BoxFit.none,
|
||||
),
|
||||
),
|
||||
Padding(
|
||||
padding: EdgeInsetsDirectional.fromSTEB(
|
||||
10.0, 0.0, 0.0, 0.0),
|
||||
child: Text(
|
||||
FFLocalizations.of(context).getText(
|
||||
'1eo5ccdk' /* How we can help? */,
|
||||
),
|
||||
style: FlutterTheme.of(context)
|
||||
.bodyMedium
|
||||
.override(
|
||||
fontFamily: 'Readex Pro',
|
||||
color: Color(0xFFEBEBE4),
|
||||
fontSize: 24.0,
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
Row(
|
||||
mainAxisSize: MainAxisSize.max,
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
Text(
|
||||
FFLocalizations.of(context).getText(
|
||||
'k2cv60wx' /* Send us a message and
|
||||
we will... */
|
||||
,
|
||||
),
|
||||
textAlign: TextAlign.center,
|
||||
style: FlutterTheme.of(context)
|
||||
.bodyMedium
|
||||
.override(
|
||||
fontFamily: 'Readex Pro',
|
||||
color: Color(0xFFEBEBE4),
|
||||
fontSize: 16.0,
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
Padding(
|
||||
padding: EdgeInsetsDirectional.fromSTEB(
|
||||
0.0, 30.0, 0.0, 0.0),
|
||||
child: Container(
|
||||
width: 300.0,
|
||||
height: 85.0,
|
||||
decoration: BoxDecoration(
|
||||
color: FlutterTheme.of(context)
|
||||
.secondaryBackground,
|
||||
borderRadius: BorderRadius.only(
|
||||
bottomLeft: Radius.circular(0.0),
|
||||
bottomRight: Radius.circular(40.0),
|
||||
topLeft: Radius.circular(40.0),
|
||||
topRight: Radius.circular(0.0),
|
||||
),
|
||||
),
|
||||
child: Row(
|
||||
mainAxisSize: MainAxisSize.max,
|
||||
children: [
|
||||
ClipRRect(
|
||||
borderRadius:
|
||||
BorderRadius.circular(8.0),
|
||||
child: SvgPicture.asset(
|
||||
'assets/images/bk.svg',
|
||||
width: 100.0,
|
||||
height: 100.0,
|
||||
fit: BoxFit.none,
|
||||
),
|
||||
),
|
||||
Text(
|
||||
FFLocalizations.of(context).getText(
|
||||
'j5kyvvfk' /* Bookkeeping Service */,
|
||||
),
|
||||
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.arrow_forward_ios,
|
||||
color:
|
||||
FlutterTheme.of(context)
|
||||
.secondaryText,
|
||||
size: 16.0,
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
Padding(
|
||||
padding: EdgeInsetsDirectional.fromSTEB(
|
||||
0.0, 30.0, 0.0, 0.0),
|
||||
child: Container(
|
||||
width: 300.0,
|
||||
height: 85.0,
|
||||
decoration: BoxDecoration(
|
||||
color: FlutterTheme.of(context)
|
||||
.secondaryBackground,
|
||||
borderRadius: BorderRadius.only(
|
||||
bottomLeft: Radius.circular(0.0),
|
||||
bottomRight: Radius.circular(40.0),
|
||||
topLeft: Radius.circular(40.0),
|
||||
topRight: Radius.circular(0.0),
|
||||
),
|
||||
),
|
||||
child: Row(
|
||||
mainAxisSize: MainAxisSize.max,
|
||||
children: [
|
||||
ClipRRect(
|
||||
borderRadius:
|
||||
BorderRadius.circular(8.0),
|
||||
child: SvgPicture.asset(
|
||||
'assets/images/chat.svg',
|
||||
width: 100.0,
|
||||
height: 100.0,
|
||||
fit: BoxFit.none,
|
||||
),
|
||||
),
|
||||
Text(
|
||||
FFLocalizations.of(context).getText(
|
||||
'e7alr4z3' /* Company Secretary
|
||||
Service */
|
||||
,
|
||||
),
|
||||
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.arrow_forward_ios,
|
||||
color:
|
||||
FlutterTheme.of(context)
|
||||
.secondaryText,
|
||||
size: 16.0,
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
Align(
|
||||
alignment: AlignmentDirectional(-0.02, -1.32),
|
||||
child: Padding(
|
||||
padding:
|
||||
EdgeInsetsDirectional.fromSTEB(0.0, 10.0, 0.0, 0.0),
|
||||
child: FFButtonWidget(
|
||||
onPressed: () async {
|
||||
context.safePop();
|
||||
},
|
||||
text: FFLocalizations.of(context).getText(
|
||||
't6e2ypb4' /* Leave */,
|
||||
),
|
||||
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(0.0, 1.0),
|
||||
child: wrapWithModel(
|
||||
model: _model.navBar1Model,
|
||||
updateCallback: () => setState(() {}),
|
||||
child: NavBar1Widget(),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
98
lib/general_info/dashboard/dashboard_model.dart
Normal file
98
lib/general_info/dashboard/dashboard_model.dart
Normal file
@@ -0,0 +1,98 @@
|
||||
import '/backend/api_requests/api_calls.dart';
|
||||
import '/components/alert_box_custom_widget.dart';
|
||||
import '/components/appbar_widget.dart';
|
||||
import '/components/nav_bar1_widget.dart';
|
||||
import '/components/new_member_widget.dart';
|
||||
import '/components/update_member_widget.dart';
|
||||
import '/flutterlib/flutter_theme.dart';
|
||||
import '/flutterlib/flutter_util.dart';
|
||||
import '/flutterlib/flutter_widgets.dart';
|
||||
import '/flutterlib/custom_functions.dart' as functions;
|
||||
import 'dashboard_widget.dart' show DashboardWidget;
|
||||
import 'package:aligned_dialog/aligned_dialog.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter/scheduler.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 DashboardModel extends FlutterModel<DashboardWidget> {
|
||||
/// Local state fields for this page.
|
||||
|
||||
bool showNewMemberForm = false;
|
||||
|
||||
int? memberID;
|
||||
|
||||
bool setBirthDate = false;
|
||||
|
||||
bool checkPermission19 = false;
|
||||
|
||||
/// State fields for stateful widgets in this page.
|
||||
|
||||
final unfocusNode = FocusNode();
|
||||
// Stores action output result for [Backend Call - API (Check role has permission)] action in dashboard widget.
|
||||
ApiCallResponse? apiResult19;
|
||||
// State field(s) for companyEn widget.
|
||||
FocusNode? companyEnFocusNode;
|
||||
TextEditingController? companyEnController;
|
||||
String? Function(BuildContext, String?)? companyEnControllerValidator;
|
||||
// State field(s) for companyCn widget.
|
||||
FocusNode? companyCnFocusNode;
|
||||
TextEditingController? companyCnController;
|
||||
String? Function(BuildContext, String?)? companyCnControllerValidator;
|
||||
// State field(s) for officeAddEn widget.
|
||||
FocusNode? officeAddEnFocusNode;
|
||||
TextEditingController? officeAddEnController;
|
||||
String? Function(BuildContext, String?)? officeAddEnControllerValidator;
|
||||
// State field(s) for officeAddCn widget.
|
||||
FocusNode? officeAddCnFocusNode;
|
||||
TextEditingController? officeAddCnController;
|
||||
String? Function(BuildContext, String?)? officeAddCnControllerValidator;
|
||||
// State field(s) for BRno widget.
|
||||
FocusNode? bRnoFocusNode;
|
||||
TextEditingController? bRnoController;
|
||||
String? Function(BuildContext, String?)? bRnoControllerValidator;
|
||||
// Stores action output result for [Backend Call - API (Update Company Details)] action in Button widget.
|
||||
ApiCallResponse? updateCompany;
|
||||
// Model for newMember component.
|
||||
late NewMemberModel newMemberModel;
|
||||
// Model for NavBar1 component.
|
||||
late NavBar1Model navBar1Model;
|
||||
// Model for appbar component.
|
||||
late AppbarModel appbarModel;
|
||||
|
||||
/// Initialization and disposal methods.
|
||||
|
||||
void initState(BuildContext context) {
|
||||
newMemberModel = createModel(context, () => NewMemberModel());
|
||||
navBar1Model = createModel(context, () => NavBar1Model());
|
||||
appbarModel = createModel(context, () => AppbarModel());
|
||||
}
|
||||
|
||||
void dispose() {
|
||||
unfocusNode.dispose();
|
||||
companyEnFocusNode?.dispose();
|
||||
companyEnController?.dispose();
|
||||
|
||||
companyCnFocusNode?.dispose();
|
||||
companyCnController?.dispose();
|
||||
|
||||
officeAddEnFocusNode?.dispose();
|
||||
officeAddEnController?.dispose();
|
||||
|
||||
officeAddCnFocusNode?.dispose();
|
||||
officeAddCnController?.dispose();
|
||||
|
||||
bRnoFocusNode?.dispose();
|
||||
bRnoController?.dispose();
|
||||
|
||||
newMemberModel.dispose();
|
||||
navBar1Model.dispose();
|
||||
appbarModel.dispose();
|
||||
}
|
||||
|
||||
/// Action blocks are added here.
|
||||
|
||||
/// Additional helper methods are added here.
|
||||
}
|
||||
1852
lib/general_info/dashboard/dashboard_widget.dart
Normal file
1852
lib/general_info/dashboard/dashboard_widget.dart
Normal file
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user