1783 lines
118 KiB
Dart
1783 lines
118 KiB
Dart
import '/backend/api_requests/api_calls.dart';
|
|
import '/components/alert_box_custom_widget.dart';
|
|
import '/components/appbar_widget.dart';
|
|
import '/components/emptylist_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 '/flutterlib/custom_functions.dart' as functions;
|
|
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:font_awesome_flutter/font_awesome_flutter.dart';
|
|
import 'package:google_fonts/google_fonts.dart';
|
|
import 'package:provider/provider.dart';
|
|
import 'bk4_model.dart';
|
|
export 'bk4_model.dart';
|
|
|
|
class Bk4Widget extends StatefulWidget {
|
|
const Bk4Widget({Key? key}) : super(key: key);
|
|
|
|
@override
|
|
_Bk4WidgetState createState() => _Bk4WidgetState();
|
|
}
|
|
|
|
class _Bk4WidgetState extends State<Bk4Widget> with TickerProviderStateMixin {
|
|
late Bk4Model _model;
|
|
|
|
final scaffoldKey = GlobalKey<ScaffoldState>();
|
|
|
|
@override
|
|
void initState() {
|
|
super.initState();
|
|
_model = createModel(context, () => Bk4Model());
|
|
|
|
// On page load action.
|
|
SchedulerBinding.instance.addPostFrameCallback((_) async {
|
|
_model.apiResult26 =
|
|
await NumstationGroup.checkRoleHasPermissionCall.call(
|
|
token: FFAppState().token,
|
|
roleId: FFAppState().roleID,
|
|
permissionId: 26,
|
|
);
|
|
if ((_model.apiResult26?.succeeded ?? true)) {
|
|
setState(() {
|
|
_model.checkPermission26 = getJsonField(
|
|
(_model.apiResult26?.jsonBody ?? ''),
|
|
r'''$.success''',
|
|
);
|
|
});
|
|
}
|
|
_model.apiResult27 =
|
|
await NumstationGroup.checkRoleHasPermissionCall.call(
|
|
token: FFAppState().token,
|
|
roleId: FFAppState().roleID,
|
|
permissionId: 27,
|
|
);
|
|
if ((_model.apiResult27?.succeeded ?? true)) {
|
|
setState(() {
|
|
_model.checkPermission27 = getJsonField(
|
|
(_model.apiResult27?.jsonBody ?? ''),
|
|
r'''$.success''',
|
|
);
|
|
});
|
|
}
|
|
});
|
|
|
|
_model.tabBarController = TabController(
|
|
vsync: this,
|
|
length: 2,
|
|
initialIndex: 0,
|
|
)..addListener(() => setState(() {}));
|
|
}
|
|
|
|
@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(
|
|
're5rbx09' /* 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(
|
|
'qs70cecx' /* 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(
|
|
'zv4izkcy' /* 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(
|
|
'57u6rc26' /* 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(
|
|
'8yay9tkl' /* 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(
|
|
'gw7vfl46' /* 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: [
|
|
Column(
|
|
mainAxisSize: MainAxisSize.max,
|
|
children: [
|
|
Padding(
|
|
padding:
|
|
EdgeInsetsDirectional.fromSTEB(0.0, 120.0, 0.0, 0.0),
|
|
child: Column(
|
|
mainAxisSize: MainAxisSize.max,
|
|
mainAxisAlignment: MainAxisAlignment.start,
|
|
children: [
|
|
Align(
|
|
alignment: AlignmentDirectional(0.0, 0.0),
|
|
child: Padding(
|
|
padding: EdgeInsetsDirectional.fromSTEB(
|
|
0.0, 0.0, 0.0, 8.0),
|
|
child: Text(
|
|
FFLocalizations.of(context).getText(
|
|
'vk1k96by' /* Bookkeeping Service */,
|
|
),
|
|
style: FlutterTheme.of(context)
|
|
.bodyMedium
|
|
.override(
|
|
fontFamily: 'Readex Pro',
|
|
color: Color(0xFF364257),
|
|
fontSize: 24.0,
|
|
),
|
|
),
|
|
),
|
|
),
|
|
Padding(
|
|
padding: EdgeInsetsDirectional.fromSTEB(
|
|
0.0, 0.0, 0.0, 16.0),
|
|
child: Row(
|
|
mainAxisSize: MainAxisSize.max,
|
|
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
|
|
children: [
|
|
Builder(
|
|
builder: (context) => Padding(
|
|
padding: EdgeInsetsDirectional.fromSTEB(
|
|
18.0, 0.0, 0.0, 0.0),
|
|
child: FFButtonWidget(
|
|
onPressed: () async {
|
|
if (_model.checkPermission27 == true) {
|
|
context.pushNamed('bk4_1');
|
|
} else {
|
|
await showAlignedDialog(
|
|
context: context,
|
|
isGlobal: true,
|
|
avoidOverflow: false,
|
|
targetAnchor: AlignmentDirectional(
|
|
0.0, 0.0)
|
|
.resolve(
|
|
Directionality.of(context)),
|
|
followerAnchor: AlignmentDirectional(
|
|
0.0, 0.0)
|
|
.resolve(
|
|
Directionality.of(context)),
|
|
builder: (dialogContext) {
|
|
return Material(
|
|
color: Colors.transparent,
|
|
child: GestureDetector(
|
|
onTap: () => _model.unfocusNode
|
|
.canRequestFocus
|
|
? FocusScope.of(context)
|
|
.requestFocus(
|
|
_model.unfocusNode)
|
|
: FocusScope.of(context)
|
|
.unfocus(),
|
|
child: AlertBoxCustomWidget(
|
|
text:
|
|
'Your role don\'t have this permission!',
|
|
),
|
|
),
|
|
);
|
|
},
|
|
).then((value) => setState(() {}));
|
|
}
|
|
},
|
|
text: FFLocalizations.of(context).getText(
|
|
'01anc7ch' /* New Queue */,
|
|
),
|
|
options: FFButtonOptions(
|
|
width: 154.0,
|
|
height: 50.0,
|
|
padding: EdgeInsets.all(0.0),
|
|
iconPadding:
|
|
EdgeInsetsDirectional.fromSTEB(
|
|
0.0, 0.0, 0.0, 0.0),
|
|
color: Color(0xFFF3CF5D),
|
|
textStyle: FlutterTheme.of(context)
|
|
.titleSmall
|
|
.override(
|
|
fontFamily: 'Roboto',
|
|
color: Color(0xFF364257),
|
|
fontSize: 16.0,
|
|
),
|
|
elevation: 3.0,
|
|
borderSide: BorderSide(
|
|
color: Colors.transparent,
|
|
width: 1.0,
|
|
),
|
|
borderRadius: BorderRadius.circular(40.0),
|
|
),
|
|
),
|
|
),
|
|
),
|
|
Builder(
|
|
builder: (context) => Padding(
|
|
padding: EdgeInsetsDirectional.fromSTEB(
|
|
10.0, 0.0, 18.0, 0.0),
|
|
child: FFButtonWidget(
|
|
onPressed: () async {
|
|
if (_model.checkPermission26 == true) {
|
|
context.pushNamed(
|
|
'search1',
|
|
queryParameters: {
|
|
'search': serializeParam(
|
|
'',
|
|
ParamType.String,
|
|
),
|
|
'status': serializeParam(
|
|
'',
|
|
ParamType.String,
|
|
),
|
|
'category': serializeParam(
|
|
'',
|
|
ParamType.String,
|
|
),
|
|
'fixDate': serializeParam(
|
|
'',
|
|
ParamType.String,
|
|
),
|
|
'dateFrom': serializeParam(
|
|
'',
|
|
ParamType.String,
|
|
),
|
|
'dateTo': serializeParam(
|
|
'',
|
|
ParamType.String,
|
|
),
|
|
}.withoutNulls,
|
|
);
|
|
} else {
|
|
await showAlignedDialog(
|
|
context: context,
|
|
isGlobal: true,
|
|
avoidOverflow: false,
|
|
targetAnchor: AlignmentDirectional(
|
|
0.0, 0.0)
|
|
.resolve(
|
|
Directionality.of(context)),
|
|
followerAnchor: AlignmentDirectional(
|
|
0.0, 0.0)
|
|
.resolve(
|
|
Directionality.of(context)),
|
|
builder: (dialogContext) {
|
|
return Material(
|
|
color: Colors.transparent,
|
|
child: GestureDetector(
|
|
onTap: () => _model.unfocusNode
|
|
.canRequestFocus
|
|
? FocusScope.of(context)
|
|
.requestFocus(
|
|
_model.unfocusNode)
|
|
: FocusScope.of(context)
|
|
.unfocus(),
|
|
child: AlertBoxCustomWidget(
|
|
text:
|
|
'Your role don\'t have this permission!',
|
|
),
|
|
),
|
|
);
|
|
},
|
|
).then((value) => setState(() {}));
|
|
}
|
|
},
|
|
text: FFLocalizations.of(context).getText(
|
|
'mued0tpl' /* Document Library */,
|
|
),
|
|
options: FFButtonOptions(
|
|
width: 154.0,
|
|
height: 50.0,
|
|
padding: EdgeInsets.all(0.0),
|
|
iconPadding:
|
|
EdgeInsetsDirectional.fromSTEB(
|
|
0.0, 0.0, 0.0, 0.0),
|
|
color: Color(0xFF009B9A),
|
|
textStyle: FlutterTheme.of(context)
|
|
.titleSmall
|
|
.override(
|
|
fontFamily: 'Roboto',
|
|
color: Colors.white,
|
|
fontSize: 16.0,
|
|
),
|
|
elevation: 3.0,
|
|
borderSide: BorderSide(
|
|
color: Colors.transparent,
|
|
width: 1.0,
|
|
),
|
|
borderRadius: BorderRadius.circular(40.0),
|
|
),
|
|
),
|
|
),
|
|
),
|
|
],
|
|
),
|
|
),
|
|
],
|
|
),
|
|
),
|
|
Expanded(
|
|
child: Padding(
|
|
padding: EdgeInsetsDirectional.fromSTEB(
|
|
10.0, 0.0, 10.0, 100.0),
|
|
child: FutureBuilder<ApiCallResponse>(
|
|
future: NumstationGroup.documentListCall.call(
|
|
token: FFAppState().token,
|
|
),
|
|
builder: (context, snapshot) {
|
|
// Customize what your widget looks like when it's loading.
|
|
if (!snapshot.hasData) {
|
|
return Center(
|
|
child: SizedBox(
|
|
width: 50.0,
|
|
height: 50.0,
|
|
child: CircularProgressIndicator(
|
|
valueColor: AlwaysStoppedAnimation<Color>(
|
|
FlutterTheme.of(context).info,
|
|
),
|
|
),
|
|
),
|
|
);
|
|
}
|
|
final tabBarDocumentListResponse = snapshot.data!;
|
|
return Column(
|
|
children: [
|
|
Align(
|
|
alignment: Alignment(0.0, 0),
|
|
child: FlutterButtonTabBar(
|
|
useToggleButtonStyle: true,
|
|
labelStyle: FlutterTheme.of(context)
|
|
.titleMedium
|
|
.override(
|
|
fontFamily: 'Readex Pro',
|
|
fontSize: 16.0,
|
|
),
|
|
unselectedLabelStyle: TextStyle(),
|
|
labelColor: Color(0xFF364257),
|
|
unselectedLabelColor: Colors.white,
|
|
backgroundColor: Colors.white,
|
|
unselectedBackgroundColor: Color(0xFF364257),
|
|
borderColor:
|
|
FlutterTheme.of(context).primary,
|
|
unselectedBorderColor:
|
|
FlutterTheme.of(context).alternate,
|
|
borderWidth: 2.0,
|
|
borderRadius: 0.0,
|
|
elevation: 0.0,
|
|
labelPadding: EdgeInsetsDirectional.fromSTEB(
|
|
0.0, 15.0, 0.0, 15.0),
|
|
buttonMargin: EdgeInsetsDirectional.fromSTEB(
|
|
8.0, 0.0, 8.0, 0.0),
|
|
padding: EdgeInsetsDirectional.fromSTEB(
|
|
14.0, 4.0, 14.0, 4.0),
|
|
tabs: [
|
|
Tab(
|
|
text: FFLocalizations.of(context).getText(
|
|
'gh2bumqt' /* In Queue List */,
|
|
),
|
|
icon: FaIcon(
|
|
FontAwesomeIcons.hourglassEnd,
|
|
),
|
|
),
|
|
Tab(
|
|
text: FFLocalizations.of(context).getText(
|
|
'662s4ei8' /* Completed List */,
|
|
),
|
|
icon: Icon(
|
|
Icons.file_download_done_rounded,
|
|
),
|
|
),
|
|
],
|
|
controller: _model.tabBarController,
|
|
),
|
|
),
|
|
Expanded(
|
|
child: TabBarView(
|
|
controller: _model.tabBarController,
|
|
physics: const NeverScrollableScrollPhysics(),
|
|
children: [
|
|
Column(
|
|
mainAxisSize: MainAxisSize.max,
|
|
children: [
|
|
Expanded(
|
|
child: Align(
|
|
alignment:
|
|
AlignmentDirectional(0.0, 0.0),
|
|
child: Container(
|
|
width: 390.0,
|
|
height: 600.0,
|
|
decoration: BoxDecoration(
|
|
color:
|
|
FlutterTheme.of(context)
|
|
.secondaryBackground,
|
|
),
|
|
child: Align(
|
|
alignment: AlignmentDirectional(
|
|
0.0, -1.0),
|
|
child: Builder(
|
|
builder: (context) {
|
|
final documentList =
|
|
getJsonField(
|
|
tabBarDocumentListResponse
|
|
.jsonBody,
|
|
r'''$.documents_in_queue''',
|
|
).toList();
|
|
if (documentList.isEmpty) {
|
|
return Center(
|
|
child:
|
|
EmptylistWidget(),
|
|
);
|
|
}
|
|
return SingleChildScrollView(
|
|
child: Column(
|
|
mainAxisSize:
|
|
MainAxisSize.max,
|
|
mainAxisAlignment:
|
|
MainAxisAlignment
|
|
.start,
|
|
children: List.generate(
|
|
documentList.length,
|
|
(documentListIndex) {
|
|
final documentListItem =
|
|
documentList[
|
|
documentListIndex];
|
|
return Padding(
|
|
padding:
|
|
EdgeInsetsDirectional
|
|
.fromSTEB(
|
|
10.0,
|
|
10.0,
|
|
10.0,
|
|
0.0),
|
|
child: Container(
|
|
width: () {
|
|
if (MediaQuery.sizeOf(
|
|
context)
|
|
.width <
|
|
428.0) {
|
|
return 310.0;
|
|
} else if (MediaQuery.sizeOf(
|
|
context)
|
|
.width >=
|
|
428.0) {
|
|
return 340.0;
|
|
} else {
|
|
return 350.0;
|
|
}
|
|
}(),
|
|
height: 144.0,
|
|
decoration:
|
|
BoxDecoration(
|
|
color: functions
|
|
.getStatusColor(
|
|
getJsonField(
|
|
documentListItem,
|
|
r'''$.status''',
|
|
).toString()),
|
|
boxShadow: [
|
|
BoxShadow(
|
|
blurRadius:
|
|
4.0,
|
|
color: Color(
|
|
0x33000000),
|
|
offset:
|
|
Offset(
|
|
2.0,
|
|
5.0),
|
|
)
|
|
],
|
|
borderRadius:
|
|
BorderRadius
|
|
.circular(
|
|
8.0),
|
|
border:
|
|
Border.all(
|
|
width: 0.01,
|
|
),
|
|
),
|
|
child: Align(
|
|
alignment:
|
|
AlignmentDirectional(
|
|
0.0,
|
|
0.0),
|
|
child: Column(
|
|
mainAxisSize:
|
|
MainAxisSize
|
|
.max,
|
|
mainAxisAlignment:
|
|
MainAxisAlignment
|
|
.start,
|
|
children: [
|
|
Padding(
|
|
padding: EdgeInsetsDirectional.fromSTEB(
|
|
8.0,
|
|
8.0,
|
|
0.0,
|
|
0.0),
|
|
child:
|
|
Row(
|
|
mainAxisSize:
|
|
MainAxisSize.max,
|
|
children: [
|
|
if (_model.checkPermission26 ==
|
|
true)
|
|
InkWell(
|
|
splashColor: Colors.transparent,
|
|
focusColor: Colors.transparent,
|
|
hoverColor: Colors.transparent,
|
|
highlightColor: Colors.transparent,
|
|
onTap: () async {
|
|
context.pushNamed('bk4_2');
|
|
},
|
|
child: ClipRRect(
|
|
borderRadius: BorderRadius.circular(8.0),
|
|
child: SvgPicture.asset(
|
|
'assets/images/Menu.svg',
|
|
width: 24.0,
|
|
height: 24.0,
|
|
fit: BoxFit.contain,
|
|
),
|
|
),
|
|
),
|
|
],
|
|
),
|
|
),
|
|
Padding(
|
|
padding: EdgeInsetsDirectional.fromSTEB(
|
|
8.0,
|
|
14.0,
|
|
0.0,
|
|
0.0),
|
|
child:
|
|
Row(
|
|
mainAxisSize:
|
|
MainAxisSize.max,
|
|
children: [
|
|
ClipRRect(
|
|
borderRadius:
|
|
BorderRadius.circular(8.0),
|
|
child:
|
|
SvgPicture.asset(
|
|
'assets/images/XMLID_2001_.svg',
|
|
width: 45.0,
|
|
height: 58.0,
|
|
fit: BoxFit.none,
|
|
),
|
|
),
|
|
Column(
|
|
mainAxisSize:
|
|
MainAxisSize.max,
|
|
crossAxisAlignment:
|
|
CrossAxisAlignment.start,
|
|
children: [
|
|
Row(
|
|
mainAxisSize: MainAxisSize.max,
|
|
children: [
|
|
Padding(
|
|
padding: EdgeInsetsDirectional.fromSTEB(10.0, 0.0, 0.0, 5.0),
|
|
child: Text(
|
|
getJsonField(
|
|
documentListItem,
|
|
r'''$.name''',
|
|
).toString(),
|
|
style: FlutterTheme.of(context).bodyMedium.override(
|
|
fontFamily: 'Readex Pro',
|
|
fontSize: 16.0,
|
|
),
|
|
),
|
|
),
|
|
],
|
|
),
|
|
Align(
|
|
alignment: AlignmentDirectional(-1.0, 0.0),
|
|
child: Row(
|
|
mainAxisSize: MainAxisSize.max,
|
|
children: [
|
|
Align(
|
|
alignment: AlignmentDirectional(-1.0, 0.0),
|
|
child: Padding(
|
|
padding: EdgeInsetsDirectional.fromSTEB(10.0, 0.0, 0.0, 5.0),
|
|
child: Text(
|
|
functions.getCategoryLabel(getJsonField(
|
|
documentListItem,
|
|
r'''$..bookkeeping_document_category_id''',
|
|
)),
|
|
style: FlutterTheme.of(context).bodyMedium.override(
|
|
fontFamily: 'Readex Pro',
|
|
fontSize: 16.0,
|
|
),
|
|
),
|
|
),
|
|
),
|
|
],
|
|
),
|
|
),
|
|
Row(
|
|
mainAxisSize: MainAxisSize.max,
|
|
children: [
|
|
Align(
|
|
alignment: AlignmentDirectional(-1.0, 0.0),
|
|
child: Padding(
|
|
padding: EdgeInsetsDirectional.fromSTEB(10.0, 0.0, 0.0, 0.0),
|
|
child: Text(
|
|
functions.getStatus2(getJsonField(
|
|
documentListItem,
|
|
r'''$.status''',
|
|
).toString()),
|
|
style: FlutterTheme.of(context).bodyMedium.override(
|
|
fontFamily: 'Readex Pro',
|
|
color: functions.getStatus2(getJsonField(
|
|
documentListItem,
|
|
r'''$.status''',
|
|
).toString()) ==
|
|
FFAppState().status
|
|
? Color(0xFF2C21FE)
|
|
: Color(0xFF364257),
|
|
),
|
|
),
|
|
),
|
|
),
|
|
if (functions.getStatus2(getJsonField(
|
|
documentListItem,
|
|
r'''$.status''',
|
|
).toString()) ==
|
|
FFAppState().failed)
|
|
Row(
|
|
mainAxisSize: MainAxisSize.max,
|
|
children: [
|
|
Padding(
|
|
padding: EdgeInsetsDirectional.fromSTEB(5.0, 0.0, 0.0, 0.0),
|
|
child: ClipRRect(
|
|
borderRadius: BorderRadius.circular(8.0),
|
|
child: SvgPicture.asset(
|
|
'assets/images/flag-2.svg',
|
|
width: 24.0,
|
|
height: 24.0,
|
|
fit: BoxFit.cover,
|
|
),
|
|
),
|
|
),
|
|
Padding(
|
|
padding: EdgeInsetsDirectional.fromSTEB(5.0, 0.0, 0.0, 0.0),
|
|
child: Text(
|
|
FFLocalizations.of(context).getText(
|
|
'rtmkv970' /* Reupload */,
|
|
),
|
|
style: FlutterTheme.of(context).bodyMedium.override(
|
|
fontFamily: 'Readex Pro',
|
|
color: Color(0xFFFF0000),
|
|
fontSize: 16.0,
|
|
decoration: TextDecoration.underline,
|
|
),
|
|
),
|
|
),
|
|
],
|
|
),
|
|
],
|
|
),
|
|
],
|
|
),
|
|
if (_model.checkPermission26 ==
|
|
true)
|
|
Expanded(
|
|
child: Align(
|
|
alignment: AlignmentDirectional(1.0, 0.0),
|
|
child: Padding(
|
|
padding: EdgeInsetsDirectional.fromSTEB(0.0, 0.0, 8.0, 0.0),
|
|
child: InkWell(
|
|
splashColor: Colors.transparent,
|
|
focusColor: Colors.transparent,
|
|
hoverColor: Colors.transparent,
|
|
highlightColor: Colors.transparent,
|
|
onTap: () async {
|
|
_model.apiResult4qr = await NumstationGroup.viewDocumentCall.call(
|
|
token: FFAppState().token,
|
|
id: getJsonField(
|
|
documentListItem,
|
|
r'''$..id''',
|
|
).toString(),
|
|
);
|
|
if ((_model.apiResult4qr?.succeeded ?? true)) {
|
|
context.pushNamed(
|
|
'bk_view',
|
|
queryParameters: {
|
|
'fileUrl': serializeParam(
|
|
getJsonField(
|
|
documentListItem,
|
|
r'''$..url''',
|
|
),
|
|
ParamType.JSON,
|
|
),
|
|
}.withoutNulls,
|
|
);
|
|
}
|
|
|
|
setState(() {});
|
|
},
|
|
child: Container(
|
|
width: 34.0,
|
|
height: 34.0,
|
|
decoration: BoxDecoration(
|
|
color: Color(0xFF009B9A),
|
|
shape: BoxShape.circle,
|
|
),
|
|
child: Align(
|
|
alignment: AlignmentDirectional(0.0, 0.0),
|
|
child: Icon(
|
|
Icons.remove_red_eye_outlined,
|
|
color: Colors.white,
|
|
size: 24.0,
|
|
),
|
|
),
|
|
),
|
|
),
|
|
),
|
|
),
|
|
),
|
|
],
|
|
),
|
|
),
|
|
Expanded(
|
|
child:
|
|
Row(
|
|
mainAxisSize:
|
|
MainAxisSize.max,
|
|
mainAxisAlignment:
|
|
MainAxisAlignment.end,
|
|
crossAxisAlignment:
|
|
CrossAxisAlignment.end,
|
|
children: [
|
|
Align(
|
|
alignment:
|
|
AlignmentDirectional(1.0, 0.0),
|
|
child:
|
|
Text(
|
|
functions.formatDate2(getJsonField(
|
|
documentListItem,
|
|
r'''$.created_at''',
|
|
).toString()),
|
|
style: FlutterTheme.of(context).bodyMedium,
|
|
),
|
|
),
|
|
Align(
|
|
alignment:
|
|
AlignmentDirectional(1.0, 0.0),
|
|
child:
|
|
Text(
|
|
FFLocalizations.of(context).getText(
|
|
'hhqh6548' /* - */,
|
|
),
|
|
style: FlutterTheme.of(context).bodyMedium,
|
|
),
|
|
),
|
|
Align(
|
|
alignment:
|
|
AlignmentDirectional(1.0, 0.0),
|
|
child:
|
|
Padding(
|
|
padding: EdgeInsetsDirectional.fromSTEB(0.0, 0.0, 10.0, 0.0),
|
|
child: Text(
|
|
functions.formatTime(getJsonField(
|
|
documentListItem,
|
|
r'''$.created_at''',
|
|
).toString()),
|
|
style: FlutterTheme.of(context).bodyMedium,
|
|
),
|
|
),
|
|
),
|
|
],
|
|
),
|
|
),
|
|
],
|
|
),
|
|
),
|
|
),
|
|
);
|
|
}),
|
|
),
|
|
);
|
|
},
|
|
),
|
|
),
|
|
),
|
|
),
|
|
),
|
|
],
|
|
),
|
|
Column(
|
|
mainAxisSize: MainAxisSize.max,
|
|
children: [
|
|
Expanded(
|
|
child: Align(
|
|
alignment:
|
|
AlignmentDirectional(0.0, 0.0),
|
|
child: Container(
|
|
width: 390.0,
|
|
height: 600.0,
|
|
decoration: BoxDecoration(
|
|
color:
|
|
FlutterTheme.of(context)
|
|
.secondaryBackground,
|
|
),
|
|
child: Align(
|
|
alignment: AlignmentDirectional(
|
|
0.0, -1.0),
|
|
child: Builder(
|
|
builder: (context) {
|
|
final comList =
|
|
getJsonField(
|
|
tabBarDocumentListResponse
|
|
.jsonBody,
|
|
r'''$.documents_completed''',
|
|
).toList();
|
|
if (comList.isEmpty) {
|
|
return Center(
|
|
child:
|
|
EmptylistWidget(),
|
|
);
|
|
}
|
|
return SingleChildScrollView(
|
|
child: Column(
|
|
mainAxisSize:
|
|
MainAxisSize.max,
|
|
mainAxisAlignment:
|
|
MainAxisAlignment
|
|
.start,
|
|
children: List.generate(
|
|
comList.length,
|
|
(comListIndex) {
|
|
final comListItem =
|
|
comList[
|
|
comListIndex];
|
|
return Padding(
|
|
padding:
|
|
EdgeInsetsDirectional
|
|
.fromSTEB(
|
|
10.0,
|
|
14.0,
|
|
10.0,
|
|
0.0),
|
|
child: Container(
|
|
width: 328.0,
|
|
height: 215.0,
|
|
decoration:
|
|
BoxDecoration(
|
|
color: FlutterTheme.of(
|
|
context)
|
|
.secondaryBackground,
|
|
boxShadow: [
|
|
BoxShadow(
|
|
blurRadius:
|
|
4.0,
|
|
color: Color(
|
|
0x33000000),
|
|
offset:
|
|
Offset(
|
|
2.0,
|
|
5.0),
|
|
)
|
|
],
|
|
borderRadius:
|
|
BorderRadius
|
|
.circular(
|
|
8.0),
|
|
border:
|
|
Border.all(
|
|
width: 0.05,
|
|
),
|
|
),
|
|
child: Column(
|
|
mainAxisSize:
|
|
MainAxisSize
|
|
.max,
|
|
children: [
|
|
Padding(
|
|
padding: EdgeInsetsDirectional
|
|
.fromSTEB(
|
|
8.0,
|
|
8.0,
|
|
0.0,
|
|
0.0),
|
|
child: Row(
|
|
mainAxisSize:
|
|
MainAxisSize
|
|
.max,
|
|
children: [
|
|
if (_model.checkPermission26 ==
|
|
true)
|
|
InkWell(
|
|
splashColor:
|
|
Colors.transparent,
|
|
focusColor:
|
|
Colors.transparent,
|
|
hoverColor:
|
|
Colors.transparent,
|
|
highlightColor:
|
|
Colors.transparent,
|
|
onTap:
|
|
() async {
|
|
context.pushNamed('bk4_2');
|
|
},
|
|
child:
|
|
ClipRRect(
|
|
borderRadius: BorderRadius.circular(8.0),
|
|
child: SvgPicture.asset(
|
|
'assets/images/Menu.svg',
|
|
width: 24.0,
|
|
height: 24.0,
|
|
fit: BoxFit.contain,
|
|
),
|
|
),
|
|
),
|
|
],
|
|
),
|
|
),
|
|
Padding(
|
|
padding: EdgeInsetsDirectional
|
|
.fromSTEB(
|
|
8.0,
|
|
14.0,
|
|
0.0,
|
|
0.0),
|
|
child: Row(
|
|
mainAxisSize:
|
|
MainAxisSize
|
|
.max,
|
|
children: [
|
|
ClipRRect(
|
|
borderRadius:
|
|
BorderRadius.circular(8.0),
|
|
child:
|
|
SvgPicture.asset(
|
|
'assets/images/XMLID_2001_.svg',
|
|
width:
|
|
45.0,
|
|
height:
|
|
58.0,
|
|
fit:
|
|
BoxFit.none,
|
|
),
|
|
),
|
|
Column(
|
|
mainAxisSize:
|
|
MainAxisSize.max,
|
|
crossAxisAlignment:
|
|
CrossAxisAlignment.start,
|
|
children: [
|
|
Row(
|
|
mainAxisSize: MainAxisSize.max,
|
|
children: [
|
|
Padding(
|
|
padding: EdgeInsetsDirectional.fromSTEB(10.0, 0.0, 0.0, 5.0),
|
|
child: Text(
|
|
getJsonField(
|
|
comListItem,
|
|
r'''$.name''',
|
|
).toString(),
|
|
style: FlutterTheme.of(context).bodyMedium.override(
|
|
fontFamily: 'Readex Pro',
|
|
fontSize: 16.0,
|
|
),
|
|
),
|
|
),
|
|
],
|
|
),
|
|
Align(
|
|
alignment: AlignmentDirectional(-1.0, 0.0),
|
|
child: Row(
|
|
mainAxisSize: MainAxisSize.max,
|
|
children: [
|
|
Align(
|
|
alignment: AlignmentDirectional(-1.0, 0.0),
|
|
child: Padding(
|
|
padding: EdgeInsetsDirectional.fromSTEB(10.0, 0.0, 0.0, 5.0),
|
|
child: Text(
|
|
functions.getCategoryLabel(getJsonField(
|
|
comListItem,
|
|
r'''$..bookkeeping_document_category_id''',
|
|
)),
|
|
style: FlutterTheme.of(context).bodyMedium.override(
|
|
fontFamily: 'Readex Pro',
|
|
fontSize: 16.0,
|
|
),
|
|
),
|
|
),
|
|
),
|
|
],
|
|
),
|
|
),
|
|
Row(
|
|
mainAxisSize: MainAxisSize.max,
|
|
children: [
|
|
Align(
|
|
alignment: AlignmentDirectional(-1.0, 0.0),
|
|
child: Padding(
|
|
padding: EdgeInsetsDirectional.fromSTEB(10.0, 0.0, 0.0, 0.0),
|
|
child: Text(
|
|
FFLocalizations.of(context).getText(
|
|
'jvqo7gjv' /* Entry Completed */,
|
|
),
|
|
style: FlutterTheme.of(context).bodyMedium.override(
|
|
fontFamily: 'Readex Pro',
|
|
color: Color(0xFF06AE25),
|
|
),
|
|
),
|
|
),
|
|
),
|
|
],
|
|
),
|
|
],
|
|
),
|
|
if (_model.checkPermission26 ==
|
|
true)
|
|
Expanded(
|
|
child:
|
|
Align(
|
|
alignment: AlignmentDirectional(1.0, 0.0),
|
|
child: Padding(
|
|
padding: EdgeInsetsDirectional.fromSTEB(0.0, 0.0, 8.0, 0.0),
|
|
child: InkWell(
|
|
splashColor: Colors.transparent,
|
|
focusColor: Colors.transparent,
|
|
hoverColor: Colors.transparent,
|
|
highlightColor: Colors.transparent,
|
|
onTap: () async {
|
|
_model.apiResult8ni = await NumstationGroup.viewDocumentCall.call(
|
|
token: FFAppState().token,
|
|
id: getJsonField(
|
|
comListItem,
|
|
r'''$.id''',
|
|
).toString(),
|
|
);
|
|
if ((_model.apiResult8ni?.succeeded ?? true)) {
|
|
context.pushNamed(
|
|
'bk_view',
|
|
queryParameters: {
|
|
'fileUrl': serializeParam(
|
|
getJsonField(
|
|
comListItem,
|
|
r'''$..url''',
|
|
),
|
|
ParamType.JSON,
|
|
),
|
|
}.withoutNulls,
|
|
);
|
|
}
|
|
|
|
setState(() {});
|
|
},
|
|
child: Container(
|
|
width: 34.0,
|
|
height: 34.0,
|
|
decoration: BoxDecoration(
|
|
color: Color(0xFF009B9A),
|
|
shape: BoxShape.circle,
|
|
),
|
|
child: Align(
|
|
alignment: AlignmentDirectional(0.0, 0.0),
|
|
child: Icon(
|
|
Icons.remove_red_eye_outlined,
|
|
color: Colors.white,
|
|
size: 24.0,
|
|
),
|
|
),
|
|
),
|
|
),
|
|
),
|
|
),
|
|
),
|
|
],
|
|
),
|
|
),
|
|
SizedBox(
|
|
width:
|
|
300.0,
|
|
child:
|
|
Divider(
|
|
thickness:
|
|
1.0,
|
|
color: Color(
|
|
0xFF06AE25),
|
|
),
|
|
),
|
|
Row(
|
|
mainAxisSize:
|
|
MainAxisSize
|
|
.max,
|
|
mainAxisAlignment:
|
|
MainAxisAlignment
|
|
.center,
|
|
children: [
|
|
Padding(
|
|
padding: EdgeInsetsDirectional.fromSTEB(
|
|
0.0,
|
|
0.0,
|
|
30.0,
|
|
0.0),
|
|
child:
|
|
Column(
|
|
mainAxisSize:
|
|
MainAxisSize.max,
|
|
children: [
|
|
Text(
|
|
FFLocalizations.of(context).getText(
|
|
'xl104qv1' /* Xero Status */,
|
|
),
|
|
style: FlutterTheme.of(context).bodyMedium.override(
|
|
fontFamily: 'Readex Pro',
|
|
fontSize: 16.0,
|
|
),
|
|
),
|
|
Icon(
|
|
Icons.check,
|
|
color: Color(0xFF58C2B1),
|
|
size: 30.0,
|
|
),
|
|
],
|
|
),
|
|
),
|
|
SizedBox(
|
|
height:
|
|
60.0,
|
|
child:
|
|
VerticalDivider(
|
|
color:
|
|
Color(0xFF06AE25),
|
|
),
|
|
),
|
|
Padding(
|
|
padding: EdgeInsetsDirectional.fromSTEB(
|
|
30.0,
|
|
0.0,
|
|
0.0,
|
|
0.0),
|
|
child:
|
|
Column(
|
|
mainAxisSize:
|
|
MainAxisSize.max,
|
|
mainAxisAlignment:
|
|
MainAxisAlignment.start,
|
|
children: [
|
|
Text(
|
|
FFLocalizations.of(context).getText(
|
|
'8ux4q9ah' /* Xero Amount */,
|
|
),
|
|
style: FlutterTheme.of(context).bodyMedium.override(
|
|
fontFamily: 'Readex Pro',
|
|
fontSize: 16.0,
|
|
),
|
|
),
|
|
Row(
|
|
mainAxisSize: MainAxisSize.max,
|
|
mainAxisAlignment: MainAxisAlignment.center,
|
|
children: [
|
|
Padding(
|
|
padding: EdgeInsetsDirectional.fromSTEB(0.0, 10.0, 0.0, 0.0),
|
|
child: Text(
|
|
FFLocalizations.of(context).getText(
|
|
'0ivv4cy7' /* $ */,
|
|
),
|
|
style: FlutterTheme.of(context).bodyMedium.override(
|
|
fontFamily: 'Readex Pro',
|
|
fontSize: 16.0,
|
|
),
|
|
),
|
|
),
|
|
Padding(
|
|
padding: EdgeInsetsDirectional.fromSTEB(0.0, 10.0, 0.0, 0.0),
|
|
child: Text(
|
|
getJsonField(
|
|
comListItem,
|
|
r'''$.xero_amount''',
|
|
).toString(),
|
|
style: FlutterTheme.of(context).bodyMedium.override(
|
|
fontFamily: 'Readex Pro',
|
|
fontSize: 16.0,
|
|
),
|
|
),
|
|
),
|
|
],
|
|
),
|
|
],
|
|
),
|
|
),
|
|
],
|
|
),
|
|
Expanded(
|
|
child: Row(
|
|
mainAxisSize:
|
|
MainAxisSize
|
|
.max,
|
|
mainAxisAlignment:
|
|
MainAxisAlignment
|
|
.end,
|
|
crossAxisAlignment:
|
|
CrossAxisAlignment
|
|
.end,
|
|
children: [
|
|
Align(
|
|
alignment: AlignmentDirectional(
|
|
1.0,
|
|
0.0),
|
|
child:
|
|
Text(
|
|
functions.formatDate2(getJsonField(
|
|
comListItem,
|
|
r'''$.created_at''',
|
|
).toString()),
|
|
style:
|
|
FlutterTheme.of(context).bodyMedium,
|
|
),
|
|
),
|
|
Align(
|
|
alignment: AlignmentDirectional(
|
|
1.0,
|
|
0.0),
|
|
child:
|
|
Text(
|
|
FFLocalizations.of(context).getText(
|
|
'pj790bxx' /* - */,
|
|
),
|
|
style:
|
|
FlutterTheme.of(context).bodyMedium,
|
|
),
|
|
),
|
|
Align(
|
|
alignment: AlignmentDirectional(
|
|
1.0,
|
|
0.0),
|
|
child:
|
|
Padding(
|
|
padding: EdgeInsetsDirectional.fromSTEB(
|
|
0.0,
|
|
0.0,
|
|
10.0,
|
|
0.0),
|
|
child:
|
|
Text(
|
|
functions.formatTime(getJsonField(
|
|
comListItem,
|
|
r'''$.created_at''',
|
|
).toString()),
|
|
style: FlutterTheme.of(context).bodyMedium,
|
|
),
|
|
),
|
|
),
|
|
],
|
|
),
|
|
),
|
|
],
|
|
),
|
|
),
|
|
);
|
|
}),
|
|
),
|
|
);
|
|
},
|
|
),
|
|
),
|
|
),
|
|
),
|
|
),
|
|
],
|
|
),
|
|
],
|
|
),
|
|
),
|
|
],
|
|
);
|
|
},
|
|
),
|
|
),
|
|
),
|
|
],
|
|
),
|
|
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,
|
|
),
|
|
),
|
|
),
|
|
),
|
|
),
|
|
),
|
|
],
|
|
),
|
|
),
|
|
),
|
|
);
|
|
}
|
|
}
|