Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Sai Srinivas
GEN_ERP_2025
Commits
ecd8fcd1
Commit
ecd8fcd1
authored
Jul 07, 2025
by
Sai Srinivas
Browse files
07-07-2025 By Sai Srinivas
Pubspec and Safe Area.
parent
67ab0f3e
Changes
92
Hide whitespace changes
Inline
Side-by-side
lib/screens/commom/transactionDetails.dart
View file @
ecd8fcd1
import
'dart:io'
;
import
'package:flutter/material.dart'
;
import
'package:generp/Utils/app_colors.dart'
;
import
'package:generp/Utils/commonWidgets.dart'
;
...
...
@@ -35,12 +37,14 @@ class _TransactiondetailsState extends State<Transactiondetails> {
return
Consumer
<
Paymentrequisitionpaymentslistprovider
>(
builder:
(
context
,
provider
,
child
)
{
var
details
=
provider
.
paymentDetails
;
return
Scaffold
(
resizeToAvoidBottomInset:
true
,
appBar:
appbar
(
context
,
"Details"
),
backgroundColor:
AppColors
.
scaffold_bg_color
,
body:
SafeArea
(
child:
Container
(
return
SafeArea
(
top:
false
,
bottom:
Platform
.
isIOS
?
false
:
true
,
child:
Scaffold
(
resizeToAvoidBottomInset:
true
,
appBar:
appbar
(
context
,
"Details"
),
backgroundColor:
AppColors
.
scaffold_bg_color
,
body:
Container
(
margin:
EdgeInsets
.
symmetric
(
vertical:
10
,
horizontal:
10
),
child:
SingleChildScrollView
(
child:
Container
(
...
...
lib/screens/crm/AppointmentDetails.dart
View file @
ecd8fcd1
import
'dart:io'
;
import
'package:dropdown_button2/dropdown_button2.dart'
;
import
'package:flutter/material.dart'
;
import
'package:flutter/services.dart'
;
...
...
@@ -26,12 +28,14 @@ Dropdowntheme ddtheme = Dropdowntheme();
var
quotationDetails
=
provider
.
appointmentDetails
;
return
WillPopScope
(
onWillPop:
()
=>
onBackPressed
(
context
),
child:
Scaffold
(
resizeToAvoidBottomInset:
true
,
appBar:
appbar
(
context
,
"Appointment Details"
),
backgroundColor:
AppColors
.
scaffold_bg_color
,
body:
SafeArea
(
child:
SizedBox
(
child:
SafeArea
(
top:
false
,
bottom:
Platform
.
isIOS
?
false
:
true
,
child:
Scaffold
(
resizeToAvoidBottomInset:
true
,
appBar:
appbar
(
context
,
"Appointment Details"
),
backgroundColor:
AppColors
.
scaffold_bg_color
,
body:
SizedBox
(
child:
SingleChildScrollView
(
child:
Column
(
crossAxisAlignment:
CrossAxisAlignment
.
start
,
...
...
@@ -119,40 +123,40 @@ Dropdowntheme ddtheme = Dropdowntheme();
),
),
),
),
floatingActionButton:
Align
(
alignment:
Alignment
.
bottomCenter
,
child:
InkWell
(
onTap:
()
{
_showAddAppointmentSheet
(
context
);
},
child:
Contain
er
(
alignment:
Alignment
.
bottomCenter
,
height:
45
,
width:
MediaQuery
.
of
(
context
)
.
size
.
width
,
margin:
EdgeInsets
.
symmetric
(
horizontal:
10
),
decoration:
BoxDecoration
(
color:
AppColors
.
app_blue
,
borderRadius:
BorderRadius
.
circular
(
14.0
),
),
child:
Center
(
child:
Text
(
"Add Appointm
ent
"
,
textAlign:
TextAlign
.
center
,
style:
TextStyle
(
color:
Colors
.
white
,
fontFamily:
"JakartaMedium"
,
floatingActionButton:
Align
(
alignment:
Alignment
.
bottomCenter
,
child:
InkWell
(
onTap:
()
{
_showAddAppointmentSheet
(
context
);
},
child:
Container
(
alignment:
Alignment
.
bottomCent
er
,
height:
45
,
width:
MediaQuery
.
of
(
context
)
.
size
.
width
,
margin:
EdgeInsets
.
symmetric
(
horizontal:
10
)
,
decoration:
BoxDecoration
(
color:
AppColors
.
app_blue
,
borderRadius:
BorderRadius
.
circular
(
14.0
)
,
),
child:
Center
(
child:
Text
(
"Add Appointment"
,
textAlign:
TextAlign
.
c
ent
er
,
style:
TextStyle
(
color:
Colors
.
white
,
fontFamily:
"JakartaMedium"
,
)
,
),
),
),
),
),
floatingActionButtonLocation:
FloatingActionButtonLocation
.
centerFloat
,
),
floatingActionButtonLocation:
FloatingActionButtonLocation
.
centerFloat
,
),
);
},
...
...
lib/screens/crm/FollowUpDetails.dart
View file @
ecd8fcd1
import
'dart:io'
;
import
'package:flutter/material.dart'
;
import
'package:flutter_svg/svg.dart'
;
import
'package:provider/provider.dart'
;
...
...
@@ -21,12 +23,14 @@ class _FollowUpDetailsState extends State<FollowUpDetails> {
var
followupDetails
=
provider
.
followupDetails
;
return
WillPopScope
(
onWillPop:
()
=>
onBackPressed
(
context
),
child:
Scaffold
(
resizeToAvoidBottomInset:
true
,
appBar:
appbar
(
context
,
"Followup Details"
),
backgroundColor:
AppColors
.
scaffold_bg_color
,
body:
SafeArea
(
child:
SizedBox
(
child:
SafeArea
(
top:
false
,
bottom:
Platform
.
isIOS
?
false
:
true
,
child:
Scaffold
(
resizeToAvoidBottomInset:
true
,
appBar:
appbar
(
context
,
"Followup Details"
),
backgroundColor:
AppColors
.
scaffold_bg_color
,
body:
SizedBox
(
child:
SingleChildScrollView
(
child:
Column
(
crossAxisAlignment:
CrossAxisAlignment
.
start
,
...
...
@@ -52,7 +56,7 @@ class _FollowUpDetailsState extends State<FollowUpDetails> {
child:
Column
(
crossAxisAlignment:
CrossAxisAlignment
.
start
,
children:
[
...
List
.
generate
(
4
,
(
j
)
{
final
textheads
=
[
"Employee Name"
,
...
...
@@ -107,8 +111,8 @@ class _FollowUpDetailsState extends State<FollowUpDetails> {
),
),
),
),
),
),
);
},
...
...
lib/screens/crm/LeadDetailsByMode.dart
View file @
ecd8fcd1
import
'dart:io'
;
import
'package:flutter/material.dart'
;
import
'package:flutter_svg/svg.dart'
;
import
'package:generp/Notifiers/crmProvider/crmLeadDetailsProvider.dart'
;
...
...
@@ -101,184 +103,188 @@ class _LeadDetailsByModeState extends State<LeadDetailsByMode> {
}
return
WillPopScope
(
child:
Scaffold
(
resizeToAvoidBottomInset:
true
,
appBar:
appbar2
(
context
,
"Lead Details (
${widget.mode}
)"
,
provider
.
resetAll
,
InkResponse
(
onTap:
()
{
_showOptionsSheet
(
context
);
},
child:
SvgPicture
.
asset
(
"assets/svg/ic_more.svg"
,
height:
30
),
child:
SafeArea
(
top:
false
,
bottom:
Platform
.
isIOS
?
false
:
true
,
child:
Scaffold
(
resizeToAvoidBottomInset:
true
,
appBar:
appbar2
(
context
,
"Lead Details (
${widget.mode}
)"
,
provider
.
resetAll
,
InkResponse
(
onTap:
()
{
_showOptionsSheet
(
context
);
},
child:
SvgPicture
.
asset
(
"assets/svg/ic_more.svg"
,
height:
30
),
),
),
)
,
backgroundColor:
AppColors
.
scaffold_bg_color
,
body:
Container
(
child:
SingleChildScrollView
(
child:
Container
(
decoration:
BoxDecoration
(
color:
Colors
.
white
,
borderRadius:
BorderRadius
.
circular
(
16
),
),
marg
in:
EdgeInsets
.
symmetric
(
vertical:
10
,
horizontal:
10
),
padding:
EdgeInsets
.
symmetric
(
vertical:
10
,
horizontal:
10
),
child
:
Column
(
children:
[
Row
(
children:
[
Expanded
(
flex:
1
,
child:
Container
(
height:
50
,
width:
35
,
padding:
EdgeInsets
.
all
(
8.0
),
decoration:
BoxDecoration
(
color:
Color
(
0xFFE6F6FF
),
borderRadius:
BorderRadius
.
circular
(
8
),
),
child:
SvgPicture
.
asset
(
"assets/svg/se_block_head.svg"
,
backgroundColor:
AppColors
.
scaffold_bg_color
,
body:
Container
(
child:
SingleChildScrollView
(
child:
Container
(
decoration:
BoxDecoration
(
color:
Colors
.
white
,
borderRadius:
BorderRadius
.
circular
(
16
)
,
),
margin:
EdgeInsets
.
symmetric
(
vertical:
10
,
horizontal:
10
),
padd
in
g
:
EdgeInsets
.
symmetric
(
vertical:
10
,
horizontal:
10
),
child:
Column
(
child
ren:
[
Row
(
children:
[
Expanded
(
flex:
1
,
child:
Container
(
height:
50
,
width:
35
,
padding:
EdgeInsets
.
all
(
8.0
)
,
decoration:
BoxDecoration
(
color:
Color
(
0xFFE6F6FF
),
borderRadius:
BorderRadius
.
circular
(
8
),
),
child:
SvgPicture
.
asset
(
"assets/svg/se_block_head.svg"
,
)
,
),
),
),
SizedBox
(
width:
10
),
Expanded
(
flex:
4
,
child:
SizedBox
(
child:
Column
(
crossAxisAlignm
en
t
:
CrossAxisAlignment
.
start
,
children:
[
Text
(
leadDetails
.
name
??
"-"
,
style:
TextStyle
(
font
Family:
"JakartaMedium"
,
fontSize:
14
,
color:
AppColors
.
semi_black
,
SizedBox
(
width:
10
),
Expanded
(
flex:
4
,
child:
SizedBox
(
child:
Column
(
crossAxisAlignment:
CrossAxisAlignment
.
start
,
childr
en:
[
Text
(
leadDetails
.
name
??
"-"
,
style:
TextStyle
(
fontFamily:
"JakartaMedium"
,
font
Size:
14
,
color:
AppColors
.
semi_black
,
)
,
),
)
,
]
,
]
,
)
,
),
),
),
SizedBox
(
width:
10
),
if
(
provider
.
showEditButton
==
"1"
)
Expanded
(
flex:
1
,
child:
InkResponse
(
onTap:
()
async
{
var
res
=
await
Navigator
.
push
(
context
,
MaterialPageRoute
(
builder:
(
context
)
=>
EditAccountDetails
(
leadID:
leadDetails
.
id
,
mode:
widget
.
mode
,
accountID:
leadDetails
.
accId
,
companyName:
leadDetails
.
name
,
),
SizedBox
(
width:
10
),
if
(
provider
.
showEditButton
==
"1"
)
Expanded
(
flex:
1
,
child:
InkResponse
(
onTap:
()
async
{
var
res
=
await
Navigator
.
push
(
context
,
MaterialPageRoute
(
builder:
(
context
)
=>
EditAccountDetails
(
leadID:
leadDetails
.
id
,
mode:
widget
.
mode
,
accountID:
leadDetails
.
accId
,
companyName:
leadDetails
.
name
,
),
),
);
if
(
res
==
true
){
provider
.
crmLeadDetailsAPIFunction
(
context
,
widget
.
leadId
,
widget
.
mode
);
}
},
child:
Container
(
height:
32
,
width:
30
,
padding:
EdgeInsets
.
all
(
8.0
),
child:
SvgPicture
.
asset
(
"assets/svg/crm_contact_edit.svg"
,
),
);
if
(
res
==
true
){
provider
.
crmLeadDetailsAPIFunction
(
context
,
widget
.
leadId
,
widget
.
mode
);
}
},
child:
Container
(
height:
32
,
width:
30
,
padding:
EdgeInsets
.
all
(
8.0
),
child:
SvgPicture
.
asset
(
"assets/svg/crm_contact_edit.svg"
,
),
),
),
)
,
]
,
),
Divider
(
thickness:
0.5
,
color:
Color
(
0xFFD7D7D7
)),
...
List
.
generate
(
totalSubHeadings
.
length
,
(
j
)
{
return
Container
(
padding:
EdgeInsets
.
symmetric
(
vertical:
7
),
child:
Row
(
crossAxisAlignm
en
t
:
CrossAxisAlignment
.
start
,
children:
[
Expanded
(
child:
Text
(
totalHeadings
[
j
],
style:
TextStyle
(
font
Family:
"JakartaMedium"
,
fontSize:
14
,
color:
AppColors
.
semi_black
,
]
,
)
,
Divider
(
thickness:
0.5
,
color:
Color
(
0xFFD7D7D7
)
),
...
List
.
generate
(
totalSubHeadings
.
length
,
(
j
)
{
return
Container
(
padding:
EdgeInsets
.
symmetric
(
vertical:
7
),
child:
Row
(
crossAxisAlignment:
CrossAxisAlignment
.
start
,
childr
en:
[
Expanded
(
child:
Text
(
totalHeadings
[
j
],
style:
TextStyle
(
fontFamily:
"JakartaMedium"
,
font
Size:
14
,
color:
AppColors
.
semi_black
,
)
,
),
),
),
Expanded
(
child:
InkResponse
(
child:
totalHeadings
[
j
]
==
"Lead Age"
?
Tooltip
(
triggerMode:
TooltipTriggerMode
.
tap
,
Expanded
(
child:
InkResponse
(
child:
totalHeadings
[
j
]
==
"Lead Age"
?
Tooltip
(
triggerMode:
TooltipTriggerMode
.
tap
,
message:
"
${provider.leadDetails.createdDatetime}
"
,
child:
Text
(
totalSubHeadings
[
j
]
==
""
message:
"
${provider.leadDetails.createdDatetime}
"
,
child:
Text
(
totalSubHeadings
[
j
]
==
""
?
"-"
:
totalSubHeadings
[
j
],
style:
TextStyle
(
fontSize:
14
,
color:
Color
(
0xFF818181
),
decorationColor:
AppColors
.
grey_semi
,
decoration:
TextDecoration
.
underline
,
),
),
)
:
Text
(
totalSubHeadings
[
j
]
==
""
?
"-"
:
totalSubHeadings
[
j
],
style:
TextStyle
(
fontSize:
14
,
color:
Color
(
0xFF818181
),
decorationColor:
AppColors
.
grey_semi
,
decoration:
TextDecoration
.
underline
,
),
),
)
:
Text
(
totalSubHeadings
[
j
]
==
""
?
"-"
:
totalSubHeadings
[
j
],
style:
TextStyle
(
fontSize:
14
,
color:
Color
(
0xFF818181
),
),
),
),
),
)
,
]
,
)
,
);
}),
InkResponse
(
onTap:
()
async
{
provider
.
showMoreDetails
=
!
provider
.
showMoreDetails
;
},
child:
Container
(
padding:
EdgeInsets
.
symmetric
(
vertical:
5
,
),
child:
Row
(
c
rossAxisAlignment
:
Cross
AxisAlignment
.
center
,
m
ainAxisAlignment
:
MainAxisAlignment
.
center
,
children:
[
Text
(
provider
.
showMoreDetails
?
"- Show Less"
:
"+ More Details"
,
style:
TextStyle
(
font
Family:
"JakartaMedium"
,
fontSize:
14
,
color:
AppColors
.
app_blue
,
]
,
)
,
)
;
}),
InkResponse
(
onTap:
()
async
{
provider
.
showMoreDetails
=
!
provider
.
showMoreDetails
;
},
child:
Container
(
padding:
EdgeInsets
.
symmetric
(
vertical:
5
,
)
,
child:
Row
(
crossAxisAlignment:
C
rossAxisAlignment
.
center
,
main
AxisAlignment
:
M
ainAxisAlignment
.
center
,
children:
[
Text
(
provider
.
showMoreDetails
?
"- Show Less"
:
"+ More Details"
,
style:
TextStyle
(
fontFamily:
"JakartaMedium"
,
font
Size:
14
,
color:
AppColors
.
app_blue
,
)
,
),
),
],
],
),
),
),
)
,
]
,
]
,
)
,
),
),
),
...
...
lib/screens/crm/LeadListByMode.dart
View file @
ecd8fcd1
import
'dart:io'
;
import
'package:dropdown_button2/dropdown_button2.dart'
;
import
'package:flutter/material.dart'
;
import
'package:flutter/services.dart'
;
...
...
@@ -85,234 +87,235 @@ class _LeadlistbymodeState extends State<Leadlistbymode> {
onWillPop:
()
{
return
onBackPressed
(
context
);
},
child:
Scaffold
(
resizeToAvoidBottomInset:
true
,
appBar:
appbar2
(
context
,
widget
.
pageTitleName
,
provider
.
resetForm
,
Row
(
children:
[
InkResponse
(
onTap:
()
async
{
_showFilterSheet
(
context
);
},
child:
SvgPicture
.
asset
(
"assets/svg/filter_ic.svg"
,
height:
25
,
child:
SafeArea
(
top:
false
,
bottom:
Platform
.
isIOS
?
false
:
true
,
child:
Scaffold
(
resizeToAvoidBottomInset:
true
,
appBar:
appbar2
(
context
,
widget
.
pageTitleName
,
provider
.
resetForm
,
Row
(
children:
[
InkResponse
(
onTap:
()
async
{
_showFilterSheet
(
context
);
},
child:
SvgPicture
.
asset
(
"assets/svg/filter_ic.svg"
,
height:
25
,
),
),
)
,
]
,
]
,
)
,
),
),
backgroundColor:
AppColors
.
scaffold_bg_color
,
body:
SafeArea
(
child:
provider
.
isLoading
?
Center
(
child:
CircularProgressIndicator
.
adaptive
(
valueColor:
AlwaysStoppedAnimation
<
Color
>(
AppColors
.
app_blue
,
),
),
)
:
crmLists
.
isNotEmpty
?
SizedBox
(
child:
Scrollbar
(
thumbVisibility:
false
,
child:
ListView
.
builder
(
itemCount:
crmLists
.
length
,
shrinkWrap:
true
,
physics:
AlwaysScrollableScrollPhysics
(),
itemBuilder:
(
context
,
index
)
{
if
(
crmLists
.
isEmpty
)
{
return
SizedBox
(
child:
Center
(
child:
Text
(
"No Data Available"
),
),
);
}
return
Container
(
padding:
EdgeInsets
.
symmetric
(
horizontal:
10
,
vertical:
10
,
),
margin:
EdgeInsets
.
symmetric
(
horizontal:
10
,
vertical:
10
,
),
decoration:
BoxDecoration
(
color:
Colors
.
white
,
borderRadius:
BorderRadius
.
circular
(
16
),
),
child:
Column
(
backgroundColor:
AppColors
.
scaffold_bg_color
,
body:
provider
.
isLoading
?
Center
(
child:
CircularProgressIndicator
.
adaptive
(
valueColor:
AlwaysStoppedAnimation
<
Color
>(
AppColors
.
app_blue
,
),
),
)
:
crmLists
.
isNotEmpty
?
SizedBox
(
child:
Scrollbar
(
thumbVisibility:
false
,
child:
ListView
.
builder
(
itemCount:
crmLists
.
length
,
shrinkWrap:
true
,
physics:
AlwaysScrollableScrollPhysics
(),
itemBuilder:
(
context
,
index
)
{
if
(
crmLists
.
isEmpty
)
{
return
SizedBox
(
child:
Center
(
child:
Text
(
"No Data Available"
),
),
);
}
return
Container
(
padding:
EdgeInsets
.
symmetric
(
horizontal:
10
,
vertical:
10
,
),
margin:
EdgeInsets
.
symmetric
(
horizontal:
10
,
vertical:
10
,
),
decoration:
BoxDecoration
(
color:
Colors
.
white
,
borderRadius:
BorderRadius
.
circular
(
16
),
),
child:
Column
(
children:
[
Row
(
children:
[
Row
(
children:
[
Expanded
(
flex:
1
,
child:
Container
(
height:
50
,
width:
35
,
padding:
EdgeInsets
.
all
(
8.0
),
decoration:
BoxDecoration
(
color:
Color
(
0xFFE6F6FF
),
borderRadius:
BorderRadius
.
circular
(
8
),
Expanded
(
flex:
1
,
child:
Container
(
height:
50
,
width:
35
,
padding:
EdgeInsets
.
all
(
8.0
),
decoration:
BoxDecoration
(
color:
Color
(
0xFFE6F6FF
),
borderRadius:
BorderRadius
.
circular
(
8
),
),
child:
SvgPicture
.
asset
(
"assets/svg/se_block_head.svg"
,
),
),
),
SizedBox
(
width:
10
),
Expanded
(
flex:
4
,
child:
SizedBox
(
child:
Column
(
crossAxisAlignment:
CrossAxisAlignment
.
start
,
children:
[
Text
(
crmLists
[
index
].
company
!,
style:
TextStyle
(
fontFamily:
"JakartaMedium"
,
fontSize:
14
,
color:
AppColors
.
semi_black
,
),
),
child:
SvgPicture
.
asset
(
"assets/svg/se_block_head.svg"
,
],
),
),
),
Expanded
(
flex:
2
,
child:
Container
(
padding:
EdgeInsets
.
symmetric
(
horizontal:
5
,
vertical:
10
,
),
decoration:
BoxDecoration
(
borderRadius:
BorderRadius
.
circular
(
8
),
color:
Color
(
0xFFE3FFE0
),
),
child:
Center
(
child:
Text
(
crmLists
[
index
].
status
!,
textAlign:
TextAlign
.
center
,
style:
TextStyle
(
fontFamily:
"JakartaMedium"
,
fontSize:
14
,
color:
Color
(
0xFF0D9C00
),
),
),
),
SizedBox
(
width:
10
),
),
),
],
),
Divider
(
thickness:
0.5
,
color:
Color
(
0xFFD7D7D7
),
),
...
List
.
generate
(
4
,
(
j
)
{
final
headings
=
[
"Account Manager"
,
"Contact Person"
,
"Product"
,
"Open Status"
,
];
final
subHeadings
=
[
crmLists
[
index
].
accman
,
crmLists
[
index
].
cname
,
crmLists
[
index
].
product
,
crmLists
[
index
].
openStatus
,
];
return
Container
(
padding:
EdgeInsets
.
symmetric
(
vertical:
5
,
),
child:
Row
(
crossAxisAlignment:
CrossAxisAlignment
.
start
,
children:
[
Expanded
(
flex:
4
,
child:
SizedBox
(
child:
Column
(
crossAxisAlignment:
CrossAxisAlignment
.
start
,
children:
[
Text
(
crmLists
[
index
].
company
!,
style:
TextStyle
(
fontFamily:
"JakartaMedium"
,
fontSize:
14
,
color:
AppColors
.
semi_black
,
),
),
],
child:
Text
(
headings
[
j
],
style:
TextStyle
(
fontFamily:
"JakartaMedium"
,
fontSize:
14
,
color:
AppColors
.
semi_black
,
),
),
),
Expanded
(
flex:
2
,
child:
Container
(
padding:
EdgeInsets
.
symmetric
(
horizontal:
5
,
vertical:
10
,
),
decoration:
BoxDecoration
(
borderRadius:
BorderRadius
.
circular
(
8
),
color:
Color
(
0xFFE3FFE0
),
),
child:
Center
(
child:
Text
(
crmLists
[
index
].
status
!,
textAlign:
TextAlign
.
center
,
style:
TextStyle
(
fontFamily:
"JakartaMedium"
,
fontSize:
14
,
color:
Color
(
0xFF0D9C00
),
),
),
child:
Text
(
subHeadings
[
j
]
??
"-"
,
style:
TextStyle
(
fontSize:
14
,
color:
Color
(
0xFF818181
),
),
),
),
],
),
Divider
(
thickness:
0.5
,
color:
Color
(
0xFFD7D7D7
),
),
...
List
.
generate
(
4
,
(
j
)
{
final
headings
=
[
"Account Manager"
,
"Contact Person"
,
"Product"
,
"Open Status"
,
];
final
subHeadings
=
[
crmLists
[
index
].
accman
,
crmLists
[
index
].
cname
,
crmLists
[
index
].
product
,
crmLists
[
index
].
openStatus
,
];
return
Container
(
padding:
EdgeInsets
.
symmetric
(
vertical:
5
,
),
child:
Row
(
crossAxisAlignment:
CrossAxisAlignment
.
start
,
children:
[
Expanded
(
child:
Text
(
headings
[
j
],
style:
TextStyle
(
fontFamily:
"JakartaMedium"
,
fontSize:
14
,
color:
AppColors
.
semi_black
,
),
),
),
Expanded
(
child:
Text
(
subHeadings
[
j
]
??
"-"
,
style:
TextStyle
(
fontSize:
14
,
color:
Color
(
0xFF818181
),
),
),
);
}),
InkResponse
(
onTap:
()
async
{
Navigator
.
push
(
context
,
MaterialPageRoute
(
builder:
(
context
)
=>
LeadDetailsByMode
(
pageTitleName:
widget
.
pageTitleName
,
mode:
widget
.
mode
,
leadId:
provider
.
crmLeadList
[
index
]
.
leadid
,
),
]
,
),
);
}),
InkResponse
(
onTap:
()
async
{
Navigator
.
push
(
context
,
MaterialPageRoute
(
build
er
:
(
context
)
=>
LeadDetailsByMode
(
pageTitleName:
widget
.
pageTitleName
,
mode:
widget
.
mode
,
leadId:
provider
.
crmLeadList
[
index
]
.
leadid
,
)
,
)
,
);
},
child:
Container
(
padding:
EdgeInsets
.
symmetric
(
vertical:
5
,
),
child:
Row
(
crossAxisAlignment:
CrossAxisAlignment
.
cent
er
,
mainAxisAlignment:
MainAxisAlignment
.
start
,
children:
[
Text
(
"View Details"
,
style:
TextStyle
(
fontFamily:
"JakartaMedium"
,
fontSize:
14
,
color:
AppColors
.
app_blue
,
),
);
},
child:
Container
(
padding:
EdgeInsets
.
symmetric
(
vertical:
5
,
),
child:
Row
(
crossAxisAlignment:
CrossAxisAlignment
.
center
,
mainAxisAlignment:
MainAxisAlignment
.
start
,
children:
[
Text
(
"View Details"
,
style:
TextStyle
(
fontFamily:
"JakartaMedium"
,
fontSize:
14
,
color:
AppColors
.
app_blue
,
),
),
SizedBox
(
width:
5
),
SvgPicture
.
asset
(
"assets/svg/next_button.svg"
,
),
],
SizedBox
(
width:
5
),
SvgPicture
.
asset
(
"assets/svg/next_button.svg"
,
),
)
,
]
,
),
]
,
)
,
),
);
},
),
),
)
:
Emptywidget
(
context
),
],
),
);
},
),
),
)
:
Emptywidget
(
context
),
),
),
);
...
...
lib/screens/crm/NearbyOpenLeads.dart
View file @
ecd8fcd1
...
...
@@ -46,7 +46,7 @@ class _NearbyOpenLeadsState extends State<NearbyOpenLeads> {
onWillPop:
()
=>
onBackPressed
(
context
),
child:
Scaffold
(
resizeToAvoidBottomInset:
true
,
appBar:
appbar2
(
context
,
"Nearby Leads (Open)"
,
provider
.
resetAll
,
SizedBox
(
width:
0
,)
),
appBar:
appbar2
(
context
,
"Nearby Leads (Open)"
,
provider
.
resetAll
,
sendWidget
),
backgroundColor:
AppColors
.
scaffold_bg_color
,
body:
SafeArea
(
child:
Container
(
...
...
@@ -140,67 +140,7 @@ class _NearbyOpenLeadsState extends State<NearbyOpenLeads> {
),
),
SizedBox
(
height:
15
),
Align
(
alignment:
Alignment
.
centerLeft
,
child:
Text
(
'Status'
,
style:
TextStyle
(
fontSize:
18.0
,
fontWeight:
FontWeight
.
w500
,
),
),
),
DropdownButtonHideUnderline
(
child:
Row
(
children:
[
Expanded
(
child:
DropdownButton2
<
String
>(
isExpanded:
true
,
hint:
const
Row
(
children:
[
Expanded
(
child:
Text
(
'Select Complaint Status'
,
style:
TextStyle
(
fontSize:
14
,
),
overflow:
TextOverflow
.
ellipsis
,
),
),
],
),
items:
<
String
>[
'Active'
,
'Inactive'
,
'Suspense'
,
].
map
(
(
value
)
=>
DropdownMenuItem
<
String
>(
value:
value
,
child:
Text
(
value
??
''
,
style:
const
TextStyle
(
fontSize:
14
,
),
overflow:
TextOverflow
.
ellipsis
,
),
)).
toList
(),
value:
provider
.
selectedItem
,
onChanged:
(
String
?
newValue
)
{
setState
(()
{
provider
.
selectedItem
=
newValue
!;
});
},
buttonStyleData:
ddtheme
.
buttonStyleData
,
iconStyleData:
ddtheme
.
iconStyleData
,
menuItemStyleData:
ddtheme
.
menuItemStyleData
,
dropdownStyleData:
ddtheme
.
dropdownStyleData
,
),
),
],
),
),
Row
(
children:
[
Text
(
...
...
@@ -222,7 +162,11 @@ class _NearbyOpenLeadsState extends State<NearbyOpenLeads> {
),
InteractiveSlider
(
min:
1.0
,
max:
100.0
,
max:
50.0
,
padding:
EdgeInsets
.
symmetric
(
horizontal:
0
,
vertical:
0
),
iconSize:
0.0
,
enabled:
true
,
// backgroundColor: AppColors.app_blue,
...
...
@@ -230,32 +174,32 @@ class _NearbyOpenLeadsState extends State<NearbyOpenLeads> {
segmentDividerColor:
Color
(
0xFFF6F6F8
),
onChanged:
(
value
)
{
provider
.
currentValue
=
value
;
provider
.
debounce
(()
{
provider
.
LoadNearbyOpenLeadsAPI
(
context
);
},
Duration
(
milliseconds:
200
));
},
),
Slider
(
value:
provider
.
currentValue
,
max:
100
,
divisions:
100
,
label:
provider
.
currentValue
.
toStringAsFixed
(
2
),
inactiveColor:
Color
(
0xFFD7D7D7
),
activeColor:
AppColors
.
cyan_blue
,
onChanged:
(
value
)
{
provider
.
currentValue
=
value
;
provider
.
debounce
(()
{
provider
.
LoadNearbyOpenLeadsAPI
(
context
);
},
Duration
(
milliseconds:
200
));
// provider.debounce(() {
// provider.LoadNearbyOpenLeadsAPI(context);
// }, Duration(milliseconds: 200));
},
),
// Slider(
// value: provider.currentValue,
// max: 100,
// divisions: 100,
//
// label: provider.currentValue.toStringAsFixed(2),
// inactiveColor: Color(0xFFD7D7D7),
// activeColor: AppColors.cyan_blue,
// onChanged: (value) {
// provider.currentValue = value;
// provider.debounce(() {
// provider.LoadNearbyOpenLeadsAPI(context);
// }, Duration(milliseconds: 200));
// },
// ),
SizedBox
(
height:
30.0
),
Container
(
child:
InkWell
(
onTap:
()
{
provider
.
debounce
(()
{
provider
.
LoadNearbyOpenLeadsAPI
(
context
);
provider
.
LoadNearbyOpenLeadsAPI
(
context
,
provider
.
currentValue
);
Navigator
.
pop
(
context
);
},
Duration
(
milliseconds:
500
));
},
...
...
lib/screens/crm/ProspectDetailsByMode.dart
View file @
ecd8fcd1
import
'dart:io'
;
import
'package:dropdown_button2/dropdown_button2.dart'
;
import
'package:flutter/material.dart'
;
import
'package:flutter/services.dart'
;
...
...
@@ -166,170 +168,174 @@ class ProspectDetailsByModeState extends State<ProspectDetailsByMode> {
var
leadDetails
=
provider
.
accountDetails
;
return
WillPopScope
(
child:
Scaffold
(
resizeToAvoidBottomInset:
true
,
appBar:
appbar2
(
context
,
widget
.
pageTitleName
,
provider
.
resetAll
,
InkResponse
(
onTap:
()
{
_showOptionsSheet
(
context
);
},
child:
SvgPicture
.
asset
(
"assets/svg/ic_more.svg"
,
height:
30
),
child:
SafeArea
(
top:
false
,
bottom:
Platform
.
isIOS
?
false
:
true
,
child:
Scaffold
(
resizeToAvoidBottomInset:
true
,
appBar:
appbar2
(
context
,
widget
.
pageTitleName
,
provider
.
resetAll
,
InkResponse
(
onTap:
()
{
_showOptionsSheet
(
context
);
},
child:
SvgPicture
.
asset
(
"assets/svg/ic_more.svg"
,
height:
30
),
),
),
)
,
backgroundColor:
AppColors
.
scaffold_bg_color
,
body:
Container
(
child:
SingleChildScrollView
(
child:
Container
(
decoration:
BoxDecoration
(
color:
Colors
.
white
,
borderRadius:
BorderRadius
.
circular
(
16
),
),
marg
in:
EdgeInsets
.
symmetric
(
vertical:
10
,
horizontal:
10
),
padding:
EdgeInsets
.
symmetric
(
vertical:
10
,
horizontal:
10
),
child
:
Column
(
children:
[
Row
(
children:
[
Expanded
(
flex:
1
,
child:
Container
(
height:
50
,
width:
35
,
padding:
EdgeInsets
.
all
(
8.0
),
decoration:
BoxDecoration
(
color:
Color
(
0xFFE6F6FF
),
borderRadius:
BorderRadius
.
circular
(
8
),
),
child:
SvgPicture
.
asset
(
"assets/svg/se_block_head.svg"
,
backgroundColor:
AppColors
.
scaffold_bg_color
,
body:
Container
(
child:
SingleChildScrollView
(
child:
Container
(
decoration:
BoxDecoration
(
color:
Colors
.
white
,
borderRadius:
BorderRadius
.
circular
(
16
)
,
),
margin:
EdgeInsets
.
symmetric
(
vertical:
10
,
horizontal:
10
),
padd
in
g
:
EdgeInsets
.
symmetric
(
vertical:
10
,
horizontal:
10
),
child:
Column
(
child
ren:
[
Row
(
children:
[
Expanded
(
flex:
1
,
child:
Container
(
height:
50
,
width:
35
,
padding:
EdgeInsets
.
all
(
8.0
)
,
decoration:
BoxDecoration
(
color:
Color
(
0xFFE6F6FF
),
borderRadius:
BorderRadius
.
circular
(
8
),
),
child:
SvgPicture
.
asset
(
"assets/svg/se_block_head.svg"
,
)
,
),
),
),
SizedBox
(
width:
10
),
Expanded
(
flex:
4
,
child:
SizedBox
(
child:
Column
(
crossAxisAlignm
en
t
:
CrossAxisAlignment
.
start
,
children:
[
Text
(
"
${leadDetails.salutationName ?? "-"}
${leadDetails.name ?? "-"}
"
,
style:
TextStyle
(
font
Family:
"JakartaMedium"
,
fontSize:
14
,
color:
AppColors
.
semi_black
,
SizedBox
(
width:
10
),
Expanded
(
flex:
4
,
child:
SizedBox
(
child:
Column
(
crossAxisAlignment:
CrossAxisAlignment
.
start
,
childr
en:
[
Text
(
"
${leadDetails.salutationName ?? "-"}
${leadDetails.name ?? "-"}
"
,
style:
TextStyle
(
fontFamily:
"JakartaMedium"
,
font
Size:
14
,
color:
AppColors
.
semi_black
,
)
,
),
)
,
]
,
]
,
)
,
),
),
),
if
(
provider
.
showTransferAccount
==
"1"
)...[
SizedBox
(
width:
5
),
Expanded
(
flex:
1
,
child:
InkResponse
(
onTap:
()
async
{
_showTransferAccountSheet
(
context
,
provider
.
accountDetails
.
id
!,
);
},
child:
Container
(
height:
32
,
width:
30
,
padding:
EdgeInsets
.
all
(
8.0
),
child:
SvgPicture
.
asset
(
"assets/svg/transfer_ac.svg"
,
if
(
provider
.
showTransferAccount
==
"1"
)...[
SizedBox
(
width:
5
),
Expanded
(
flex:
1
,
child:
InkResponse
(
onTap:
()
async
{
_showTransferAccountSheet
(
context
,
provider
.
accountDetails
.
id
!,
);
},
child:
Container
(
height:
32
,
width:
30
,
padding:
EdgeInsets
.
all
(
8.0
),
child:
SvgPicture
.
asset
(
"assets/svg/transfer_ac.svg"
,
),
),
),
),
)
,
]
,
SizedBox
(
width:
5
),
Expanded
(
flex:
1
,
child:
InkResponse
(
onTap:
()
async
{
editProvider
.
checkDropDownValues
();
prefill
();
await
_showEditAc
co
u
nt
Sheet
(
cont
ext
,
provider
.
accountDetails
.
id
!,
);
},
child:
Container
(
height
:
3
2
,
width:
30
,
padding:
EdgeInsets
.
all
(
8.0
),
child:
SvgPicture
.
asset
(
"assets/svg/crm_contact_edit.svg"
,
]
,
SizedBox
(
width:
5
)
,
Expanded
(
flex:
1
,
child:
InkResponse
(
onTap:
()
async
{
editProvider
.
checkDropDownValues
();
prefill
();
await
_showEditAccountSheet
(
cont
ext
,
provider
.
ac
co
u
nt
Details
.
id
!
,
);
},
child:
Container
(
height:
32
,
width
:
3
0
,
padding:
EdgeInsets
.
all
(
8.0
)
,
child:
SvgPicture
.
asset
(
"assets/svg/crm_contact_edit.svg"
,
)
,
),
),
),
)
,
]
,
),
Divider
(
thickness:
0.5
,
color:
Color
(
0xFFD7D7D7
)),
...
List
.
generate
(
provider
.
subHeadings
.
length
,
(
j
)
{
return
Container
(
padding:
EdgeInsets
.
symmetric
(
vertical:
7
),
child:
Row
(
crossAxisAlignm
en
t
:
CrossAxisAlignment
.
start
,
children:
[
Expanded
(
child:
Text
(
provider
.
Headings
[
j
],
style:
TextStyle
(
font
Family:
"JakartaMedium"
,
fontSize:
14
,
color:
AppColors
.
semi_black
,
]
,
)
,
Divider
(
thickness:
0.5
,
color:
Color
(
0xFFD7D7D7
)
),
...
List
.
generate
(
provider
.
subHeadings
.
length
,
(
j
)
{
return
Container
(
padding:
EdgeInsets
.
symmetric
(
vertical:
7
),
child:
Row
(
crossAxisAlignment:
CrossAxisAlignment
.
start
,
childr
en:
[
Expanded
(
child:
Text
(
provider
.
Headings
[
j
],
style:
TextStyle
(
fontFamily:
"JakartaMedium"
,
font
Size:
14
,
color:
AppColors
.
semi_black
,
)
,
),
),
),
Expanded
(
child:
InkResponse
(
child:
provider
.
Headings
[
j
]
==
"Lead Age"
?
Tooltip
(
triggerMode:
TooltipTriggerMode
.
tap
,
Expanded
(
child:
InkResponse
(
child:
provider
.
Headings
[
j
]
==
"Lead Age"
?
Tooltip
(
triggerMode:
TooltipTriggerMode
.
tap
,
message:
"
${provider.accountDetails.createdDatetime}
"
,
child:
Text
(
message:
"
${provider.accountDetails.createdDatetime}
"
,
child:
Text
(
provider
.
subHeadings
[
j
]
==
""
?
"-"
:
provider
.
subHeadings
[
j
],
style:
TextStyle
(
fontSize:
14
,
color:
Color
(
0xFF818181
),
decorationColor:
AppColors
.
grey_semi
,
decoration:
TextDecoration
.
underline
,
),
),
)
:
Text
(
provider
.
subHeadings
[
j
]
==
""
?
"-"
:
provider
.
subHeadings
[
j
],
style:
TextStyle
(
fontSize:
14
,
color:
Color
(
0xFF818181
),
decorationColor:
AppColors
.
grey_semi
,
decoration:
TextDecoration
.
underline
,
),
),
)
:
Text
(
provider
.
subHeadings
[
j
]
==
""
?
"-"
:
provider
.
subHeadings
[
j
],
style:
TextStyle
(
fontSize:
14
,
color:
Color
(
0xFF818181
),
),
),
),
),
)
,
]
,
)
,
);
})
,
]
,
]
,
)
,
)
;
}),
]
,
)
,
),
),
),
...
...
lib/screens/crm/ProspectListByMode.dart
View file @
ecd8fcd1
import
'dart:io'
;
import
'package:dropdown_button2/dropdown_button2.dart'
;
import
'package:flutter/material.dart'
;
import
'package:flutter/services.dart'
;
...
...
@@ -48,30 +50,31 @@ class _ProspectListByModeState extends State<ProspectListByMode> {
onWillPop:
()
{
return
onBackPressed
(
context
);
},
child:
Scaffold
(
resizeToAvoidBottomInset:
true
,
appBar:
appbar2
(
context
,
widget
.
pageTitleName
,
provider
.
resetForm
,
Row
(
children:
[
InkResponse
(
onTap:
()
async
{
_showFilterSheet
(
context
);
},
child:
SvgPicture
.
asset
(
"assets/svg/filter_ic.svg"
,
height:
25
,
child:
SafeArea
(
top:
false
,
bottom:
Platform
.
isIOS
?
false
:
true
,
child:
Scaffold
(
resizeToAvoidBottomInset:
true
,
appBar:
appbar2
(
context
,
widget
.
pageTitleName
,
provider
.
resetForm
,
Row
(
children:
[
InkResponse
(
onTap:
()
async
{
_showFilterSheet
(
context
);
},
child:
SvgPicture
.
asset
(
"assets/svg/filter_ic.svg"
,
height:
25
,
),
),
)
,
]
,
]
,
)
,
),
),
backgroundColor:
AppColors
.
scaffold_bg_color
,
body:
SafeArea
(
child:
provider
.
isLoading
backgroundColor:
AppColors
.
scaffold_bg_color
,
body:
provider
.
isLoading
?
Center
(
child:
CircularProgressIndicator
.
adaptive
(
valueColor:
AlwaysStoppedAnimation
<
Color
>(
...
...
@@ -259,7 +262,8 @@ class _ProspectListByModeState extends State<ProspectListByMode> {
),
)
:
Emptywidget
(
context
),)
Emptywidget
(
context
)
),
),
);
},
...
...
lib/screens/crm/QuotationDetails.dart
View file @
ecd8fcd1
import
'dart:io'
;
import
'package:flutter/material.dart'
;
import
'package:generp/screens/crm/generateQuotationScreen.dart'
;
import
'package:provider/provider.dart'
;
...
...
@@ -22,12 +24,14 @@ class _QuotationDetailsState extends State<QuotationDetails> {
var
quotationDetails
=
provider
.
quotationsDetails
;
return
WillPopScope
(
onWillPop:
()
=>
onBackPressed
(
context
),
child:
Scaffold
(
resizeToAvoidBottomInset:
true
,
appBar:
appbar
(
context
,
"Quotation Details"
),
backgroundColor:
AppColors
.
scaffold_bg_color
,
body:
SafeArea
(
child:
SizedBox
(
child:
SafeArea
(
top:
false
,
bottom:
Platform
.
isIOS
?
false
:
true
,
child:
Scaffold
(
resizeToAvoidBottomInset:
true
,
appBar:
appbar
(
context
,
"Quotation Details"
),
backgroundColor:
AppColors
.
scaffold_bg_color
,
body:
SizedBox
(
child:
SingleChildScrollView
(
child:
Column
(
crossAxisAlignment:
CrossAxisAlignment
.
start
,
...
...
@@ -118,47 +122,47 @@ class _QuotationDetailsState extends State<QuotationDetails> {
),
),
),
),
floatingActionButton:
Align
(
alignment:
Alignment
.
bottomCenter
,
child:
InkWell
(
onTap:
()
async
{
var
res
=
await
Navigator
.
push
(
context
,
MaterialPageRoute
(
builder:
(
context
)
=>
Generatequotationscreen
(
leadId:
widget
.
leadID
),
floatingActionButton:
Align
(
alignment:
Alignment
.
bottomCenter
,
child:
InkWell
(
onTap:
()
async
{
var
res
=
await
Navigator
.
push
(
context
,
MaterialPageRoute
(
builder:
(
context
)
=>
Generatequotationscreen
(
leadId:
widget
.
leadID
),
),
);
if
(
res
==
true
){
provider
.
crmLeadDetailsAPIFunction
(
context
,
widget
.
leadID
,
widget
.
mode
);
}
},
child:
Container
(
alignment:
Alignment
.
bottomCenter
,
height:
45
,
width:
MediaQuery
.
of
(
context
).
size
.
width
,
margin:
EdgeInsets
.
symmetric
(
horizontal:
10
),
decoration:
BoxDecoration
(
color:
AppColors
.
app_blue
,
borderRadius:
BorderRadius
.
circular
(
14.0
),
),
);
if
(
res
==
true
){
provider
.
crmLeadDetailsAPIFunction
(
context
,
widget
.
leadID
,
widget
.
mode
);
}
},
child:
Container
(
alignment:
Alignment
.
bottomCenter
,
height:
45
,
width:
MediaQuery
.
of
(
context
).
size
.
width
,
margin:
EdgeInsets
.
symmetric
(
horizontal:
10
),
decoration:
BoxDecoration
(
color:
AppColors
.
app_blue
,
borderRadius:
BorderRadius
.
circular
(
14.0
),
),
child:
Center
(
child:
Text
(
"Generate Quotation"
,
textAlign:
TextAlign
.
center
,
style:
TextStyle
(
color:
Colors
.
white
,
fontFamily:
"JakartaMedium"
,
child:
Center
(
child:
Text
(
"Generate Quotation"
,
textAlign:
TextAlign
.
center
,
style:
TextStyle
(
color:
Colors
.
white
,
fontFamily:
"JakartaMedium"
,
),
),
),
),
),
),
floatingActionButtonLocation:
FloatingActionButtonLocation
.
centerFloat
,
),
floatingActionButtonLocation:
FloatingActionButtonLocation
.
centerFloat
,
),
);
},
...
...
lib/screens/crm/addProspectLeads.dart
View file @
ecd8fcd1
import
'dart:io'
;
import
'package:dropdown_button2/dropdown_button2.dart'
;
import
'package:flutter/material.dart'
;
import
'package:flutter/services.dart'
;
...
...
@@ -42,352 +44,356 @@ class _AddProspectLeadsState extends State<AddProspectLeads> {
editProvider
.
resetForm
();
return
true
;
},
child:
Scaffold
(
resizeToAvoidBottomInset:
true
,
backgroundColor:
AppColors
.
white
,
appBar:
appbar2
(
context
,
"Add Lead"
,
editProvider
.
resetForm
,
const
SizedBox
(
width:
0
),
),
body:
Container
(
padding:
const
EdgeInsets
.
symmetric
(
horizontal:
10
),
child:
SingleChildScrollView
(
child:
Column
(
crossAxisAlignment:
CrossAxisAlignment
.
start
,
children:
[
TextWidget
(
context
,
"Employee"
),
DropdownButtonHideUnderline
(
child:
Row
(
children:
[
Expanded
(
child:
DropdownButton2
<
Employees
>(
hint:
Text
(
"Select Source"
,
style:
TextStyle
(
fontSize:
14
),
),
items:
editProvider
.
employeeList
.
map
(
(
slist
)
=>
DropdownMenuItem
<
Employees
>(
value:
slist
,
child:
Text
(
slist
.
name
!,
style:
TextStyle
(
fontSize:
14
,
child:
SafeArea
(
top:
false
,
bottom:
Platform
.
isIOS
?
false
:
true
,
child:
Scaffold
(
resizeToAvoidBottomInset:
true
,
backgroundColor:
AppColors
.
white
,
appBar:
appbar2
(
context
,
"Add Lead"
,
editProvider
.
resetForm
,
const
SizedBox
(
width:
0
),
),
body:
Container
(
padding:
const
EdgeInsets
.
symmetric
(
horizontal:
10
),
child:
SingleChildScrollView
(
child:
Column
(
crossAxisAlignment:
CrossAxisAlignment
.
start
,
children:
[
TextWidget
(
context
,
"Employee"
),
DropdownButtonHideUnderline
(
child:
Row
(
children:
[
Expanded
(
child:
DropdownButton2
<
Employees
>(
hint:
Text
(
"Select Source"
,
style:
TextStyle
(
fontSize:
14
),
),
items:
editProvider
.
employeeList
.
map
(
(
slist
)
=>
DropdownMenuItem
<
Employees
>(
value:
slist
,
child:
Text
(
slist
.
name
!,
style:
TextStyle
(
fontSize:
14
,
),
),
),
),
)
.
toList
(),
value:
editProvider
.
employeeList
.
contains
(
editProvider
.
selectedEmployee
,
)
?
editProvider
.
selectedEmployee
:
null
,
)
.
toList
(),
value:
editProvider
.
employeeList
.
contains
(
editProvider
.
selectedEmployee
,
)
?
editProvider
.
selectedEmployee
:
null
,
// value: provider.selectedEmployees,
onChanged:
(
Employees
?
value
)
{
if
(
value
!=
null
)
{
if
(
editProvider
.
employeeList
.
isNotEmpty
)
{
editProvider
.
selectedEmployee
=
value
;
editProvider
.
selectedEmployeeId
=
value
!.
id
!;
editProvider
.
selectedEmployeeValue
=
value
!.
name
!;
// value: provider.selectedEmployees,
onChanged:
(
Employees
?
value
)
{
if
(
value
!=
null
)
{
if
(
editProvider
.
employeeList
.
isNotEmpty
)
{
editProvider
.
selectedEmployee
=
value
;
editProvider
.
selectedEmployeeId
=
value
!.
id
!;
editProvider
.
selectedEmployeeValue
=
value
!.
name
!;
}
}
}
}
,
isExpanded:
true
,
dropdownSearchData:
DropdownSearchData
(
search
InnerWidgetHeight:
50
,
searchController
:
editProvider
.
searchController
,
searchInnerWidget:
Padding
(
padding:
const
EdgeInsets
.
all
(
8
),
child:
TextFormField
(
c
ontroller
:
editProvider
.
searchController
,
decoration:
InputDecoration
(
isDense:
true
,
con
tentPadding:
const
EdgeInsets
.
symmetric
(
horizont
al:
10
,
vertical:
8
,
)
,
hintText:
'Search account...'
,
border
:
OutlineInputBorder
(
b
orderRadius
:
BorderRadius
.
circular
(
8
),
}
,
isExpanded:
true
,
dropdownSearchData:
DropdownSearchData
(
searchInnerWidgetHeight:
50
,
search
Controller:
editProvider
.
searchController
,
searchInnerWidget:
Padding
(
padding:
const
EdgeInsets
.
all
(
8
),
child:
TextFormField
(
controller:
editProvider
.
searchC
ontroller
,
decoration:
InputDecoration
(
isDense:
true
,
contentPadding:
con
st
EdgeInsets
.
symmetric
(
horizontal:
10
,
vertic
al:
8
,
)
,
hintText:
'Search account...'
,
border:
OutlineInputBorder
(
border
Radius:
B
orderRadius
.
circular
(
8
),
),
),
),
),
searchMatchFn:
(
item
,
searchValue
)
{
return
item
.
value
?.
name
?.
toLowerCase
()
.
contains
(
searchValue
.
toLowerCase
(),
)
??
false
;
},
),
searchMatchFn:
(
item
,
searchValue
)
{
return
item
.
value
?.
name
?.
toLowerCase
()
.
contains
(
searchValue
.
toLowerCase
(),
)
??
false
;
onMenuStateChange:
(
isOpen
)
{
if
(!
isOpen
)
{
editProvider
.
searchController
.
clear
();
}
},
buttonStyleData:
ddtheme
.
buttonStyleData
,
iconStyleData:
ddtheme
.
iconStyleData
,
menuItemStyleData:
ddtheme
.
menuItemStyleData
,
dropdownStyleData:
ddtheme
.
dropdownStyleData
,
),
onMenuStateChange:
(
isOpen
)
{
if
(!
isOpen
)
{
editProvider
.
searchController
.
clear
();
}
},
buttonStyleData:
ddtheme
.
buttonStyleData
,
iconStyleData:
ddtheme
.
iconStyleData
,
menuItemStyleData:
ddtheme
.
menuItemStyleData
,
dropdownStyleData:
ddtheme
.
dropdownStyleData
,
),
)
,
]
,
]
,
)
,
),
),
InkResponse
(
onTap:
()
{
editProvider
.
editAddNewRow
();
},
child:
Container
(
margin:
const
EdgeInsets
.
symmetric
(
vertical:
10
),
height:
45
,
width:
MediaQuery
.
of
(
context
).
size
.
width
,
decoration:
BoxDecoration
(
color:
const
Color
(
0xFFE6F6FF
),
borderRadius:
BorderRadius
.
circular
(
12
),
border:
Border
.
all
(
color:
AppColors
.
app_blue
,
width:
0.5
,
),
),
child:
Center
(
child:
Text
(
"+ Add Product"
,
style:
TextStyle
(
fontFamily:
"JakartaMedium"
,
InkResponse
(
onTap:
()
{
editProvider
.
editAddNewRow
();
},
child:
Container
(
margin:
const
EdgeInsets
.
symmetric
(
vertical:
10
),
height:
45
,
width:
MediaQuery
.
of
(
context
).
size
.
width
,
decoration:
BoxDecoration
(
color:
const
Color
(
0xFFE6F6FF
),
borderRadius:
BorderRadius
.
circular
(
12
),
border:
Border
.
all
(
color:
AppColors
.
app_blue
,
width:
0.5
,
),
),
child:
Center
(
child:
Text
(
"+ Add Product"
,
style:
TextStyle
(
fontFamily:
"JakartaMedium"
,
color:
AppColors
.
app_blue
,
),
),
),
),
),
),
if
(
editProvider
.
leadProductsList
.
isNotEmpty
||
editProvider
.
editProductPriceControllers
.
isNotEmpty
)...[
ListView
.
builder
(
itemCount:
editProvider
.
editProductPriceControllers
.
length
,
physics:
const
NeverScrollableScrollPhysics
(),
shrinkWrap:
true
,
itemBuilder:
(
context
,
j
)
{
return
Container
(
padding:
const
EdgeInsets
.
symmetric
(
horizontal:
10
,
vertical:
10
),
margin:
const
EdgeInsets
.
symmetric
(
vertical:
10
),
decoration:
BoxDecoration
(
color:
Colors
.
white
,
borderRadius:
BorderRadius
.
circular
(
20
),
),
child:
Column
(
crossAxisAlignment:
CrossAxisAlignment
.
start
,
children:
[
TextWidget
(
context
,
"Product"
),
DropdownButtonHideUnderline
(
child:
Row
(
children:
[
Expanded
(
child:
DropdownButton2
<
Products
>(
isExpanded:
true
,
hint:
const
Text
(
'Select Product'
,
style:
TextStyle
(
fontSize:
14
),
overflow:
TextOverflow
.
ellipsis
,
),
items:
editProvider
.
leadProductsList
.
map
((
ord
)
=>
DropdownMenuItem
<
Products
>(
value:
ord
,
child:
Text
(
"(Product Name:
${ord.name}
)"
,
style:
const
TextStyle
(
fontSize:
14
),
if
(
editProvider
.
leadProductsList
.
isNotEmpty
||
editProvider
.
editProductPriceControllers
.
isNotEmpty
)...[
ListView
.
builder
(
itemCount:
editProvider
.
editProductPriceControllers
.
length
,
physics:
const
NeverScrollableScrollPhysics
(),
shrinkWrap:
true
,
itemBuilder:
(
context
,
j
)
{
return
Container
(
padding:
const
EdgeInsets
.
symmetric
(
horizontal:
10
,
vertical:
10
),
margin:
const
EdgeInsets
.
symmetric
(
vertical:
10
),
decoration:
BoxDecoration
(
color:
Colors
.
white
,
borderRadius:
BorderRadius
.
circular
(
20
),
),
child:
Column
(
crossAxisAlignment:
CrossAxisAlignment
.
start
,
children:
[
TextWidget
(
context
,
"Product"
),
DropdownButtonHideUnderline
(
child:
Row
(
children:
[
Expanded
(
child:
DropdownButton2
<
Products
>(
isExpanded:
true
,
hint:
const
Text
(
'Select Product'
,
style:
TextStyle
(
fontSize:
14
),
overflow:
TextOverflow
.
ellipsis
,
),
))
.
toList
(),
value:
editProvider
.
selectedProductIds
[
j
]
!=
null
?
editProvider
.
leadProductsList
.
firstWhere
(
(
ord
)
=>
ord
.
id
==
editProvider
.
selectedProductIds
[
j
],
orElse:
()
=>
editProvider
.
leadProductsList
[
0
],
)
:
null
,
onChanged:
(
Products
?
value
)
{
if
(
value
!=
null
)
{
editProvider
.
updateSelectedProductIds
(
j
,
value
);
editProvider
.
selectedProductIds
[
j
]
=
value
.
id
?.
toString
()
??
''
;
editProvider
.
updateTotalAmount
(
j
);
}
},
buttonStyleData:
ddtheme
.
buttonStyleData
,
iconStyleData:
ddtheme
.
iconStyleData
,
menuItemStyleData:
ddtheme
.
menuItemStyleData
,
dropdownStyleData:
ddtheme
.
dropdownStyleData
,
items:
editProvider
.
leadProductsList
.
map
((
ord
)
=>
DropdownMenuItem
<
Products
>(
value:
ord
,
child:
Text
(
"(Product Name:
${ord.name}
)"
,
style:
const
TextStyle
(
fontSize:
14
),
overflow:
TextOverflow
.
ellipsis
,
),
))
.
toList
(),
value:
editProvider
.
selectedProductIds
[
j
]
!=
null
?
editProvider
.
leadProductsList
.
firstWhere
(
(
ord
)
=>
ord
.
id
==
editProvider
.
selectedProductIds
[
j
],
orElse:
()
=>
editProvider
.
leadProductsList
[
0
],
)
:
null
,
onChanged:
(
Products
?
value
)
{
if
(
value
!=
null
)
{
editProvider
.
updateSelectedProductIds
(
j
,
value
);
editProvider
.
selectedProductIds
[
j
]
=
value
.
id
?.
toString
()
??
''
;
editProvider
.
updateTotalAmount
(
j
);
}
},
buttonStyleData:
ddtheme
.
buttonStyleData
,
iconStyleData:
ddtheme
.
iconStyleData
,
menuItemStyleData:
ddtheme
.
menuItemStyleData
,
dropdownStyleData:
ddtheme
.
dropdownStyleData
,
),
),
],
),
),
const
SizedBox
(
height:
10
),
Row
(
children:
[
Expanded
(
flex:
2
,
child:
textControllerWidget
(
context
,
editProvider
.
editProductPriceControllers
[
j
],
"Product Price"
,
"Enter Product Price"
,
(
value
)
=>
editProvider
.
updateTotalAmount
(
j
),
TextInputType
.
number
,
false
,
FilteringTextInputFormatter
.
digitsOnly
,
),
),
],
),
),
const
SizedBox
(
height:
10
),
Row
(
children:
[
Expanded
(
flex:
2
,
child:
textControllerWidget
(
context
,
editProvider
.
editProductPriceControllers
[
j
],
"Product Price"
,
"Enter Product Price"
,
(
value
)
=>
editProvider
.
updateTotalAmount
(
j
),
TextInputType
.
number
,
false
,
FilteringTextInputFormatter
.
digitsOnly
,
),
),
],
),
const
SizedBox
(
height:
10
),
Row
(
children:
[
Expanded
(
flex:
2
,
child:
textControllerWidget
(
context
,
editProvider
.
editQuantityControllers
[
j
],
"Quantity"
,
"Enter Quantity"
,
(
value
)
=>
editProvider
.
updateTotalAmount
(
j
),
TextInputType
.
number
,
false
,
FilteringTextInputFormatter
.
digitsOnly
,
const
SizedBox
(
height:
10
),
Row
(
children:
[
Expanded
(
flex:
2
,
child:
textControllerWidget
(
context
,
editProvider
.
editQuantityControllers
[
j
],
"Quantity"
,
"Enter Quantity"
,
(
value
)
=>
editProvider
.
updateTotalAmount
(
j
),
TextInputType
.
number
,
false
,
FilteringTextInputFormatter
.
digitsOnly
,
),
),
)
,
]
,
),
const
SizedBox
(
height:
10
),
Row
(
children:
[
Expanded
(
flex:
2
,
child:
textControllerWidget
(
context
,
editProvider
.
edit
TotalAmount
Controllers
[
j
]
,
"
Total Amount"
,
"Enter Total Amount"
,
(
_
)
{}
,
TextInputType
.
number
,
true
,
FilteringTextInputFormatter
.
digitsOnly
,
]
,
)
,
const
SizedBox
(
height:
10
),
Row
(
children:
[
Expanded
(
flex:
2
,
child:
textControllerWidget
(
context
,
editProvider
.
editTotalAmountControllers
[
j
]
,
"
Total
Amount
"
,
"Enter
Total Amount"
,
(
_
)
{}
,
TextInputType
.
number
,
true
,
FilteringTextInputFormatter
.
digitsOnly
,
)
,
),
),
],
),
],
),
],
),
);
},
),
],
TextWidget
(
context
,
"Status"
),
DropdownButtonHideUnderline
(
child:
Row
(
children:
[
Expanded
(
child:
DropdownButton2
<
String
>(
hint:
Text
(
"Select Salutation"
,
style:
TextStyle
(
fontSize:
14
),
],
),
items:
editProvider
.
statusList
.
map
(
(
slist
)
=>
DropdownMenuItem
<
String
>(
value:
slist
,
child:
Text
(
slist
,
style:
TextStyle
(
fontSize:
14
,
);
},
),
],
TextWidget
(
context
,
"Status"
),
DropdownButtonHideUnderline
(
child:
Row
(
children:
[
Expanded
(
child:
DropdownButton2
<
String
>(
hint:
Text
(
"Select Salutation"
,
style:
TextStyle
(
fontSize:
14
),
),
items:
editProvider
.
statusList
.
map
(
(
slist
)
=>
DropdownMenuItem
<
String
>(
value:
slist
,
child:
Text
(
slist
,
style:
TextStyle
(
fontSize:
14
,
),
),
),
),
)
.
toList
()
,
value:
editProvider
.
selectedStatus
,
onChanged:
(
String
?
value
)
{
if
(
value
!=
null
)
{
if
(
editProvider
.
statusList
.
isNotEmpty
)
{
editProvider
.
selectedStatus
=
value
;
)
.
toList
(),
value:
editProvider
.
selectedStatus
,
onChanged:
(
String
?
value
)
{
if
(
value
!=
null
)
{
if
(
editProvider
.
statusList
.
isNotEmpty
)
{
editProvider
.
selectedStatus
=
value
;
}
}
}
}
,
isExpanded:
true
,
butt
onStyleData:
ddtheme
.
butt
onStyleData
,
iconStyleData:
ddtheme
.
icon
StyleData
,
menuItemStyleData
:
ddtheme
.
menuItem
StyleData
,
dropdownStyleData
:
ddtheme
.
dropdownStyleData
,
}
,
isExpanded:
true
,
buttonStyleData:
ddtheme
.
buttonStyleData
,
ic
onStyleData:
ddtheme
.
ic
onStyleData
,
menuItem
StyleData
:
ddtheme
.
menuItemStyleData
,
dropdown
StyleData
:
ddtheme
.
dropdownStyleData
,
)
,
),
)
,
]
,
]
,
)
,
),
)
,
]
,
]
,
)
,
),
),
),
floatingActionButtonLocation:
FloatingActionButtonLocation
.
centerFloat
,
bottomNavigationBar:
InkResponse
(
onTap:
editProvider
.
submitLoading
?
null
:
()
{
editProvider
.
submitForm
(
context
,
widget
.
mode
,
widget
.
leadID
,
editProvider
.
selectedEmployeeId
,
editProvider
.
selectedStatus
);
// editProvider.crmProspectDetailsAddLeadsSubmitAPIFunction(context, mode, account_id, acc_manager_id, products, lead_status)
floatingActionButtonLocation:
FloatingActionButtonLocation
.
centerFloat
,
bottomNavigationBar:
InkResponse
(
onTap:
editProvider
.
submitLoading
?
null
:
()
{
editProvider
.
submitForm
(
context
,
widget
.
mode
,
widget
.
leadID
,
editProvider
.
selectedEmployeeId
,
editProvider
.
selectedStatus
);
// editProvider.crmProspectDetailsAddLeadsSubmitAPIFunction(context, mode, account_id, acc_manager_id, products, lead_status)
},
child:
Container
(
height:
45
,
alignment:
Alignment
.
center
,
margin:
const
EdgeInsets
.
symmetric
(
horizontal:
10
,
vertical:
15
),
padding:
const
EdgeInsets
.
symmetric
(
horizontal:
10
,
vertical:
5
),
decoration:
BoxDecoration
(
color:
AppColors
.
app_blue
,
borderRadius:
BorderRadius
.
circular
(
15
),
),
child:
editProvider
.
submitLoading
?
CircularProgressIndicator
.
adaptive
(
valueColor:
AlwaysStoppedAnimation
<
Color
>(
AppColors
.
app_blue
),
)
:
const
Text
(
"Submit"
,
style:
TextStyle
(
fontSize:
15
,
fontFamily:
"JakartaMedium"
,
color:
Colors
.
white
,
},
child:
Container
(
height:
45
,
alignment:
Alignment
.
center
,
margin:
const
EdgeInsets
.
symmetric
(
horizontal:
10
,
vertical:
15
),
padding:
const
EdgeInsets
.
symmetric
(
horizontal:
10
,
vertical:
5
),
decoration:
BoxDecoration
(
color:
AppColors
.
app_blue
,
borderRadius:
BorderRadius
.
circular
(
15
),
),
child:
editProvider
.
submitLoading
?
CircularProgressIndicator
.
adaptive
(
valueColor:
AlwaysStoppedAnimation
<
Color
>(
AppColors
.
app_blue
),
)
:
const
Text
(
"Submit"
,
style:
TextStyle
(
fontSize:
15
,
fontFamily:
"JakartaMedium"
,
color:
Colors
.
white
,
),
),
),
),
...
...
lib/screens/crm/contactDetails.dart
View file @
ecd8fcd1
import
'dart:io'
;
import
'package:flutter/material.dart'
;
import
'package:flutter/services.dart'
;
import
'package:flutter_svg/svg.dart'
;
...
...
@@ -23,12 +25,14 @@ class _ContactdetailsState extends State<Contactdetails> {
var
customerDetails
=
provider
.
contactDetails
;
return
WillPopScope
(
onWillPop:
()
=>
onBackPressed
(
context
),
child:
Scaffold
(
resizeToAvoidBottomInset:
true
,
appBar:
appbar
(
context
,
"Contact Details"
),
backgroundColor:
AppColors
.
scaffold_bg_color
,
body:
SafeArea
(
child:
SizedBox
(
child:
SafeArea
(
top:
false
,
bottom:
Platform
.
isIOS
?
false
:
true
,
child:
Scaffold
(
resizeToAvoidBottomInset:
true
,
appBar:
appbar
(
context
,
"Contact Details"
),
backgroundColor:
AppColors
.
scaffold_bg_color
,
body:
SizedBox
(
child:
SingleChildScrollView
(
child:
Column
(
crossAxisAlignment:
CrossAxisAlignment
.
start
,
...
...
@@ -181,37 +185,37 @@ class _ContactdetailsState extends State<Contactdetails> {
),
),
),
),
floatingActionButton:
Align
(
alignment:
Alignment
.
bottomCenter
,
child:
InkWell
(
onTap:
()
{
_showAddContactSheet
(
context
);
},
child:
Contain
er
(
alignment:
Alignment
.
bottomCenter
,
height:
45
,
width:
MediaQuery
.
of
(
context
).
size
.
width
,
margin:
EdgeInsets
.
symmetric
(
horizontal:
10
),
decoration:
BoxDecoration
(
color:
AppColors
.
app_blue
,
borderRadius:
BorderRadius
.
circular
(
14.0
),
),
child:
Center
(
child:
Text
(
"Add Contact"
,
textAlign:
TextAlign
.
center
,
style:
TextStyle
(
color:
Colors
.
white
,
fontFamily:
"JakartaMedium"
,
floatingActionButton:
Align
(
alignment:
Alignment
.
bottomCenter
,
child:
InkWell
(
onTap:
()
{
_showAddContactSheet
(
context
);
},
child:
Container
(
alignment:
Alignment
.
bottomCent
er
,
height:
45
,
width:
MediaQuery
.
of
(
context
).
size
.
width
,
margin:
EdgeInsets
.
symmetric
(
horizontal:
10
)
,
decoration:
BoxDecoration
(
color:
AppColors
.
app_blue
,
borderRadius:
BorderRadius
.
circular
(
14.0
)
,
),
child:
Center
(
child:
Text
(
"Add Contact"
,
textAlign:
TextAlign
.
center
,
style:
TextStyle
(
color:
Colors
.
white
,
fontFamily:
"JakartaMedium"
,
)
,
),
),
),
),
),
floatingActionButtonLocation:
FloatingActionButtonLocation
.
centerFloat
,
),
floatingActionButtonLocation:
FloatingActionButtonLocation
.
centerFloat
,
),
);
},
...
...
lib/screens/crm/crmDashboard.dart
View file @
ecd8fcd1
import
'dart:io'
;
import
'package:flutter/material.dart'
;
import
'package:flutter/services.dart'
;
import
'package:flutter_svg/svg.dart'
;
...
...
@@ -41,113 +43,115 @@ class _CrmdashboardScreenState extends State<CrmdashboardScreen> {
return
WillPopScope
(
onWillPop:
()
=>
onBackPressed
(
context
),
child:
Scaffold
(
resizeToAvoidBottomInset:
true
,
backgroundColor:
AppColors
.
scaffold_bg_color
,
appBar:
AppBar
(
automaticallyImplyLeading:
false
,
elevation:
2.0
,
title:
SizedBox
(
child:
Row
(
mainAxisAlignment:
MainAxisAlignment
.
start
,
crossAxisAlignment:
CrossAxisAlignment
.
center
,
children:
[
InkResponse
(
onTap:
()
=>
Navigator
.
pop
(
context
,
true
),
child:
SvgPicture
.
asset
(
"assets/svg/app_bar_back.svg"
,
height:
25
,
child:
SafeArea
(
top:
false
,
bottom:
Platform
.
isIOS
?
false
:
true
,
child:
Scaffold
(
resizeToAvoidBottomInset:
true
,
backgroundColor:
AppColors
.
scaffold_bg_color
,
appBar:
AppBar
(
automaticallyImplyLeading:
false
,
elevation:
2.0
,
title:
SizedBox
(
child:
Row
(
mainAxisAlignment:
MainAxisAlignment
.
start
,
crossAxisAlignment:
CrossAxisAlignment
.
center
,
children:
[
InkResponse
(
onTap:
()
=>
Navigator
.
pop
(
context
,
true
),
child:
SvgPicture
.
asset
(
"assets/svg/app_bar_back.svg"
,
height:
25
,
),
),
),
InkResponse
(
onTap:
()
=>
Navigator
.
pop
(
context
,
true
),
child:
Text
(
"CRM"
,
style:
TextStyle
(
fontSize
:
1
6
,
height:
1.1
,
fontFamily:
"JakartaSemiBold"
,
color:
AppColors
.
semi_black
,
InkResponse
(
onTap:
()
=>
Navigator
.
pop
(
context
,
true
),
child:
Text
(
"CRM"
,
style:
TextStyle
(
fontSize:
16
,
height
:
1
.1
,
fontFamily:
"JakartaSemiBold"
,
color:
AppColors
.
semi_black
,
)
,
),
),
),
],
),
),
bottom:
PreferredSize
(
preferredSize:
Size
.
fromHeight
(
50
),
child:
Container
(
padding:
const
EdgeInsets
.
fromLTRB
(
5.0
,
0.0
,
10
,
0
),
margin:
const
EdgeInsets
.
fromLTRB
(
10.0
,
0.0
,
10
,
10
),
height:
50
,
alignment:
Alignment
.
center
,
decoration:
BoxDecoration
(
color:
AppColors
.
text_field_color
,
borderRadius:
BorderRadius
.
circular
(
14
),
border:
focusNode
.
hasFocus
?
Border
.
all
(
color:
AppColors
.
app_blue
)
:
null
,
],
),
child:
Row
(
children:
[
Expanded
(
child:
Container
(
padding:
const
EdgeInsets
.
fromLTRB
(
0.0
,
0.0
,
10
,
0
),
margin:
const
EdgeInsets
.
fromLTRB
(
10.0
,
0.0
,
10
,
10
),
child:
TextFormField
(
controller:
provider
.
searchController
,
keyboardType:
TextInputType
.
text
,
maxLines:
1
,
),
bottom:
PreferredSize
(
preferredSize:
Size
.
fromHeight
(
50
),
child:
Container
(
padding:
const
EdgeInsets
.
fromLTRB
(
5.0
,
0.0
,
10
,
0
),
margin:
const
EdgeInsets
.
fromLTRB
(
10.0
,
0.0
,
10
,
10
),
height:
50
,
alignment:
Alignment
.
center
,
decoration:
BoxDecoration
(
color:
AppColors
.
text_field_color
,
borderRadius:
BorderRadius
.
circular
(
14
),
border:
focusNode
.
hasFocus
?
Border
.
all
(
color:
AppColors
.
app_blue
)
:
null
,
),
child:
Row
(
children:
[
Expanded
(
child:
Container
(
padding:
const
EdgeInsets
.
fromLTRB
(
0.0
,
0.0
,
10
,
0
),
margin:
const
EdgeInsets
.
fromLTRB
(
10.0
,
0.0
,
10
,
10
),
child:
TextFormField
(
controller:
provider
.
searchController
,
keyboardType:
TextInputType
.
text
,
maxLines:
1
,
onChanged:
(
value
)
{},
focusNode:
focusNode
,
onTapUpOutside:
(
event
)
{
focusNode
.
unfocus
();
},
onChanged:
(
value
)
{},
focusNode:
focusNode
,
onTapUpOutside:
(
event
)
{
focusNode
.
unfocus
();
},
textInputAction:
TextInputAction
.
done
,
onEditingComplete:
()
{
Navigator
.
push
(
context
,
MaterialPageRoute
(
builder:
(
context
)
=>
Universalsearchscreen
(
text:
provider
.
searchController
.
text
,
),
settings:
RouteSettings
(
name:
'SearchScreen'
),
textInputAction:
TextInputAction
.
done
,
onEditingComplete:
()
{
Navigator
.
push
(
context
,
MaterialPageRoute
(
builder:
(
context
)
=>
Universalsearchscreen
(
text:
provider
.
searchController
.
text
,
),
settings:
RouteSettings
(
name:
'SearchScreen'
),
),
);
},
decoration:
InputDecoration
(
counterText:
""
,
hintText:
"Search"
,
hintStyle:
TextStyle
(
fontWeight:
FontWeight
.
w400
,
color:
Color
(
0xFFB4BEC0
),
fontSize:
14
,
),
);
},
decoration:
InputDecoration
(
counterText:
""
,
hintText:
"Search"
,
hintStyle:
TextStyle
(
fontWeight:
FontWeight
.
w400
,
color:
Color
(
0xFFB4BEC0
),
fontSize:
14
,
),
enabled:
true
,
enabled:
true
,
enabledBorder:
InputBorder
.
none
,
focusedBorder:
InputBorder
.
none
,
enabledBorder:
InputBorder
.
none
,
focusedBorder:
InputBorder
.
none
,
),
),
),
),
),
SvgPicture
.
asset
(
"assets/svg/search_ic.svg"
)
,
]
,
SvgPicture
.
asset
(
"assets/svg/search_ic.svg"
),
]
,
)
,
),
),
),
shape:
RoundedRectangleBorder
(
borderRadius:
BorderRadius
.
vertical
(
bottom:
Radius
.
circular
(
30
),
// Adjust the radius as needed
shape:
RoundedRectangleBorder
(
borderRadius:
BorderRadius
.
vertical
(
bottom:
Radius
.
circular
(
30
),
// Adjust the radius as needed
),
),
),
),
body:
SafeArea
(
child:
SingleChildScrollView
(
body:
SingleChildScrollView
(
physics:
AlwaysScrollableScrollPhysics
(),
child:
Column
(
children:
[
...
...
@@ -495,28 +499,28 @@ class _CrmdashboardScreenState extends State<CrmdashboardScreen> {
],
),
),
),
f
loatingActionButtonLocation
:
F
loatingActionButton
Location
.
centerFloat
,
floatingActionButton:
InkResponse
(
onTap:
()
{
_showPaymentOptionsSheet
(
context
);
},
child:
Container
(
height:
45
,
alignment:
Alignment
.
center
,
marg
in:
EdgeInsets
.
symmetric
(
horizontal:
10
),
padding:
EdgeInsets
.
symmetric
(
horizontal:
10
,
vertical:
5
),
decoration:
BoxDecoration
(
color:
AppColors
.
app_blue
,
borderRadius:
BorderRadius
.
circular
(
15
),
),
child:
Text
(
"Add Leads and Prospect"
,
style:
TextStyle
(
font
Size:
15
,
fontFamily:
"JakartaMedium"
,
color:
Colors
.
white
,
floatingActionButtonLocation:
F
loatingActionButtonLocation
.
centerFloat
,
f
loatingActionButton
:
InkResponse
(
onTap:
()
{
_showPaymentOptionsSheet
(
context
);
},
child:
Container
(
height:
45
,
alignment:
Alignment
.
center
,
margin:
EdgeInsets
.
symmetric
(
horizontal:
10
)
,
padd
in
g
:
EdgeInsets
.
symmetric
(
horizontal:
10
,
vertical:
5
),
decoration:
BoxDecoration
(
color:
AppColors
.
app_blue
,
borderRadius:
BorderRadius
.
circular
(
15
)
,
),
child:
Text
(
"Add Leads and Prospect"
,
style:
TextStyle
(
fontSize:
15
,
font
Family:
"JakartaMedium"
,
color:
Colors
.
white
,
)
,
),
),
),
...
...
lib/screens/crm/editAccountDetails.dart
View file @
ecd8fcd1
import
'dart:io'
;
import
'package:dropdown_button2/dropdown_button2.dart'
;
import
'package:flutter/material.dart'
;
import
'package:provider/provider.dart'
;
...
...
@@ -44,12 +46,14 @@ class _EditAccountDetailsState extends State<EditAccountDetails> {
builder:
(
context
,
provider
,
child
)
{
return
WillPopScope
(
onWillPop:
()
=>
onBackPressed
(
context
),
child:
Scaffold
(
resizeToAvoidBottomInset:
true
,
appBar:
appbar
(
context
,
"Edit Account"
),
backgroundColor:
AppColors
.
scaffold_bg_color
,
body:
SafeArea
(
child:
Container
(
child:
SafeArea
(
top:
false
,
bottom:
Platform
.
isIOS
?
false
:
true
,
child:
Scaffold
(
resizeToAvoidBottomInset:
true
,
appBar:
appbar
(
context
,
"Edit Account"
),
backgroundColor:
AppColors
.
scaffold_bg_color
,
body:
Container
(
padding:
EdgeInsets
.
symmetric
(
horizontal:
10
,
vertical:
10
),
margin:
EdgeInsets
.
symmetric
(
horizontal:
10
,
vertical:
5
),
decoration:
BoxDecoration
(
...
...
@@ -201,8 +205,8 @@ class _EditAccountDetailsState extends State<EditAccountDetails> {
),
),
),
),
),
),
);
},
...
...
lib/screens/crm/editProductsList.dart
View file @
ecd8fcd1
...
...
@@ -395,6 +395,8 @@
// );
// }
// }
import
'dart:io'
;
import
'package:dropdown_button2/dropdown_button2.dart'
;
import
'package:flutter/material.dart'
;
import
'package:flutter/services.dart'
;
...
...
@@ -438,208 +440,212 @@ class _EditProductsListState extends State<EditProductsList> {
editProvider
.
resetForm
();
return
true
;
},
child:
Scaffold
(
resizeToAvoidBottomInset:
true
,
backgroundColor:
AppColors
.
scaffold_bg_color
,
appBar:
appbar2
(
context
,
"Edit Products"
,
editProvider
.
resetForm
,
const
SizedBox
(
width:
0
),
),
body:
Container
(
padding:
const
EdgeInsets
.
symmetric
(
horizontal:
10
),
child:
SingleChildScrollView
(
child:
Column
(
crossAxisAlignment:
CrossAxisAlignment
.
start
,
children:
[
InkResponse
(
onTap:
()
{
editProvider
.
editAddNewRow
();
},
child:
Container
(
margin:
const
EdgeInsets
.
symmetric
(
vertical:
10
),
height:
45
,
width:
MediaQuery
.
of
(
context
).
size
.
width
,
decoration:
BoxDecoration
(
color:
const
Color
(
0xFFE6F6FF
),
borderRadius:
BorderRadius
.
circular
(
12
),
border:
Border
.
all
(
color:
AppColors
.
app_blue
,
width:
0.5
,
),
),
child:
Center
(
child:
Text
(
"+ Add Product"
,
style:
TextStyle
(
fontFamily:
"JakartaMedium"
,
child:
SafeArea
(
top:
false
,
bottom:
Platform
.
isIOS
?
false
:
true
,
child:
Scaffold
(
resizeToAvoidBottomInset:
true
,
backgroundColor:
AppColors
.
scaffold_bg_color
,
appBar:
appbar2
(
context
,
"Edit Products"
,
editProvider
.
resetForm
,
const
SizedBox
(
width:
0
),
),
body:
Container
(
padding:
const
EdgeInsets
.
symmetric
(
horizontal:
10
),
child:
SingleChildScrollView
(
child:
Column
(
crossAxisAlignment:
CrossAxisAlignment
.
start
,
children:
[
InkResponse
(
onTap:
()
{
editProvider
.
editAddNewRow
();
},
child:
Container
(
margin:
const
EdgeInsets
.
symmetric
(
vertical:
10
),
height:
45
,
width:
MediaQuery
.
of
(
context
).
size
.
width
,
decoration:
BoxDecoration
(
color:
const
Color
(
0xFFE6F6FF
),
borderRadius:
BorderRadius
.
circular
(
12
),
border:
Border
.
all
(
color:
AppColors
.
app_blue
,
width:
0.5
,
),
),
child:
Center
(
child:
Text
(
"+ Add Product"
,
style:
TextStyle
(
fontFamily:
"JakartaMedium"
,
color:
AppColors
.
app_blue
,
),
),
),
),
),
),
if
(
editProvider
.
leadProductsList
.
isNotEmpty
||
editProvider
.
editProductPriceControllers
.
isNotEmpty
)
ListView
.
builder
(
itemCount:
editProvider
.
editProductPriceControllers
.
length
,
physics:
const
NeverScrollableScrollPhysics
(),
shrinkWrap:
true
,
itemBuilder:
(
context
,
j
)
{
return
Container
(
padding:
const
EdgeInsets
.
symmetric
(
horizontal:
10
,
vertical:
10
),
margin:
const
EdgeInsets
.
symmetric
(
vertical:
10
),
decoration:
BoxDecoration
(
color:
Colors
.
white
,
borderRadius:
BorderRadius
.
circular
(
20
),
),
child:
Column
(
crossAxisAlignment:
CrossAxisAlignment
.
start
,
children:
[
TextWidget
(
context
,
"Product"
),
DropdownButtonHideUnderline
(
child:
Row
(
children:
[
Expanded
(
child:
DropdownButton2
<
Products
>(
isExpanded:
true
,
hint:
const
Text
(
'Select Product'
,
style:
TextStyle
(
fontSize:
14
),
overflow:
TextOverflow
.
ellipsis
,
),
items:
editProvider
.
productsList
.
map
((
ord
)
=>
DropdownMenuItem
<
Products
>(
value:
ord
,
child:
Text
(
"(Product Name:
${ord.name}
)"
,
style:
const
TextStyle
(
fontSize:
14
),
if
(
editProvider
.
leadProductsList
.
isNotEmpty
||
editProvider
.
editProductPriceControllers
.
isNotEmpty
)
ListView
.
builder
(
itemCount:
editProvider
.
editProductPriceControllers
.
length
,
physics:
const
NeverScrollableScrollPhysics
(),
shrinkWrap:
true
,
itemBuilder:
(
context
,
j
)
{
return
Container
(
padding:
const
EdgeInsets
.
symmetric
(
horizontal:
10
,
vertical:
10
),
margin:
const
EdgeInsets
.
symmetric
(
vertical:
10
),
decoration:
BoxDecoration
(
color:
Colors
.
white
,
borderRadius:
BorderRadius
.
circular
(
20
),
),
child:
Column
(
crossAxisAlignment:
CrossAxisAlignment
.
start
,
children:
[
TextWidget
(
context
,
"Product"
),
DropdownButtonHideUnderline
(
child:
Row
(
children:
[
Expanded
(
child:
DropdownButton2
<
Products
>(
isExpanded:
true
,
hint:
const
Text
(
'Select Product'
,
style:
TextStyle
(
fontSize:
14
),
overflow:
TextOverflow
.
ellipsis
,
),
))
.
toList
(),
value:
editProvider
.
selectedProductIds
[
j
]
!=
null
?
editProvider
.
productsList
.
firstWhere
(
(
ord
)
=>
ord
.
id
==
editProvider
.
selectedProductIds
[
j
],
orElse:
()
=>
editProvider
.
productsList
[
0
],
)
:
null
,
onChanged:
(
Products
?
value
)
{
if
(
value
!=
null
)
{
editProvider
.
updateSelectedProductIds
(
j
,
value
);
editProvider
.
selectedProductIds
[
j
]
=
value
.
id
?.
toString
()
??
''
;
editProvider
.
updateTotalAmount
(
j
);
}
},
buttonStyleData:
ddtheme
.
buttonStyleData
,
iconStyleData:
ddtheme
.
iconStyleData
,
menuItemStyleData:
ddtheme
.
menuItemStyleData
,
dropdownStyleData:
ddtheme
.
dropdownStyleData
,
items:
editProvider
.
productsList
.
map
((
ord
)
=>
DropdownMenuItem
<
Products
>(
value:
ord
,
child:
Text
(
"(Product Name:
${ord.name}
)"
,
style:
const
TextStyle
(
fontSize:
14
),
overflow:
TextOverflow
.
ellipsis
,
),
))
.
toList
(),
value:
editProvider
.
selectedProductIds
[
j
]
!=
null
?
editProvider
.
productsList
.
firstWhere
(
(
ord
)
=>
ord
.
id
==
editProvider
.
selectedProductIds
[
j
],
orElse:
()
=>
editProvider
.
productsList
[
0
],
)
:
null
,
onChanged:
(
Products
?
value
)
{
if
(
value
!=
null
)
{
editProvider
.
updateSelectedProductIds
(
j
,
value
);
editProvider
.
selectedProductIds
[
j
]
=
value
.
id
?.
toString
()
??
''
;
editProvider
.
updateTotalAmount
(
j
);
}
},
buttonStyleData:
ddtheme
.
buttonStyleData
,
iconStyleData:
ddtheme
.
iconStyleData
,
menuItemStyleData:
ddtheme
.
menuItemStyleData
,
dropdownStyleData:
ddtheme
.
dropdownStyleData
,
),
),
],
),
),
const
SizedBox
(
height:
10
),
Row
(
children:
[
Expanded
(
flex:
2
,
child:
textControllerWidget
(
context
,
editProvider
.
editProductPriceControllers
[
j
],
"Product Price"
,
"Enter Product Price"
,
(
value
)
=>
editProvider
.
updateTotalAmount
(
j
),
TextInputType
.
number
,
false
,
null
),
),
],
),
),
const
SizedBox
(
height:
10
),
Row
(
children:
[
Expanded
(
flex:
2
,
child:
textControllerWidget
(
context
,
editProvider
.
editProductPriceControllers
[
j
],
"Product Price"
,
"Enter Product Price"
,
(
value
)
=>
editProvider
.
updateTotalAmount
(
j
),
TextInputType
.
number
,
false
,
null
),
),
],
),
const
SizedBox
(
height:
10
),
Row
(
children:
[
Expanded
(
flex:
2
,
child:
textControllerWidget
(
context
,
editProvider
.
editQuantityControllers
[
j
],
"Quantity"
,
"Enter Quantity"
,
(
value
)
=>
editProvider
.
updateTotalAmount
(
j
),
TextInputType
.
number
,
false
,
FilteringTextInputFormatter
.
digitsOnly
,
const
SizedBox
(
height:
10
),
Row
(
children:
[
Expanded
(
flex:
2
,
child:
textControllerWidget
(
context
,
editProvider
.
editQuantityControllers
[
j
],
"Quantity"
,
"Enter Quantity"
,
(
value
)
=>
editProvider
.
updateTotalAmount
(
j
),
TextInputType
.
number
,
false
,
FilteringTextInputFormatter
.
digitsOnly
,
),
),
)
,
]
,
),
errorWidget
(
context
,
"Note: Submit Quantity as Zero (0) to delete Product"
),
const
SizedBox
(
height:
10
),
Row
(
children:
[
Expanded
(
flex:
2
,
child:
textControllerWidget
(
context
,
editProvider
.
editTotalAmountControllers
[
j
]
,
"
Amount"
,
"Total Amount"
,
(
_
)
{}
,
TextInputType
.
number
,
true
,
FilteringTextInputFormatter
.
digitsOnly
,
]
,
)
,
errorWidget
(
context
,
"Note: Submit Quantity as Zero (0) to delete Product"
),
const
SizedBox
(
height:
10
),
Row
(
children:
[
Expanded
(
flex:
2
,
child:
textControllerWidget
(
context
,
editProvider
.
editTotalAmountControllers
[
j
]
,
"Amount"
,
"Total
Amount"
,
(
_
)
{}
,
TextInputType
.
number
,
true
,
FilteringTextInputFormatter
.
digitsOnly
,
)
,
),
)
,
]
,
),
//
IconButton(
//
icon: const Icon(Icons.delete),
//
onPressed:
editProvider.edit
ProductPriceControllers.length > 1
//
? () => editProvider.editRemoveRow(j)
// : null
,
// )
,
]
,
)
,
);
}
,
)
,
]
,
]
,
)
,
// IconButton(
//
icon: const Icon(Icons.delete),
//
onPressed: editProvider.editProductPriceControllers.length > 1
//
? () =>
editProvider.edit
RemoveRow(j)
//
: null,
// )
,
]
,
)
,
)
;
},
)
,
]
,
)
,
),
),
),
floatingActionButtonLocation:
FloatingActionButtonLocation
.
centerFloat
,
bottomNavigationBar:
InkResponse
(
onTap:
editProvider
.
submitLoading
?
null
:
()
{
editProvider
.
submitForm
(
context
,
widget
.
leadID
);
floatingActionButtonLocation:
FloatingActionButtonLocation
.
centerFloat
,
bottomNavigationBar:
InkResponse
(
onTap:
editProvider
.
submitLoading
?
null
:
()
{
editProvider
.
submitForm
(
context
,
widget
.
leadID
);
},
child:
Container
(
height:
45
,
alignment:
Alignment
.
center
,
margin:
const
EdgeInsets
.
symmetric
(
horizontal:
10
,
vertical:
15
),
padding:
const
EdgeInsets
.
symmetric
(
horizontal:
10
,
vertical:
5
),
decoration:
BoxDecoration
(
color:
AppColors
.
app_blue
,
borderRadius:
BorderRadius
.
circular
(
15
),
),
child:
editProvider
.
submitLoading
?
CircularProgressIndicator
.
adaptive
(
valueColor:
AlwaysStoppedAnimation
<
Color
>(
AppColors
.
app_blue
),
)
:
const
Text
(
"Submit"
,
style:
TextStyle
(
fontSize:
15
,
fontFamily:
"JakartaMedium"
,
color:
Colors
.
white
,
},
child:
Container
(
height:
45
,
alignment:
Alignment
.
center
,
margin:
const
EdgeInsets
.
symmetric
(
horizontal:
10
,
vertical:
15
),
padding:
const
EdgeInsets
.
symmetric
(
horizontal:
10
,
vertical:
5
),
decoration:
BoxDecoration
(
color:
AppColors
.
app_blue
,
borderRadius:
BorderRadius
.
circular
(
15
),
),
child:
editProvider
.
submitLoading
?
CircularProgressIndicator
.
adaptive
(
valueColor:
AlwaysStoppedAnimation
<
Color
>(
AppColors
.
app_blue
),
)
:
const
Text
(
"Submit"
,
style:
TextStyle
(
fontSize:
15
,
fontFamily:
"JakartaMedium"
,
color:
Colors
.
white
,
),
),
),
),
...
...
lib/screens/crm/generateQuotationScreen.dart
View file @
ecd8fcd1
import
'dart:io'
;
import
'package:dropdown_button2/dropdown_button2.dart'
;
import
'package:flutter/material.dart'
;
import
'package:flutter/services.dart'
;
...
...
@@ -50,485 +52,489 @@ class _GeneratequotationscreenState extends State<Generatequotationscreen> {
// provider.resetForm();
return
true
;
},
child:
Scaffold
(
resizeToAvoidBottomInset:
true
,
backgroundColor:
AppColors
.
scaffold_bg_color
,
appBar:
appbar2
(
context
,
"Generate Quotation"
,
provider
.
resetForm
,
const
SizedBox
(
width:
0
),
),
body:
Container
(
decoration:
BoxDecoration
(
color:
AppColors
.
white
),
padding:
const
EdgeInsets
.
symmetric
(
horizontal:
10
),
child:
SingleChildScrollView
(
child:
Column
(
crossAxisAlignment:
CrossAxisAlignment
.
start
,
children:
[
textControllerWidget
(
context
,
provider
.
mailIdController
,
"Email Id"
,
"Enter Email Id"
,
provider
.
onChangemailId
,
TextInputType
.
emailAddress
,
false
,
null
,
),
errorWidget
(
context
,
provider
.
mailIdError
),
child:
SafeArea
(
top:
false
,
bottom:
Platform
.
isIOS
?
false
:
true
,
child:
Scaffold
(
resizeToAvoidBottomInset:
true
,
backgroundColor:
AppColors
.
scaffold_bg_color
,
appBar:
appbar2
(
context
,
"Generate Quotation"
,
provider
.
resetForm
,
const
SizedBox
(
width:
0
),
),
body:
Container
(
decoration:
BoxDecoration
(
color:
AppColors
.
white
),
padding:
const
EdgeInsets
.
symmetric
(
horizontal:
10
),
child:
SingleChildScrollView
(
child:
Column
(
crossAxisAlignment:
CrossAxisAlignment
.
start
,
children:
[
textControllerWidget
(
context
,
provider
.
mailIdController
,
"Email Id"
,
"Enter Email Id"
,
provider
.
onChangemailId
,
TextInputType
.
emailAddress
,
false
,
null
,
),
errorWidget
(
context
,
provider
.
mailIdError
),
textControllerWidget
(
context
,
provider
.
mobileController
,
"Mobile Number"
,
"Enter Mobile Number"
,
provider
.
onChangemobile
,
TextInputType
.
phone
,
false
,
FilteringTextInputFormatter
.
digitsOnly
,
),
errorWidget
(
context
,
provider
.
mobileError
),
textControllerWidget
(
context
,
provider
.
mobileController
,
"Mobile Number"
,
"Enter Mobile Number"
,
provider
.
onChangemobile
,
TextInputType
.
phone
,
false
,
FilteringTextInputFormatter
.
digitsOnly
,
),
errorWidget
(
context
,
provider
.
mobileError
),
textControllerWidget
(
context
,
provider
.
subjectsController
,
"Subject"
,
"Enter Subject"
,
provider
.
onChangesubjects
,
TextInputType
.
text
,
false
,
null
,
),
errorWidget
(
context
,
provider
.
subjectsError
),
textControllerWidget
(
context
,
provider
.
subjectsController
,
"Subject"
,
"Enter Subject"
,
provider
.
onChangesubjects
,
TextInputType
.
text
,
false
,
null
,
),
errorWidget
(
context
,
provider
.
subjectsError
),
InkResponse
(
onTap:
()
{
provider
.
editAddNewRow
();
},
child:
Container
(
margin:
const
EdgeInsets
.
symmetric
(
vertical:
10
),
height:
45
,
width:
MediaQuery
.
of
(
context
).
size
.
width
,
decoration:
BoxDecoration
(
color:
const
Color
(
0xFFE6F6FF
),
borderRadius:
BorderRadius
.
circular
(
12
),
border:
Border
.
all
(
color:
AppColors
.
app_blue
,
width:
0.5
,
),
),
child:
Center
(
child:
Text
(
"+ Add Product"
,
style:
TextStyle
(
fontFamily:
"JakartaMedium"
,
InkResponse
(
onTap:
()
{
provider
.
editAddNewRow
();
},
child:
Container
(
margin:
const
EdgeInsets
.
symmetric
(
vertical:
10
),
height:
45
,
width:
MediaQuery
.
of
(
context
).
size
.
width
,
decoration:
BoxDecoration
(
color:
const
Color
(
0xFFE6F6FF
),
borderRadius:
BorderRadius
.
circular
(
12
),
border:
Border
.
all
(
color:
AppColors
.
app_blue
,
width:
0.5
,
),
),
child:
Center
(
child:
Text
(
"+ Add Product"
,
style:
TextStyle
(
fontFamily:
"JakartaMedium"
,
color:
AppColors
.
app_blue
,
),
),
),
),
),
),
if
(
provider
.
leadProductsList
.
isNotEmpty
||
provider
.
editProductPriceControllers
.
isNotEmpty
)
...[
ListView
.
builder
(
itemCount:
provider
.
editProductPriceControllers
.
length
,
physics:
const
NeverScrollableScrollPhysics
(),
shrinkWrap:
true
,
itemBuilder:
(
context
,
j
)
{
return
Container
(
padding:
const
EdgeInsets
.
symmetric
(
horizontal:
10
,
vertical:
10
,
),
margin:
const
EdgeInsets
.
symmetric
(
vertical:
10
),
decoration:
BoxDecoration
(
color:
Colors
.
white
,
borderRadius:
BorderRadius
.
circular
(
20
),
),
child:
Column
(
crossAxisAlignment:
CrossAxisAlignment
.
start
,
children:
[
TextWidget
(
context
,
"Product"
),
DropdownButtonHideUnderline
(
child:
Row
(
children:
[
Expanded
(
child:
DropdownButton2
<
LeadProducts
>(
isExpanded:
true
,
hint:
const
Text
(
'Select Product'
,
style:
TextStyle
(
fontSize:
14
),
overflow:
TextOverflow
.
ellipsis
,
),
items:
provider
.
leadProductsList
.
map
(
(
ord
)
=>
DropdownMenuItem
<
LeadProducts
>(
value:
ord
,
child:
Text
(
"(Product Name:
${ord.productName}
)"
,
style:
const
TextStyle
(
fontSize:
14
,
if
(
provider
.
leadProductsList
.
isNotEmpty
||
provider
.
editProductPriceControllers
.
isNotEmpty
)
...[
ListView
.
builder
(
itemCount:
provider
.
editProductPriceControllers
.
length
,
physics:
const
NeverScrollableScrollPhysics
(),
shrinkWrap:
true
,
itemBuilder:
(
context
,
j
)
{
return
Container
(
padding:
const
EdgeInsets
.
symmetric
(
horizontal:
10
,
vertical:
10
,
),
margin:
const
EdgeInsets
.
symmetric
(
vertical:
10
),
decoration:
BoxDecoration
(
color:
Colors
.
white
,
borderRadius:
BorderRadius
.
circular
(
20
),
),
child:
Column
(
crossAxisAlignment:
CrossAxisAlignment
.
start
,
children:
[
TextWidget
(
context
,
"Product"
),
DropdownButtonHideUnderline
(
child:
Row
(
children:
[
Expanded
(
child:
DropdownButton2
<
LeadProducts
>(
isExpanded:
true
,
hint:
const
Text
(
'Select Product'
,
style:
TextStyle
(
fontSize:
14
),
overflow:
TextOverflow
.
ellipsis
,
),
items:
provider
.
leadProductsList
.
map
(
(
ord
)
=>
DropdownMenuItem
<
LeadProducts
>(
value:
ord
,
child:
Text
(
"(Product Name:
${ord.productName}
)"
,
style:
const
TextStyle
(
fontSize:
14
,
),
overflow:
TextOverflow
.
ellipsis
,
),
overflow:
TextOverflow
.
ellipsis
,
),
),
)
.
toList
(),
value:
provider
.
selectedProductIds
[
j
]
!=
null
?
provider
.
leadProductsList
.
firstWhere
(
(
ord
)
=>
ord
.
id
==
provider
.
selectedProductIds
[
j
],
orElse:
()
=>
provider
.
leadProductsList
[
0
],
)
:
null
,
onChanged:
(
LeadProducts
?
value
)
{
if
(
value
!=
null
)
{
provider
.
updateSelectedProductIds
(
j
,
value
,
);
provider
.
selectedProductIds
[
j
]
=
value
.
id
?.
toString
()
??
''
;
provider
.
updateTotalAmount
(
j
);
}
},
buttonStyleData:
ddtheme
.
buttonStyleData
,
iconStyleData:
ddtheme
.
iconStyleData
,
menuItemStyleData:
ddtheme
.
menuItemStyleData
,
dropdownStyleData:
ddtheme
.
dropdownStyleData
,
)
.
toList
(),
value:
provider
.
selectedProductIds
[
j
]
!=
null
?
provider
.
leadProductsList
.
firstWhere
(
(
ord
)
=>
ord
.
id
==
provider
.
selectedProductIds
[
j
],
orElse:
()
=>
provider
.
leadProductsList
[
0
],
)
:
null
,
onChanged:
(
LeadProducts
?
value
)
{
if
(
value
!=
null
)
{
provider
.
updateSelectedProductIds
(
j
,
value
,
);
provider
.
selectedProductIds
[
j
]
=
value
.
id
?.
toString
()
??
''
;
provider
.
updateTotalAmount
(
j
);
}
},
buttonStyleData:
ddtheme
.
buttonStyleData
,
iconStyleData:
ddtheme
.
iconStyleData
,
menuItemStyleData:
ddtheme
.
menuItemStyleData
,
dropdownStyleData:
ddtheme
.
dropdownStyleData
,
),
),
],
),
),
const
SizedBox
(
height:
10
),
Row
(
children:
[
Expanded
(
flex:
2
,
child:
textControllerWidget
(
context
,
provider
.
editProductPriceControllers
[
j
],
"Product Price"
,
"Enter Product Price"
,
(
value
)
=>
provider
.
updateTotalAmount
(
j
),
TextInputType
.
number
,
false
,
FilteringTextInputFormatter
.
digitsOnly
,
),
),
],
),
),
const
SizedBox
(
height:
10
),
Row
(
children:
[
Expanded
(
flex:
2
,
child:
textControllerWidget
(
context
,
provider
.
editProductPriceControllers
[
j
],
"Product Price"
,
"Enter Product Price"
,
(
value
)
=>
provider
.
updateTotalAmount
(
j
),
TextInputType
.
number
,
false
,
FilteringTextInputFormatter
.
digitsOnly
,
),
),
],
),
const
SizedBox
(
height:
10
),
Row
(
children:
[
Expanded
(
flex:
2
,
child:
textControllerWidget
(
context
,
provider
.
editQuantityControllers
[
j
],
"Quantity"
,
"Enter Quantity"
,
(
value
)
=>
provider
.
updateTotalAmount
(
j
),
TextInputType
.
number
,
false
,
FilteringTextInputFormatter
.
digitsOnly
,
const
SizedBox
(
height:
10
),
Row
(
children:
[
Expanded
(
flex:
2
,
child:
textControllerWidget
(
context
,
provider
.
editQuantityControllers
[
j
],
"Quantity"
,
"Enter Quantity"
,
(
value
)
=>
provider
.
updateTotalAmount
(
j
),
TextInputType
.
number
,
false
,
FilteringTextInputFormatter
.
digitsOnly
,
),
),
)
,
]
,
),
const
SizedBox
(
height:
10
),
Row
(
children:
[
Expanded
(
flex:
2
,
child:
textControllerWidget
(
context
,
provider
.
editTotalAmountControllers
[
j
]
,
"
Amount"
,
"Total Amount"
,
(
_
)
{}
,
TextInputType
.
number
,
true
,
FilteringTextInputFormatter
.
digitsOnly
,
]
,
)
,
const
SizedBox
(
height:
10
),
Row
(
children:
[
Expanded
(
flex:
2
,
child:
textControllerWidget
(
context
,
provider
.
editTotalAmountControllers
[
j
]
,
"Amount"
,
"Total
Amount"
,
(
_
)
{}
,
TextInputType
.
number
,
true
,
FilteringTextInputFormatter
.
digitsOnly
,
)
,
),
),
],
),
// IconButton(
// icon: const Icon(Icons.delete),
// onPressed: provider.editProductPriceControllers.length > 1
// ? () => provider.editRemoveRow(j)
// : null,
// ),
],
),
);
},
],
),
// IconButton(
// icon: const Icon(Icons.delete),
// onPressed: provider.editProductPriceControllers.length > 1
// ? () => provider.editRemoveRow(j)
// : null,
// ),
],
),
);
},
),
],
textControllerWidget
(
context
,
provider
.
taxesController
,
"Taxes"
,
"Enter Taxes"
,
provider
.
onChangetaxes
,
TextInputType
.
text
,
false
,
null
,
),
],
textControllerWidget
(
context
,
provider
.
taxesController
,
"Taxes"
,
"Enter Taxes"
,
provider
.
onChangetaxes
,
TextInputType
.
text
,
false
,
null
,
),
errorWidget
(
context
,
provider
.
taxesError
),
errorWidget
(
context
,
provider
.
taxesError
),
textControllerWidget
(
context
,
provider
.
SpecialNoteController
,
"Special Note"
,
"Enter Special Note"
,
provider
.
onChangeSpecialNote
,
TextInputType
.
text
,
false
,
null
,
),
errorWidget
(
context
,
provider
.
SpecialNoteError
),
textControllerWidget
(
context
,
provider
.
SpecialNoteController
,
"Special Note"
,
"Enter Special Note"
,
provider
.
onChangeSpecialNote
,
TextInputType
.
text
,
false
,
null
,
),
errorWidget
(
context
,
provider
.
SpecialNoteError
),
textControllerWidget
(
context
,
provider
.
forController
,
"FOR"
,
"Enter FOR"
,
provider
.
onChangefor
,
TextInputType
.
text
,
false
,
null
,
),
errorWidget
(
context
,
provider
.
forError
),
textControllerWidget
(
context
,
provider
.
forController
,
"FOR"
,
"Enter FOR"
,
provider
.
onChangefor
,
TextInputType
.
text
,
false
,
null
,
),
errorWidget
(
context
,
provider
.
forError
),
textControllerWidget
(
context
,
provider
.
paymentTermsController
,
"Payment Terms"
,
"Enter Payment Terms"
,
provider
.
onChangepaymentTerms
,
TextInputType
.
text
,
false
,
null
,
),
errorWidget
(
context
,
provider
.
paymentTermsError
),
],
textControllerWidget
(
context
,
provider
.
paymentTermsController
,
"Payment Terms"
,
"Enter Payment Terms"
,
provider
.
onChangepaymentTerms
,
TextInputType
.
text
,
false
,
null
,
),
errorWidget
(
context
,
provider
.
paymentTermsError
),
],
),
),
),
),
floatingActionButtonLocation:
FloatingActionButtonLocation
.
centerFloat
,
bottomNavigationBar:
Material
(
elevation:
10
,
shadowColor:
Colors
.
black54
,
child:
Container
(
decoration:
BoxDecoration
(
color:
Colors
.
white
,
boxShadow:
[
BoxShadow
(
color:
Colors
.
black26
,
blurRadius:
10
,
offset:
Offset
(
0
,
-
2
),
),
],
),
child:
Row
(
mainAxisAlignment:
MainAxisAlignment
.
center
,
children:
[
Expanded
(
child:
InkResponse
(
onTap:
provider
.
submitLoading
?
null
:
()
{
//genquotedown
final
insertedData
=
provider
.
getFormData
();
provider
.
crmLeadDetailsGenerateQuoteSubmitAPIFunction
(
context
,
widget
.
leadId
,
insertedData
,
"genquotedown"
,
);
},
child:
Container
(
height:
45
,
alignment:
Alignment
.
center
,
margin:
const
EdgeInsets
.
symmetric
(
horizontal:
10
,
vertical:
15
,
),
padding:
const
EdgeInsets
.
symmetric
(
horizontal:
10
,
vertical:
5
,
),
decoration:
BoxDecoration
(
// color: AppColors.app_blue,
borderRadius:
BorderRadius
.
circular
(
10
),
),
child:
floatingActionButtonLocation:
FloatingActionButtonLocation
.
centerFloat
,
bottomNavigationBar:
Material
(
elevation:
10
,
shadowColor:
Colors
.
black54
,
child:
Container
(
decoration:
BoxDecoration
(
color:
Colors
.
white
,
boxShadow:
[
BoxShadow
(
color:
Colors
.
black26
,
blurRadius:
10
,
offset:
Offset
(
0
,
-
2
),
),
],
),
child:
Row
(
mainAxisAlignment:
MainAxisAlignment
.
center
,
children:
[
Expanded
(
child:
InkResponse
(
onTap:
provider
.
submitLoading
?
CircularProgressIndicator
.
adaptive
(
valueColor:
AlwaysStoppedAnimation
<
Color
>(
AppColors
.
app_blue
,
),
)
:
SvgPicture
.
asset
(
"assets/svg/download_quote.svg"
),
?
null
:
()
{
//genquotedown
final
insertedData
=
provider
.
getFormData
();
provider
.
crmLeadDetailsGenerateQuoteSubmitAPIFunction
(
context
,
widget
.
leadId
,
insertedData
,
"genquotedown"
,
);
},
child:
Container
(
height:
45
,
alignment:
Alignment
.
center
,
margin:
const
EdgeInsets
.
symmetric
(
horizontal:
10
,
vertical:
15
,
),
padding:
const
EdgeInsets
.
symmetric
(
horizontal:
10
,
vertical:
5
,
),
decoration:
BoxDecoration
(
// color: AppColors.app_blue,
borderRadius:
BorderRadius
.
circular
(
10
),
),
child:
provider
.
submitLoading
?
CircularProgressIndicator
.
adaptive
(
valueColor:
AlwaysStoppedAnimation
<
Color
>(
AppColors
.
app_blue
,
),
)
:
SvgPicture
.
asset
(
"assets/svg/download_quote.svg"
),
),
),
),
),
SizedBox
(
width:
10
),
Expanded
(
child:
InkResponse
(
onTap:
provider
.
submitLoading
?
null
:
()
{
//genquotemail,
final
insertedData
=
provider
.
getFormData
();
provider
.
crmLeadDetailsGenerateQuoteSubmitAPIFunction
(
context
,
widget
.
leadId
,
insertedData
,
"genquotemail"
,
);
},
child:
Container
(
height:
45
,
alignment:
Alignment
.
center
,
margin:
const
EdgeInsets
.
symmetric
(
horizontal:
10
,
vertical:
15
,
),
padding:
const
EdgeInsets
.
symmetric
(
horizontal:
10
,
vertical:
5
,
),
decoration:
BoxDecoration
(
// color: AppColors.app_blue,
borderRadius:
BorderRadius
.
circular
(
10
),
),
child:
SizedBox
(
width:
10
),
Expanded
(
child:
InkResponse
(
onTap:
provider
.
submitLoading
?
CircularProgressIndicator
.
adaptive
(
valueColor:
AlwaysStoppedAnimation
<
Color
>(
AppColors
.
app_blue
,
),
)
:
SvgPicture
.
asset
(
"assets/svg/mail_quote.svg"
)
?
null
:
()
{
//genquotemail,
final
insertedData
=
provider
.
getFormData
();
provider
.
crmLeadDetailsGenerateQuoteSubmitAPIFunction
(
context
,
widget
.
leadId
,
insertedData
,
"genquotemail"
,
);
},
child:
Container
(
height:
45
,
alignment:
Alignment
.
center
,
margin:
const
EdgeInsets
.
symmetric
(
horizontal:
10
,
vertical:
15
,
),
padding:
const
EdgeInsets
.
symmetric
(
horizontal:
10
,
vertical:
5
,
),
decoration:
BoxDecoration
(
// color: AppColors.app_blue,
borderRadius:
BorderRadius
.
circular
(
10
),
),
child:
provider
.
submitLoading
?
CircularProgressIndicator
.
adaptive
(
valueColor:
AlwaysStoppedAnimation
<
Color
>(
AppColors
.
app_blue
,
),
)
:
SvgPicture
.
asset
(
"assets/svg/mail_quote.svg"
)
),
),
),
),
SizedBox
(
width:
10
),
Expanded
(
child:
InkResponse
(
onTap:
provider
.
submitLoading
?
null
:
()
{
//genquotewhatsapp,
final
insertedData
=
provider
.
getFormData
();
provider
.
crmLeadDetailsGenerateQuoteSubmitAPIFunction
(
context
,
widget
.
leadId
,
insertedData
,
"genquotewhatsapp"
,
);
},
child:
Container
(
height:
45
,
alignment:
Alignment
.
center
,
margin:
const
EdgeInsets
.
symmetric
(
horizontal:
10
,
vertical:
15
,
),
padding:
const
EdgeInsets
.
symmetric
(
horizontal:
10
,
vertical:
5
,
),
decoration:
BoxDecoration
(
// color: AppColors.app_blue,
borderRadius:
BorderRadius
.
circular
(
10
),
),
child:
SizedBox
(
width:
10
),
Expanded
(
child:
InkResponse
(
onTap:
provider
.
submitLoading
?
CircularProgressIndicator
.
adaptive
(
valueColor:
AlwaysStoppedAnimation
<
Color
>(
AppColors
.
app_blue
,
),
)
:
SvgPicture
.
asset
(
"assets/svg/whatsapp_quote.svg"
)
?
null
:
()
{
//genquotewhatsapp,
final
insertedData
=
provider
.
getFormData
();
provider
.
crmLeadDetailsGenerateQuoteSubmitAPIFunction
(
context
,
widget
.
leadId
,
insertedData
,
"genquotewhatsapp"
,
);
},
child:
Container
(
height:
45
,
alignment:
Alignment
.
center
,
margin:
const
EdgeInsets
.
symmetric
(
horizontal:
10
,
vertical:
15
,
),
padding:
const
EdgeInsets
.
symmetric
(
horizontal:
10
,
vertical:
5
,
),
decoration:
BoxDecoration
(
// color: AppColors.app_blue,
borderRadius:
BorderRadius
.
circular
(
10
),
),
child:
provider
.
submitLoading
?
CircularProgressIndicator
.
adaptive
(
valueColor:
AlwaysStoppedAnimation
<
Color
>(
AppColors
.
app_blue
,
),
)
:
SvgPicture
.
asset
(
"assets/svg/whatsapp_quote.svg"
)
),
),
),
),
SizedBox
(
width:
10
),
Expanded
(
child:
InkResponse
(
onTap:
provider
.
submitLoading
?
null
:
()
{
//genquotewhatsappbymynum,
final
insertedData
=
provider
.
getFormData
();
provider
.
crmLeadDetailsGenerateQuoteSubmitAPIFunction
(
context
,
widget
.
leadId
,
insertedData
,
"genquotewhatsappbymynum"
,
);
},
child:
Container
(
height:
45
,
alignment:
Alignment
.
center
,
margin:
const
EdgeInsets
.
symmetric
(
horizontal:
10
,
vertical:
15
,
),
padding:
const
EdgeInsets
.
symmetric
(
horizontal:
10
,
vertical:
5
,
),
decoration:
BoxDecoration
(
// color: AppColors.app_blue,
borderRadius:
BorderRadius
.
circular
(
10
),
),
child:
SizedBox
(
width:
10
),
Expanded
(
child:
InkResponse
(
onTap:
provider
.
submitLoading
?
CircularProgressIndicator
.
adaptive
(
valueColor:
AlwaysStoppedAnimation
<
Color
>(
AppColors
.
app_blue
,
),
)
:
SvgPicture
.
asset
(
"assets/svg/whatsapp_quote_self.svg"
)
?
null
:
()
{
//genquotewhatsappbymynum,
final
insertedData
=
provider
.
getFormData
();
provider
.
crmLeadDetailsGenerateQuoteSubmitAPIFunction
(
context
,
widget
.
leadId
,
insertedData
,
"genquotewhatsappbymynum"
,
);
},
child:
Container
(
height:
45
,
alignment:
Alignment
.
center
,
margin:
const
EdgeInsets
.
symmetric
(
horizontal:
10
,
vertical:
15
,
),
padding:
const
EdgeInsets
.
symmetric
(
horizontal:
10
,
vertical:
5
,
),
decoration:
BoxDecoration
(
// color: AppColors.app_blue,
borderRadius:
BorderRadius
.
circular
(
10
),
),
child:
provider
.
submitLoading
?
CircularProgressIndicator
.
adaptive
(
valueColor:
AlwaysStoppedAnimation
<
Color
>(
AppColors
.
app_blue
,
),
)
:
SvgPicture
.
asset
(
"assets/svg/whatsapp_quote_self.svg"
)
),
),
),
)
,
]
,
]
,
)
,
),
),
),
...
...
lib/screens/crm/productDetails.dart
View file @
ecd8fcd1
import
'dart:io'
;
import
'package:flutter/material.dart'
;
import
'package:flutter_svg/svg.dart'
;
import
'package:generp/screens/crm/editProductsList.dart'
;
...
...
@@ -35,12 +37,14 @@ class _ProductdetailsState extends State<Productdetails> {
var
customerDetails
=
provider
.
leadProducts
;
return
WillPopScope
(
onWillPop:
()
=>
onBackPressed
(
context
),
child:
Scaffold
(
resizeToAvoidBottomInset:
true
,
appBar:
appbar
(
context
,
"Product Details"
),
backgroundColor:
AppColors
.
scaffold_bg_color
,
body:
SafeArea
(
child:
SizedBox
(
child:
SafeArea
(
top:
false
,
bottom:
Platform
.
isIOS
?
false
:
true
,
child:
Scaffold
(
resizeToAvoidBottomInset:
true
,
appBar:
appbar
(
context
,
"Product Details"
),
backgroundColor:
AppColors
.
scaffold_bg_color
,
body:
SizedBox
(
child:
SingleChildScrollView
(
child:
Column
(
crossAxisAlignment:
CrossAxisAlignment
.
start
,
...
...
@@ -114,40 +118,40 @@ class _ProductdetailsState extends State<Productdetails> {
),
),
),
),
floatingActionButton:
Align
(
alignment:
Alignment
.
bottomCenter
,
child:
InkWell
(
onTap:
()
async
{
var
res
=
await
Navigator
.
push
(
context
,
MaterialPageRoute
(
builder:
(
context
)
=>
EditProductsList
(
leadID:
widget
.
leadID
,
),));
if
(
res
==
tru
e
)
{
provider
.
crmLeadDetailsAPIFunction
(
context
,
widget
.
leadID
,
widget
.
mode
);
}
},
child:
Contain
er
(
alignment:
Alignment
.
bottomCenter
,
height:
45
,
width:
MediaQuery
.
of
(
context
).
size
.
width
,
margin:
EdgeInsets
.
symmetric
(
horizontal:
10
),
decoration:
BoxDecoration
(
color:
AppColors
.
app_blue
,
borderRadius:
BorderRadius
.
circular
(
14.0
),
),
child:
Center
(
child:
Text
(
"Edit Products"
,
textAlign:
TextAlign
.
cen
te
r
,
style:
TextStyle
(
color:
Colors
.
white
,
fontFamily:
"JakartaMedium"
),
floatingActionButton:
Align
(
alignment:
Alignment
.
bottomCenter
,
child:
InkWell
(
onTap:
()
async
{
var
res
=
await
Navigator
.
push
(
context
,
MaterialPageRoute
(
builder:
(
context
)
=>
EditProductsList
(
leadID:
widget
.
leadID
,
),));
if
(
res
==
true
){
provider
.
crmLeadDetailsAPIFunction
(
context
,
widget
.
leadID
,
widget
.
mod
e
)
;
}
}
,
child:
Container
(
alignment:
Alignment
.
bottomCent
er
,
height:
45
,
width:
MediaQuery
.
of
(
context
).
size
.
width
,
margin:
EdgeInsets
.
symmetric
(
horizontal:
10
)
,
decoration:
BoxDecoration
(
color:
AppColors
.
app_blue
,
borderRadius:
BorderRadius
.
circular
(
14.0
)
,
),
child:
Center
(
child:
Text
(
"Edit Products"
,
textAlign:
TextAlign
.
center
,
style:
TextStyle
(
color:
Colors
.
whi
te
,
fontFamily:
"JakartaMedium"
)
,
),
),
),
),
),
floatingActionButtonLocation:
FloatingActionButtonLocation
.
centerFloat
,
),
floatingActionButtonLocation:
FloatingActionButtonLocation
.
centerFloat
,
),
);
},
...
...
lib/screens/crm/prospectContactDetails.dart
View file @
ecd8fcd1
import
'dart:io'
;
import
'package:flutter/material.dart'
;
import
'package:flutter/services.dart'
;
import
'package:flutter_svg/svg.dart'
;
...
...
@@ -23,12 +25,14 @@ class _ProspectContactDetailsState extends State<ProspectContactDetails> {
var
customerDetails
=
provider
.
contactList
;
return
WillPopScope
(
onWillPop:
()
=>
onBackPressed
(
context
),
child:
Scaffold
(
resizeToAvoidBottomInset:
true
,
appBar:
appbar
(
context
,
"Contact Details"
),
backgroundColor:
AppColors
.
scaffold_bg_color
,
body:
SafeArea
(
child:
SizedBox
(
child:
SafeArea
(
top:
false
,
bottom:
Platform
.
isIOS
?
false
:
true
,
child:
Scaffold
(
resizeToAvoidBottomInset:
true
,
appBar:
appbar
(
context
,
"Contact Details"
),
backgroundColor:
AppColors
.
scaffold_bg_color
,
body:
SizedBox
(
child:
SingleChildScrollView
(
child:
Column
(
crossAxisAlignment:
CrossAxisAlignment
.
start
,
...
...
@@ -181,37 +185,37 @@ class _ProspectContactDetailsState extends State<ProspectContactDetails> {
),
),
),
),
floatingActionButton:
Align
(
alignment:
Alignment
.
bottomCenter
,
child:
InkWell
(
onTap:
()
{
_showAddContactSheet
(
context
,
provider
.
accountDetails
.
id
!);
},
child:
Contain
er
(
alignment:
Alignment
.
bottomCenter
,
height:
45
,
width:
MediaQuery
.
of
(
context
).
size
.
width
,
margin:
EdgeInsets
.
symmetric
(
horizontal:
10
),
decoration:
BoxDecoration
(
color:
AppColors
.
app_blue
,
borderRadius:
BorderRadius
.
circular
(
14.0
),
),
child:
Center
(
child:
Text
(
"Add Contact"
,
textAlign:
TextAlign
.
center
,
style:
TextStyle
(
color:
Colors
.
white
,
fontFamily:
"JakartaMedium"
,
floatingActionButton:
Align
(
alignment:
Alignment
.
bottomCenter
,
child:
InkWell
(
onTap:
()
{
_showAddContactSheet
(
context
,
provider
.
accountDetails
.
id
!);
},
child:
Container
(
alignment:
Alignment
.
bottomCent
er
,
height:
45
,
width:
MediaQuery
.
of
(
context
).
size
.
width
,
margin:
EdgeInsets
.
symmetric
(
horizontal:
10
)
,
decoration:
BoxDecoration
(
color:
AppColors
.
app_blue
,
borderRadius:
BorderRadius
.
circular
(
14.0
)
,
),
child:
Center
(
child:
Text
(
"Add Contact"
,
textAlign:
TextAlign
.
center
,
style:
TextStyle
(
color:
Colors
.
white
,
fontFamily:
"JakartaMedium"
,
)
,
),
),
),
),
),
floatingActionButtonLocation:
FloatingActionButtonLocation
.
centerFloat
,
),
floatingActionButtonLocation:
FloatingActionButtonLocation
.
centerFloat
,
),
);
},
...
...
lib/screens/crm/prospectLeadDetails.dart
View file @
ecd8fcd1
import
'dart:io'
;
import
'package:flutter/material.dart'
;
import
'package:generp/Notifiers/crmProvider/crmProspectDetailsProvider.dart'
;
import
'package:generp/screens/crm/LeadDetailsByMode.dart'
;
...
...
@@ -37,12 +39,14 @@ class _ProspectLeadDetailsState extends State<ProspectLeadDetails> {
var
customerDetails
=
provider
.
leadList
;
return
WillPopScope
(
onWillPop:
()
=>
onBackPressed
(
context
),
child:
Scaffold
(
resizeToAvoidBottomInset:
true
,
appBar:
appbar
(
context
,
"Lead Details"
),
backgroundColor:
AppColors
.
scaffold_bg_color
,
body:
SafeArea
(
child:
SizedBox
(
child:
SafeArea
(
top:
false
,
bottom:
Platform
.
isIOS
?
false
:
true
,
child:
Scaffold
(
resizeToAvoidBottomInset:
true
,
appBar:
appbar
(
context
,
"Lead Details"
),
backgroundColor:
AppColors
.
scaffold_bg_color
,
body:
SizedBox
(
child:
SingleChildScrollView
(
child:
Column
(
crossAxisAlignment:
CrossAxisAlignment
.
start
,
...
...
@@ -144,49 +148,49 @@ class _ProspectLeadDetailsState extends State<ProspectLeadDetails> {
),
),
),
),
floatingActionButton:
Align
(
alignment:
Alignment
.
bottomCenter
,
child:
InkWell
(
onTap:
()
async
{
var
res
=
await
Navigator
.
push
(
context
,
MaterialPageRoute
(
builder:
(
context
)
=>
AddProspectLeads
(
leadID:
widget
.
leadID
,
mode:
widget
.
mode
,),
),
);
if
(
res
==
true
)
{
provider
.
crmProspectDetailsAPIFunction
(
floatingActionButton:
Align
(
alignment:
Alignment
.
bottomCenter
,
child:
InkWell
(
onTap:
()
async
{
var
res
=
await
Navigator
.
push
(
context
,
widget
.
leadID
,
MaterialPageRoute
(
builder:
(
context
)
=>
AddProspectLeads
(
leadID:
widget
.
leadID
,
mode:
widget
.
mode
,),
),
);
}
},
child:
Container
(
alignment:
Alignment
.
bottomCenter
,
height:
45
,
width:
MediaQuery
.
of
(
context
).
size
.
width
,
margin:
EdgeInsets
.
symmetric
(
horizontal:
10
),
decoration:
BoxDecoration
(
color:
AppColors
.
app_blue
,
borderRadius:
BorderRadius
.
circular
(
14.0
),
),
child:
Center
(
child:
Text
(
"Add Lead"
,
textAlign:
TextAlign
.
center
,
style:
TextStyle
(
color:
Colors
.
white
,
fontFamily:
"JakartaMedium"
,
if
(
res
==
true
)
{
provider
.
crmProspectDetailsAPIFunction
(
context
,
widget
.
leadID
,
);
}
},
child:
Container
(
alignment:
Alignment
.
bottomCenter
,
height:
45
,
width:
MediaQuery
.
of
(
context
).
size
.
width
,
margin:
EdgeInsets
.
symmetric
(
horizontal:
10
),
decoration:
BoxDecoration
(
color:
AppColors
.
app_blue
,
borderRadius:
BorderRadius
.
circular
(
14.0
),
),
child:
Center
(
child:
Text
(
"Add Lead"
,
textAlign:
TextAlign
.
center
,
style:
TextStyle
(
color:
Colors
.
white
,
fontFamily:
"JakartaMedium"
,
),
),
),
),
),
),
floatingActionButtonLocation:
FloatingActionButtonLocation
.
centerFloat
,
),
floatingActionButtonLocation:
FloatingActionButtonLocation
.
centerFloat
,
),
);
},
...
...
lib/screens/crm/prospectOrderDetails.dart
View file @
ecd8fcd1
import
'dart:io'
;
import
'package:flutter/material.dart'
;
import
'package:generp/screens/order/ordersDetailsByModes.dart'
;
import
'package:provider/provider.dart'
;
...
...
@@ -34,12 +36,14 @@ class _ProspectOrderDetailsState extends State<ProspectOrderDetails> {
var
customerDetails
=
provider
.
ordersList
;
return
WillPopScope
(
onWillPop:
()
=>
onBackPressed
(
context
),
child:
Scaffold
(
resizeToAvoidBottomInset:
true
,
appBar:
appbar
(
context
,
"Order Details"
),
backgroundColor:
AppColors
.
scaffold_bg_color
,
body:
SafeArea
(
child:
SizedBox
(
child:
SafeArea
(
top:
false
,
bottom:
Platform
.
isIOS
?
false
:
true
,
child:
Scaffold
(
resizeToAvoidBottomInset:
true
,
appBar:
appbar
(
context
,
"Order Details"
),
backgroundColor:
AppColors
.
scaffold_bg_color
,
body:
SizedBox
(
child:
SingleChildScrollView
(
child:
Column
(
crossAxisAlignment:
CrossAxisAlignment
.
start
,
...
...
@@ -166,8 +170,8 @@ class _ProspectOrderDetailsState extends State<ProspectOrderDetails> {
),
),
),
),
),
),
);
},
...
...
lib/screens/crm/prospectPaymentDetails.dart
View file @
ecd8fcd1
import
'dart:io'
;
import
'package:flutter/material.dart'
;
import
'package:generp/screens/order/paymentDetailsByMode.dart'
;
import
'package:provider/provider.dart'
;
...
...
@@ -35,12 +37,15 @@ class _ProspectPaymentDetailsState extends State<ProspectPaymentDetails> {
var
customerDetails
=
provider
.
paymentsList
;
return
WillPopScope
(
onWillPop:
()
=>
onBackPressed
(
context
),
child:
Scaffold
(
resizeToAvoidBottomInset:
true
,
appBar:
appbar
(
context
,
"Payment Details"
),
backgroundColor:
AppColors
.
scaffold_bg_color
,
body:
SafeArea
(
child:
SizedBox
(
child:
SafeArea
(
top:
false
,
bottom:
Platform
.
isIOS
?
false
:
true
,
child:
Scaffold
(
resizeToAvoidBottomInset:
true
,
appBar:
appbar
(
context
,
"Payment Details"
),
backgroundColor:
AppColors
.
scaffold_bg_color
,
body:
SizedBox
(
child:
SingleChildScrollView
(
child:
Column
(
crossAxisAlignment:
CrossAxisAlignment
.
start
,
...
...
Prev
1
2
3
4
5
Next
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment