validation_isrequired
This commit is contained in:
parent
12542f3534
commit
c6ade88f27
|
@ -73,6 +73,7 @@ class MyApp extends StatefulWidget {
|
|||
|
||||
class _MyAppState extends State<MyApp> {
|
||||
// This widget is the root of your application.
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return MaterialApp(
|
||||
|
|
|
@ -2,6 +2,7 @@ import 'package:discover_module/ui_screen/profile.dart';
|
|||
import 'package:discover_module/ui_screen/ranking.dart';
|
||||
import 'package:flutter/cupertino.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter/services.dart';
|
||||
import 'package:flutter/widgets.dart';
|
||||
import 'package:flutter_profile_picture/flutter_profile_picture.dart';
|
||||
import 'package:hive_flutter/hive_flutter.dart';
|
||||
|
@ -23,6 +24,8 @@ class _ContactsState extends State<Contacts> {
|
|||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
SystemChrome.setSystemUIOverlayStyle(
|
||||
SystemUiOverlayStyle(statusBarColor: Color.fromARGB(255, 0, 71, 132)));
|
||||
print(
|
||||
"newdata_is: ${_contactbox.values.toList()},${_contactbox.values.toList().length}");
|
||||
|
||||
|
|
|
@ -11,6 +11,7 @@ import 'package:discover_module/ui_screen/interactionform/widget/custombutton.da
|
|||
import 'package:discover_module/ui_screen/interactionform/widget/customrangeslider.dart';
|
||||
import 'package:discover_module/ui_screen/interactionform/widget/interatciontextfield.dart';
|
||||
import 'package:discover_module/ui_screen/interactionform/widget/responsive_ext.dart';
|
||||
import 'package:flutter/cupertino.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter/services.dart';
|
||||
import 'package:intl/intl.dart';
|
||||
|
@ -312,16 +313,31 @@ class _EditInteractionScreenState extends State<EditInteractionScreen> {
|
|||
.only(
|
||||
left: 8.0,
|
||||
right: 8.0),
|
||||
// child: Text(
|
||||
// '${sectionItem.name}:*',
|
||||
// style: TextStyle(
|
||||
// color: Colors
|
||||
// .orange
|
||||
// .shade800,
|
||||
// fontSize:
|
||||
// isTablet
|
||||
// ? 18
|
||||
// : 12,
|
||||
// ),
|
||||
// ),
|
||||
child: Text(
|
||||
'${sectionItem.name}:*',
|
||||
sectionItem
|
||||
.isRequired
|
||||
? '${sectionItem.name}:*'
|
||||
: '${sectionItem.name}:',
|
||||
style: TextStyle(
|
||||
color: Colors
|
||||
.orange
|
||||
.shade800,
|
||||
fontSize:
|
||||
isTablet
|
||||
? 18
|
||||
: 12,
|
||||
fontSize: 18.0,
|
||||
// fontSize: isTablet
|
||||
// ? 18
|
||||
// : 12,
|
||||
),
|
||||
),
|
||||
),
|
||||
|
@ -518,7 +534,10 @@ class _EditInteractionScreenState extends State<EditInteractionScreen> {
|
|||
),
|
||||
);
|
||||
case InteractionWidget.DROPDOWN:
|
||||
return customdropdown(sectionItem, provider, list, multiple);
|
||||
// return customdropdown(sectionItem, provider, list, multiple);
|
||||
|
||||
return customAutoCompletedropdown(
|
||||
sectionItem, provider, list, multiple);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1212,28 +1231,25 @@ class _EditInteractionScreenState extends State<EditInteractionScreen> {
|
|||
}
|
||||
print("ConvertedArrayEditMulti.leangth: $convertedArray");
|
||||
print("ConvertedArray.leangth: ${convertedArray.length}");
|
||||
return DecoratedBox(
|
||||
decoration: BoxDecoration(
|
||||
border: Border.all(color: Colors.black),
|
||||
borderRadius: BorderRadius.circular(10.0),
|
||||
),
|
||||
child: Padding(
|
||||
return Padding(
|
||||
padding: isTablet
|
||||
? const EdgeInsets.only(left: 14.0)
|
||||
? const EdgeInsets.only(left: 0.0)
|
||||
: const EdgeInsets.only(left: 12.0, right: 12.0),
|
||||
child: Column(
|
||||
children: [
|
||||
for (var i = 0; i < convertedArray.length; i++)
|
||||
DecoratedBox(
|
||||
decoration: BoxDecoration(
|
||||
color: i % 2 == 0
|
||||
? Color.fromARGB(133, 213, 241, 254)
|
||||
: Colors.white,
|
||||
),
|
||||
child: Wrap(
|
||||
children: [
|
||||
GestureDetector(child: Text("data")),
|
||||
GridView.builder(
|
||||
physics: const NeverScrollableScrollPhysics(),
|
||||
gridDelegate: SliverGridDelegateWithFixedCrossAxisCount(
|
||||
// crossAxisCount: context.responsive<int>(
|
||||
// 1, // default
|
||||
// sm: 1, // small
|
||||
// md: 1, // medium
|
||||
// lg: sectionList.length == 1 ? 1 : 4, // large
|
||||
// xl: 5, // extra large screen
|
||||
// ),
|
||||
crossAxisCount: context.responsive<int>(
|
||||
1,
|
||||
sm: 1, // small
|
||||
|
@ -1245,17 +1261,6 @@ class _EditInteractionScreenState extends State<EditInteractionScreen> {
|
|||
),
|
||||
mainAxisSpacing:
|
||||
sectionList.length == 1 || !isTablet ? 1 : 2,
|
||||
// childAspectRatio: isTablet
|
||||
// ? MediaQuery.of(context).size.width /
|
||||
// (MediaQuery.of(context).size.height * 0.3)
|
||||
// : MediaQuery.of(context).size.width /
|
||||
// (MediaQuery.of(context).size.height * 0.1),
|
||||
// childAspectRatio: isTablet
|
||||
// ? MediaQuery.of(context).size.width /
|
||||
// (MediaQuery.of(context).size.height / 3)
|
||||
// : MediaQuery.of(context).size.width /
|
||||
// (MediaQuery.of(context).size.height * 0.2),
|
||||
|
||||
childAspectRatio: sectionList.length == 1
|
||||
? orientation == Orientation.landscape
|
||||
? 10
|
||||
|
@ -1263,61 +1268,29 @@ class _EditInteractionScreenState extends State<EditInteractionScreen> {
|
|||
: isTablet
|
||||
? 2.8
|
||||
: 3.0,
|
||||
// mainAxisSpacing:
|
||||
// sectionList.length == 1 || !isTablet ? 1 : 3.5,
|
||||
// childAspectRatio: sectionList.length == 1
|
||||
// ? orientation == Orientation.landscape
|
||||
// ? 10
|
||||
// : 4.8
|
||||
// : isTablet
|
||||
// ? 2.8
|
||||
// : 3.0,
|
||||
),
|
||||
shrinkWrap: true,
|
||||
padding: EdgeInsets.zero,
|
||||
|
||||
// childAspectRatio: sectionList.length == 1 || !isTablet
|
||||
// ? orientation == Orientation.landscape
|
||||
// ? 10
|
||||
// : 4.2
|
||||
// : 1.8,
|
||||
|
||||
itemCount: convertedArray[i].length,
|
||||
itemBuilder: (context, index) {
|
||||
// children: List.generate(
|
||||
// sectionList.length,
|
||||
// (i) {
|
||||
// // print(sectionList);
|
||||
// SectionList sectionItem = sectionList[i];
|
||||
// dropdownvalue = sectionItem.widget == InteractionWidget.DROPDOWN
|
||||
// ? sectionItem.value ?? "Select"
|
||||
// : ' ';
|
||||
// List<InputClass> list =
|
||||
// sectionItem.widget == InteractionWidget.DROPDOWN ||
|
||||
// sectionItem.widget == InteractionWidget.AUTOCOMPLETE ||
|
||||
// sectionItem.widget == InteractionWidget.MULTISELECT
|
||||
// ? provider.getData2(sectionItem)
|
||||
// : [];
|
||||
// provider.checkboxlist =
|
||||
// sectionItem.widget == InteractionWidget.CHECKBOX
|
||||
// ? provider.getData2(sectionItem)
|
||||
// : [];
|
||||
SectionList sectionItem = convertedArray[i][index];
|
||||
dropdownvalue =
|
||||
sectionItem.widget == InteractionWidget.DROPDOWN
|
||||
? sectionItem.value ?? "Select"
|
||||
: ' ';
|
||||
List<InputClass> list = sectionItem.widget ==
|
||||
InteractionWidget.DROPDOWN ||
|
||||
List<InputClass> list =
|
||||
sectionItem.widget == InteractionWidget.DROPDOWN ||
|
||||
sectionItem.widget ==
|
||||
InteractionWidget.AUTOCOMPLETE ||
|
||||
sectionItem.widget == InteractionWidget.MULTISELECT
|
||||
sectionItem.widget ==
|
||||
InteractionWidget.MULTISELECT
|
||||
? provider.getData2(sectionItem)
|
||||
: [];
|
||||
provider.checkboxlist =
|
||||
sectionItem.widget == InteractionWidget.CHECKBOX
|
||||
? provider.getData2(sectionItem)
|
||||
: [];
|
||||
|
||||
return SizedBox(
|
||||
height: MediaQuery.of(context).size.height,
|
||||
child: Column(
|
||||
|
@ -1331,13 +1304,17 @@ class _EditInteractionScreenState extends State<EditInteractionScreen> {
|
|||
padding: const EdgeInsets.only(
|
||||
left: 8.0, right: 8.0),
|
||||
child: Text(
|
||||
'${sectionItem.name}:*',
|
||||
sectionItem.isRequired
|
||||
? '${sectionItem.name}:*'
|
||||
: '${sectionItem.name}:',
|
||||
style: TextStyle(
|
||||
color: Colors.orange.shade800,
|
||||
fontSize: isTablet ? 18 : 14,
|
||||
),
|
||||
),
|
||||
fontSize: 18.0,
|
||||
// fontSize: isTablet
|
||||
// ? 18
|
||||
// : 12,
|
||||
),
|
||||
)),
|
||||
const SizedBox(
|
||||
height: 15,
|
||||
),
|
||||
|
@ -1350,15 +1327,16 @@ class _EditInteractionScreenState extends State<EditInteractionScreen> {
|
|||
const Color.fromARGB(
|
||||
255, 233, 229, 229),
|
||||
onPressed: () async {
|
||||
if (sectionItem
|
||||
.selectedValue!.isNotEmpty) {
|
||||
if (sectionItem.selectedValue!
|
||||
.isNotEmpty) {
|
||||
showFilesAlertDialog(
|
||||
context,
|
||||
sectionItem.fileName!
|
||||
.join(','),
|
||||
sectionItem);
|
||||
} else {
|
||||
sectionItem.selectedValue = [];
|
||||
sectionItem.selectedValue =
|
||||
[];
|
||||
sectionItem.extension = [];
|
||||
sectionItem.fileName = [];
|
||||
await getEncodedFile(
|
||||
|
@ -1375,12 +1353,14 @@ class _EditInteractionScreenState extends State<EditInteractionScreen> {
|
|||
width: 5,
|
||||
),
|
||||
Text(
|
||||
sectionItem.selectedValue!.isNotEmpty
|
||||
sectionItem
|
||||
.selectedValue!.isNotEmpty
|
||||
? 'File uploaded'
|
||||
: 'No file uploaded',
|
||||
style: TextStyle(
|
||||
color: sectionItem
|
||||
.selectedValue!.isNotEmpty
|
||||
.selectedValue!
|
||||
.isNotEmpty
|
||||
? Colors.green
|
||||
: Colors.red),
|
||||
),
|
||||
|
@ -1399,8 +1379,8 @@ class _EditInteractionScreenState extends State<EditInteractionScreen> {
|
|||
icon: const Icon(
|
||||
Icons.cancel,
|
||||
size: 30,
|
||||
color:
|
||||
Color.fromARGB(255, 8, 39, 92),
|
||||
color: Color.fromARGB(
|
||||
255, 8, 39, 92),
|
||||
),
|
||||
)
|
||||
: Padding(
|
||||
|
@ -1441,6 +1421,8 @@ class _EditInteractionScreenState extends State<EditInteractionScreen> {
|
|||
],
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
|
|
|
@ -1,8 +1,10 @@
|
|||
import 'dart:convert';
|
||||
import 'dart:io';
|
||||
import 'dart:js_interop';
|
||||
// import 'dart:js_util';
|
||||
|
||||
import 'package:discover_module/constants.dart';
|
||||
import 'package:discover_module/custom_widget/floating_btn.dart';
|
||||
import 'package:discover_module/ui_screen/add_event/add_hcp.dart';
|
||||
import 'package:discover_module/ui_screen/interactionform/interactionprovider.dart';
|
||||
import 'package:discover_module/ui_screen/interactionform/model/interaction_data.dart';
|
||||
|
@ -13,10 +15,12 @@ import 'package:discover_module/ui_screen/interactionform/widget/interatciontext
|
|||
import 'package:discover_module/ui_screen/interactionform/widget/responsive_ext.dart';
|
||||
import 'package:flutter/cupertino.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter/rendering.dart';
|
||||
import 'package:flutter/services.dart';
|
||||
import 'package:flutter/widgets.dart';
|
||||
import 'package:intl/intl.dart';
|
||||
import 'package:path_provider/path_provider.dart';
|
||||
import 'package:popover/popover.dart';
|
||||
import 'package:provider/provider.dart';
|
||||
import 'package:dropdown_button2/dropdown_button2.dart';
|
||||
|
||||
|
@ -25,6 +29,8 @@ import 'package:file_picker/file_picker.dart';
|
|||
import 'package:permission_handler/permission_handler.dart';
|
||||
import 'package:path/path.dart' as p;
|
||||
|
||||
// import 'package:popover/popover.dart';
|
||||
|
||||
class InteractionScreen extends StatefulWidget {
|
||||
int index;
|
||||
String form;
|
||||
|
@ -171,8 +177,7 @@ class _InteractionScreenState extends State<InteractionScreen> {
|
|||
Padding(
|
||||
padding: const EdgeInsets.all(8.0),
|
||||
child: Column(
|
||||
crossAxisAlignment:
|
||||
CrossAxisAlignment.center,
|
||||
crossAxisAlignment: CrossAxisAlignment.center,
|
||||
children: [
|
||||
Padding(
|
||||
padding: isTablet
|
||||
|
@ -193,8 +198,7 @@ class _InteractionScreenState extends State<InteractionScreen> {
|
|||
// xl: 3, // extra large screen
|
||||
// ),
|
||||
|
||||
crossAxisCount:
|
||||
context.responsive<int>(
|
||||
crossAxisCount: context.responsive<int>(
|
||||
1,
|
||||
sm: 1, // small
|
||||
md: isTablet
|
||||
|
@ -220,8 +224,7 @@ class _InteractionScreenState extends State<InteractionScreen> {
|
|||
// : 1,
|
||||
|
||||
mainAxisSpacing:
|
||||
sectionList.length == 1 ||
|
||||
!isTablet
|
||||
sectionList.length == 1 || !isTablet
|
||||
? 1
|
||||
: 3.5,
|
||||
// mainAxisSpacing:
|
||||
|
@ -271,11 +274,9 @@ class _InteractionScreenState extends State<InteractionScreen> {
|
|||
dropdownvalue = sectionItem
|
||||
.widget ==
|
||||
InteractionWidget.DROPDOWN
|
||||
? sectionItem.value ??
|
||||
"Select"
|
||||
? sectionItem.value ?? "Select"
|
||||
: ' ';
|
||||
List<
|
||||
InputClass> list = sectionItem
|
||||
List<InputClass> list = sectionItem
|
||||
.widget ==
|
||||
InteractionWidget
|
||||
.DROPDOWN ||
|
||||
|
@ -285,15 +286,12 @@ class _InteractionScreenState extends State<InteractionScreen> {
|
|||
sectionItem.widget ==
|
||||
InteractionWidget
|
||||
.MULTISELECT
|
||||
? provider
|
||||
.getData2(sectionItem)
|
||||
? provider.getData2(sectionItem)
|
||||
: [];
|
||||
provider.checkboxlist =
|
||||
sectionItem.widget ==
|
||||
InteractionWidget
|
||||
.CHECKBOX
|
||||
? provider
|
||||
.getData2(sectionItem)
|
||||
provider.checkboxlist = sectionItem
|
||||
.widget ==
|
||||
InteractionWidget.CHECKBOX
|
||||
? provider.getData2(sectionItem)
|
||||
: [];
|
||||
|
||||
return Column(
|
||||
|
@ -313,8 +311,7 @@ class _InteractionScreenState extends State<InteractionScreen> {
|
|||
left: 8.0,
|
||||
right: 8.0),
|
||||
child: FittedBox(
|
||||
fit: BoxFit
|
||||
.scaleDown,
|
||||
fit: BoxFit.scaleDown,
|
||||
child: Text(
|
||||
sectionItem
|
||||
.validation!
|
||||
|
@ -397,8 +394,90 @@ class _InteractionScreenState extends State<InteractionScreen> {
|
|||
),
|
||||
// const Spacer(),
|
||||
// saveActions(provider),
|
||||
Align(
|
||||
alignment: Alignment.bottomRight,
|
||||
child: Container(
|
||||
height: 80.0,
|
||||
width: 80.0,
|
||||
child: _offsetPopup(provider.interactionReponseList)))
|
||||
],
|
||||
)),
|
||||
),
|
||||
// floatingActionButton: FloatingBtn(
|
||||
// title: "data",
|
||||
// icon: Icons.add,
|
||||
// onTap: () {
|
||||
// showPopover(
|
||||
// context: context,
|
||||
// bodyBuilder: (context) {
|
||||
// return Padding(
|
||||
// padding: const EdgeInsets.symmetric(vertical: 8),
|
||||
// child: ListView(
|
||||
// padding: const EdgeInsets.all(8),
|
||||
// children: [
|
||||
// InkWell(
|
||||
// onTap: () {
|
||||
|
||||
// },
|
||||
// child: Container(
|
||||
// height: 50,
|
||||
// color: Colors.amber[100],
|
||||
// child: const Center(child: Text('Entry A')),
|
||||
// ),
|
||||
// ),
|
||||
// const Divider(),
|
||||
// Container(
|
||||
// height: 50,
|
||||
// color: Colors.amber[200],
|
||||
// child: const Center(child: Text('Entry B')),
|
||||
// ),
|
||||
// const Divider(),
|
||||
// Container(
|
||||
// height: 50,
|
||||
// color: Colors.amber[300],
|
||||
// child: const Center(child: Text('Entry C')),
|
||||
// ),
|
||||
// const Divider(),
|
||||
// Container(
|
||||
// height: 50,
|
||||
// color: Colors.amber[400],
|
||||
// child: const Center(child: Text('Entry D')),
|
||||
// ),
|
||||
// const Divider(),
|
||||
// Container(
|
||||
// height: 50,
|
||||
// color: Colors.amber[500],
|
||||
// child: const Center(child: Text('Entry E')),
|
||||
// ),
|
||||
// const Divider(),
|
||||
// Container(
|
||||
// height: 50,
|
||||
// color: Colors.amber[600],
|
||||
// child: const Center(child: Text('Entry F')),
|
||||
// ),
|
||||
// ],
|
||||
// ),
|
||||
// );
|
||||
// },
|
||||
// );
|
||||
|
||||
// var itemsectionname =
|
||||
// provider.interactionReponseList.length;
|
||||
|
||||
// print("ItemSectionname: $itemsectionname");
|
||||
|
||||
// for (int i = 0; i < itemsectionname; i++) {
|
||||
// var item = provider.interactionReponseList[i];
|
||||
|
||||
// print(
|
||||
// "Check_ProviderNameL ${item.sectionName}, ${item.multiple}");
|
||||
// }
|
||||
|
||||
// // provider.getSectionItem(
|
||||
// // item.sectionName,
|
||||
// // );
|
||||
// },
|
||||
// )
|
||||
),
|
||||
);
|
||||
}),
|
||||
);
|
||||
|
@ -549,7 +628,10 @@ class _InteractionScreenState extends State<InteractionScreen> {
|
|||
),
|
||||
);
|
||||
case InteractionWidget.DROPDOWN:
|
||||
return customdropdown(sectionItem, provider, list, multiple);
|
||||
// return customdropdown(sectionItem, provider, list, multiple);
|
||||
|
||||
return customAutoCompletedropdown(
|
||||
sectionItem, provider, list, multiple);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1125,200 +1207,6 @@ class _InteractionScreenState extends State<InteractionScreen> {
|
|||
);
|
||||
}
|
||||
|
||||
// Widget gridViewWidget(
|
||||
// InteractionProvider provider,
|
||||
// String sectionName,
|
||||
// List<SectionList> sectionList,
|
||||
// Orientation orientation,
|
||||
// FormFieldData item,
|
||||
// int listIndex) {
|
||||
// print("ListInex: $listIndex");
|
||||
// print("sectionName: $sectionName");
|
||||
// print("sectionName: $sectionName");
|
||||
|
||||
// print("gridsectionlost_is: $sectionList");
|
||||
// print("gridsectionlostleangth_is: ${sectionList.length}");
|
||||
|
||||
// List<SectionList> pooja = sectionList;
|
||||
|
||||
// print("Pooja_isss: $pooja");
|
||||
|
||||
// return Padding(
|
||||
// padding: isTablet
|
||||
// ? const EdgeInsets.only(left: 8.0)
|
||||
// : const EdgeInsets.only(left: 12.0, right: 12.0),
|
||||
// child: GridView.count(
|
||||
// physics: const NeverScrollableScrollPhysics(),
|
||||
// // crossAxisCount: context.responsive<int>(
|
||||
// // 1, // default
|
||||
// // sm: 1, // small
|
||||
// // md: 1, // medium
|
||||
// // lg: sectionList.length == 1 ? 1 : 4, // large
|
||||
// // xl: 5, // extra large screen
|
||||
// // ),
|
||||
// crossAxisCount: context.responsive<int>(
|
||||
// 1,
|
||||
// sm: 1, // small
|
||||
// md: 1, // medium
|
||||
// lg: sectionList.length == 1
|
||||
// ? 1
|
||||
// : (sectionList.length >= 1 ? 3 : 3), // large
|
||||
// xl: 3, // extra large screen
|
||||
// ),
|
||||
// mainAxisSpacing: sectionList.length == 1 || !isTablet ? 1 : 2,
|
||||
// shrinkWrap: true,
|
||||
// padding: EdgeInsets.zero,
|
||||
// // childAspectRatio: sectionList.length == 1 || !isTablet
|
||||
// // ? orientation == Orientation.landscape
|
||||
// // ? 10
|
||||
// // : 4.2
|
||||
// // : 1.8,
|
||||
// // childAspectRatio: sectionList.length == 1
|
||||
// // ? orientation == Orientation.landscape
|
||||
// // ? 10
|
||||
// // : 4.8
|
||||
// // : isTablet
|
||||
// // ? 2.8
|
||||
// // : 3.0,
|
||||
// childAspectRatio: MediaQuery.of(context).size.width /
|
||||
// (MediaQuery.of(context).size.height / 3),
|
||||
// children: List.generate(
|
||||
// sectionList.length,
|
||||
// (i) {
|
||||
// print(sectionList);
|
||||
// SectionList sectionItem = sectionList[i];
|
||||
// dropdownvalue = sectionItem.widget == InteractionWidget.DROPDOWN
|
||||
// ? sectionItem.value ?? "Select"
|
||||
// : ' ';
|
||||
// List<InputClass> list =
|
||||
// sectionItem.widget == InteractionWidget.DROPDOWN ||
|
||||
// sectionItem.widget == InteractionWidget.AUTOCOMPLETE ||
|
||||
// sectionItem.widget == InteractionWidget.MULTISELECT
|
||||
// ? provider.getData2(sectionItem)
|
||||
// : [];
|
||||
// provider.checkboxlist =
|
||||
// sectionItem.widget == InteractionWidget.CHECKBOX
|
||||
// ? provider.getData2(sectionItem)
|
||||
// : [];
|
||||
|
||||
// return Wrap(children: [
|
||||
// Column(
|
||||
// crossAxisAlignment: CrossAxisAlignment.start,
|
||||
// children: [
|
||||
// sectionItem.widget == InteractionWidget.BUTTON &&
|
||||
// sectionItem.input == 'add' ||
|
||||
// sectionItem.input == 'deletebtn'
|
||||
// ? const SizedBox.shrink()
|
||||
// : Text(
|
||||
// '${sectionItem.name}:*',
|
||||
// style: TextStyle(
|
||||
// color: Colors.orange.shade800,
|
||||
// fontSize: isTablet ? 18 : 14,
|
||||
// ),
|
||||
// ),
|
||||
// // const SizedBox(
|
||||
// // height: 15,
|
||||
// // ),
|
||||
// sectionItem.widget == InteractionWidget.BUTTON
|
||||
// ? sectionItem.input == 'chooseFile'
|
||||
// ? Row(
|
||||
// children: [
|
||||
// CustomButton(
|
||||
// backgroundColor: const Color.fromARGB(
|
||||
// 255, 233, 229, 229),
|
||||
// onPressed: () async {
|
||||
// sectionItem.selectedValue = [];
|
||||
// sectionItem.extension = [];
|
||||
// sectionItem.fileName = [];
|
||||
// await getEncodedFile(sectionItem);
|
||||
|
||||
// setState(() {});
|
||||
// },
|
||||
// width: 120,
|
||||
// height: 40,
|
||||
// fontsize: 12,
|
||||
// textColor: Colors.black,
|
||||
// title: sectionItem.name),
|
||||
// const SizedBox(
|
||||
// width: 5,
|
||||
// ),
|
||||
// Text(
|
||||
// sectionItem.selectedValue!.isNotEmpty
|
||||
// ? sectionItem.selectedValue!.isNotEmpty
|
||||
// ? 'File uploaded'
|
||||
// : "Files Uploaded"
|
||||
// : 'No file uploaded',
|
||||
// style: TextStyle(
|
||||
// color:
|
||||
// sectionItem.selectedValue!.isNotEmpty
|
||||
// ? Colors.green
|
||||
// : Colors.red),
|
||||
// ),
|
||||
// ],
|
||||
// )
|
||||
// : isTablet
|
||||
// ? IconButton(
|
||||
// onPressed: () {
|
||||
// provider.deleteMultipleRows(
|
||||
// sectionItem.gid!,
|
||||
// sectionList[i],
|
||||
// sectionName);
|
||||
|
||||
// setState(() {});
|
||||
// },
|
||||
// icon: const Icon(
|
||||
// Icons.cancel,
|
||||
// size: 30,
|
||||
// color: Color.fromARGB(255, 8, 39, 92),
|
||||
// ),
|
||||
// )
|
||||
// : Padding(
|
||||
// padding:
|
||||
// const EdgeInsets.only(left: 3.0, top: 5),
|
||||
// child: CustomButton(
|
||||
// backgroundColor: const Color.fromARGB(
|
||||
// 255, 233, 75, 75),
|
||||
// onPressed: () {
|
||||
// provider.deleteMultipleRows(
|
||||
// sectionItem.gid!,
|
||||
// sectionList[i],
|
||||
// sectionName);
|
||||
|
||||
// setState(() {});
|
||||
// },
|
||||
// // width: 80,
|
||||
// // height: 30,
|
||||
|
||||
// height: 40,
|
||||
|
||||
// // height:
|
||||
// // MediaQuery.of(context).size.height *
|
||||
// // 0.2,
|
||||
// fontsize: 12,
|
||||
// textColor: Colors.white,
|
||||
// title: "Delete"),
|
||||
// )
|
||||
// : returnWidget(
|
||||
// sectionItem: sectionItem,
|
||||
// item: item,
|
||||
// provider: provider,
|
||||
// list: list,
|
||||
// gridIndex: i,
|
||||
// listIndex: listIndex,
|
||||
// widgetData: sectionItem.widget!,
|
||||
// multiple: true),
|
||||
// ],
|
||||
// ),
|
||||
// ]);
|
||||
// },
|
||||
// ),
|
||||
// ),
|
||||
// );
|
||||
// }
|
||||
//////////////////////////////////////Poojaaaa/////////////////////
|
||||
///
|
||||
///
|
||||
|
||||
Widget gridViewWidget(
|
||||
InteractionProvider provider,
|
||||
String sectionName,
|
||||
|
@ -1357,46 +1245,24 @@ class _InteractionScreenState extends State<InteractionScreen> {
|
|||
print("ConvertedArray.leangth: $convertedArray");
|
||||
print("ConvertedArray.leangth: ${convertedArray.length}");
|
||||
|
||||
return DecoratedBox(
|
||||
decoration: BoxDecoration(
|
||||
border: Border.all(color: Colors.black),
|
||||
borderRadius: BorderRadius.circular(10.0),
|
||||
),
|
||||
child: Padding(
|
||||
return Padding(
|
||||
padding: isTablet
|
||||
? const EdgeInsets.only(left: 14.0)
|
||||
? const EdgeInsets.only(left: 0.0)
|
||||
: const EdgeInsets.only(left: 12.0, right: 12.0),
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
for (var i = 0; i < convertedArray.length; i++)
|
||||
GridView.builder(
|
||||
DecoratedBox(
|
||||
decoration: BoxDecoration(
|
||||
// border: Border.all(color: Colors.black),
|
||||
// borderRadius: BorderRadius.circular(10.0),
|
||||
color: i % 2 == 0
|
||||
? Color.fromARGB(133, 213, 241, 254)
|
||||
: Colors.white,
|
||||
),
|
||||
child: GridView.builder(
|
||||
physics: const NeverScrollableScrollPhysics(),
|
||||
// gridDelegate: SliverGridDelegateWithFixedCrossAxisCount(
|
||||
// crossAxisCount: context.responsive<int>(
|
||||
// 1,
|
||||
// sm: 1, // small
|
||||
// md: orientation == Orientation.landscape
|
||||
// ? 1
|
||||
// : 2, // medium
|
||||
// lg: sectionList.length == 1
|
||||
// ? 1
|
||||
// : (sectionList.length >= 1 ? 3 : 3), // large
|
||||
// xl: 3, // extra large screen
|
||||
// ),
|
||||
// mainAxisSpacing:
|
||||
// sectionList.length == 1 || !isTablet ? 1 : 2,
|
||||
// // childAspectRatio: isTablet
|
||||
// // ? MediaQuery.of(context).size.width /
|
||||
// // (MediaQuery.of(context).size.height * 0.3)
|
||||
// // : MediaQuery.of(context).size.width /
|
||||
// // (MediaQuery.of(context).size.height * 0.1),
|
||||
// childAspectRatio: isTablet
|
||||
// ? MediaQuery.of(context).size.width /
|
||||
// (MediaQuery.of(context).size.height / 3)
|
||||
// : MediaQuery.of(context).size.width /
|
||||
// (MediaQuery.of(context).size.height * 0.2),
|
||||
// ),
|
||||
gridDelegate: SliverGridDelegateWithFixedCrossAxisCount(
|
||||
crossAxisCount: context.responsive<int>(
|
||||
1,
|
||||
|
@ -1411,13 +1277,6 @@ class _InteractionScreenState extends State<InteractionScreen> {
|
|||
),
|
||||
mainAxisSpacing:
|
||||
sectionList.length == 1 || !isTablet ? 1 : 1,
|
||||
|
||||
// childAspectRatio: isTablet
|
||||
// ? MediaQuery.of(context).size.width /
|
||||
// (MediaQuery.of(context).size.height * 0.3)
|
||||
// : MediaQuery.of(context).size.width /
|
||||
// (MediaQuery.of(context).size.height * 0.1),
|
||||
|
||||
childAspectRatio: sectionList.length == 1
|
||||
? orientation == Orientation.landscape
|
||||
? 10
|
||||
|
@ -1425,47 +1284,11 @@ class _InteractionScreenState extends State<InteractionScreen> {
|
|||
: isTablet
|
||||
? 2.8
|
||||
: 3.0,
|
||||
|
||||
// childAspectRatio: isTablet
|
||||
// ? MediaQuery.of(context).size.width /
|
||||
// (MediaQuery.of(context).size.height / 3)
|
||||
// : orientation == Orientation.landscape
|
||||
// ? MediaQuery.of(context).size.width /
|
||||
// (MediaQuery.of(context).size.height * 0.5)
|
||||
// : MediaQuery.of(context).size.width /
|
||||
// (MediaQuery.of(context).size.height * 0.1),
|
||||
),
|
||||
shrinkWrap: true,
|
||||
padding: EdgeInsets.zero,
|
||||
itemCount: convertedArray[i].length,
|
||||
itemBuilder: (context, index) {
|
||||
// SectionList sectionItem =
|
||||
// convertedArray.expand((list) => list).toList()[index];
|
||||
|
||||
// List.generate(
|
||||
// sectionList.length,
|
||||
// (i) {
|
||||
// print(sectionList);
|
||||
// // SectionList sectionItem = sectionList[i];
|
||||
// SectionList sectionItem =
|
||||
// convertedArray.expand((list) => list).toList()[index];
|
||||
// dropdownvalue =
|
||||
// sectionItem.widget == InteractionWidget.DROPDOWN
|
||||
// ? sectionItem.value ?? "Select"
|
||||
// : ' ';
|
||||
// List<InputClass> list =
|
||||
// sectionItem.widget == InteractionWidget.DROPDOWN ||
|
||||
// sectionItem.widget ==
|
||||
// InteractionWidget.AUTOCOMPLETE ||
|
||||
// sectionItem.widget ==
|
||||
// InteractionWidget.MULTISELECT
|
||||
// ? provider.getData2(sectionItem)
|
||||
// : [];
|
||||
// provider.checkboxlist =
|
||||
// sectionItem.widget == InteractionWidget.CHECKBOX
|
||||
// ? provider.getData2(sectionItem)
|
||||
// : [];
|
||||
|
||||
SectionList sectionItem = convertedArray[i][index];
|
||||
dropdownvalue =
|
||||
sectionItem.widget == InteractionWidget.DROPDOWN
|
||||
|
@ -1497,7 +1320,9 @@ class _InteractionScreenState extends State<InteractionScreen> {
|
|||
child: FittedBox(
|
||||
fit: BoxFit.scaleDown,
|
||||
child: Text(
|
||||
'${sectionItem.name}:*',
|
||||
sectionItem.validation!.isRequired
|
||||
? "${sectionItem.name}*"
|
||||
: sectionItem.name,
|
||||
style: TextStyle(
|
||||
color: Colors.orange.shade800,
|
||||
fontSize: 18),
|
||||
|
@ -1602,10 +1427,10 @@ class _InteractionScreenState extends State<InteractionScreen> {
|
|||
],
|
||||
),
|
||||
);
|
||||
})
|
||||
}),
|
||||
)
|
||||
],
|
||||
),
|
||||
),
|
||||
);
|
||||
//);
|
||||
}
|
||||
|
@ -1761,6 +1586,77 @@ class _InteractionScreenState extends State<InteractionScreen> {
|
|||
},
|
||||
);
|
||||
}
|
||||
|
||||
Widget _offsetPopup(List<FormFieldData> interactionReponseList) => PopupMenuButton<
|
||||
int>(
|
||||
itemBuilder: (context) {
|
||||
return List.generate(interactionReponseList.length, (index) {
|
||||
var provider =
|
||||
Provider.of<InteractionProvider>(context, listen: false);
|
||||
|
||||
var item = provider.interactionReponseList[index];
|
||||
|
||||
return PopupMenuItem(
|
||||
value: index,
|
||||
child: item.multiple
|
||||
? GestureDetector(
|
||||
onTap: () {
|
||||
print("Clicked Section ${item.sectionName}");
|
||||
// provider.getSectionItem(
|
||||
// item.sectionName,
|
||||
// );
|
||||
setState(() {
|
||||
provider.getSectionItem(
|
||||
item.sectionName,
|
||||
);
|
||||
});
|
||||
|
||||
const DecoratedBox(
|
||||
decoration: BoxDecoration(
|
||||
// border: Border.all(color: Colors.black),
|
||||
// borderRadius: BorderRadius.circular(10.0),
|
||||
border: Border(
|
||||
bottom: BorderSide(width: 1.5, color: Colors.black),
|
||||
//top: BorderSide(width: 1.5, color: Colors.black),
|
||||
),
|
||||
),
|
||||
);
|
||||
},
|
||||
child: Text(' ${item.sectionName}'))
|
||||
: Container(),
|
||||
);
|
||||
});
|
||||
},
|
||||
// itemBuilder: (context) => [
|
||||
|
||||
// const PopupMenuItem(
|
||||
// value: 1,
|
||||
// child: Text(
|
||||
// "Flutter Open",
|
||||
// style:
|
||||
// TextStyle(color: Colors.black, fontWeight: FontWeight.w700),
|
||||
// ),
|
||||
// ),
|
||||
// const PopupMenuItem(
|
||||
// value: 2,
|
||||
// child: Text(
|
||||
// "Flutter Tutorial",
|
||||
// style:
|
||||
// TextStyle(color: Colors.black, fontWeight: FontWeight.w700),
|
||||
// ),
|
||||
// ),
|
||||
// ],
|
||||
icon: Container(
|
||||
height: double.infinity,
|
||||
width: double.infinity,
|
||||
decoration: const ShapeDecoration(
|
||||
color: Color.fromARGB(255, 8, 39, 92),
|
||||
shape: StadiumBorder(
|
||||
side: BorderSide(color: Colors.white, width: 2),
|
||||
),
|
||||
),
|
||||
child: Icon(Icons.add, color: Colors.white),
|
||||
));
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -1148,6 +1148,7 @@ class InteractionProvider extends ChangeNotifier {
|
|||
.where((element) => element.pid == obj.sectionList[i].value)
|
||||
.toList();
|
||||
|
||||
// sectionItem.selectedObject = list[0];
|
||||
sectionItem.selectedObject = list[0];
|
||||
} else {
|
||||
// InputClass obj = InputClass(
|
||||
|
@ -1382,6 +1383,7 @@ class InteractionProvider extends ChangeNotifier {
|
|||
inputList: e.inputList,
|
||||
isRequired: e.isRequired,
|
||||
name: e.name,
|
||||
validation: e.validation,
|
||||
param: e.param,
|
||||
selectedValue: [],
|
||||
widget: e.widget,
|
||||
|
@ -1392,13 +1394,14 @@ class InteractionProvider extends ChangeNotifier {
|
|||
value: e.value))
|
||||
.toList();
|
||||
SectionList delItem = SectionList(
|
||||
name: "delete",
|
||||
name: " ",
|
||||
param: "deletebtn",
|
||||
id: "deletebtn",
|
||||
selectedValue: [],
|
||||
depid: "",
|
||||
widget: InteractionWidget.BUTTON,
|
||||
inputList: [],
|
||||
validation: Validation(isRequired: false),
|
||||
isRequired: true);
|
||||
|
||||
addList.add(delItem);
|
||||
|
@ -1502,9 +1505,11 @@ class InteractionProvider extends ChangeNotifier {
|
|||
: e.multipleList!
|
||||
.map((mobj) => SectionList(
|
||||
depid: mobj.depid,
|
||||
validation:
|
||||
Validation(isRequired: mobj.validation!.isRequired),
|
||||
id: mobj.id,
|
||||
inputList: mobj.inputList,
|
||||
isRequired: mobj.isRequired,
|
||||
isRequired: mobj.validation!.isRequired,
|
||||
name: mobj.name,
|
||||
param: mobj.param,
|
||||
selectedValue: mobj.selectedValue,
|
||||
|
@ -1521,8 +1526,10 @@ class InteractionProvider extends ChangeNotifier {
|
|||
.map((obj) => SectionList(
|
||||
depid: obj.depid,
|
||||
id: obj.id,
|
||||
validation:
|
||||
Validation(isRequired: obj.validation!.isRequired),
|
||||
inputList: obj.inputList,
|
||||
isRequired: obj.isRequired,
|
||||
isRequired: obj.validation!.isRequired,
|
||||
name: obj.name,
|
||||
param: obj.param,
|
||||
selectedValue: obj.selectedValue,
|
||||
|
@ -1675,30 +1682,32 @@ class InteractionProvider extends ChangeNotifier {
|
|||
print("Section_isssss: $section");
|
||||
print("Section_isssss: ${section.widget}");
|
||||
print("Section_isssss: ${section.selectedId}");
|
||||
print("Section_isssss1111: ${section.isRequired},${section.name}");
|
||||
|
||||
if (section.widget == InteractionWidget.TEXT) {
|
||||
if (section.controller!.text.isEmpty) {
|
||||
// if (section.controller!.text.isEmpty) {
|
||||
if (section.isRequired == true && section.controller!.text.isEmpty) {
|
||||
debugPrint("Iam text and empty");
|
||||
notifyListeners();
|
||||
|
||||
return false;
|
||||
}
|
||||
} else if (section.widget == InteractionWidget.AUTOCOMPLETE) {
|
||||
if (section.selectedValue!.isEmpty) {
|
||||
if (section.isRequired == true && section.selectedValue!.isEmpty) {
|
||||
debugPrint("Iam AUTOCOMPLETE and empty");
|
||||
notifyListeners();
|
||||
|
||||
return false;
|
||||
}
|
||||
} else if (section.widget == InteractionWidget.DROPDOWN) {
|
||||
if (section.selectedValue!.isEmpty) {
|
||||
if (section.isRequired == true && section.selectedValue!.isEmpty) {
|
||||
debugPrint("Iam dropdown and empty");
|
||||
notifyListeners();
|
||||
|
||||
return false;
|
||||
}
|
||||
} else if (section.widget == InteractionWidget.CHECKBOX) {
|
||||
if (section.selectedValue!.isEmpty) {
|
||||
if (section.isRequired == true && section.selectedValue!.isEmpty) {
|
||||
debugPrint("Iam CHECKBOX and empty");
|
||||
notifyListeners();
|
||||
|
||||
|
@ -1712,35 +1721,36 @@ class InteractionProvider extends ChangeNotifier {
|
|||
|
||||
print("Multilist Enterwidget: ${msection.widget}");
|
||||
|
||||
if (msection.widget == InteractionWidget.TEXT) {
|
||||
if (msection.isRequired == true &&
|
||||
msection.widget == InteractionWidget.TEXT) {
|
||||
print("Checkinggg: ${msection.id}");
|
||||
print("Checkinggg: ${msection.depid}");
|
||||
print("Checkinggg: ${msection.chars}");
|
||||
print("Checkinggg: ${msection.selectedId}");
|
||||
print("Checkinggg: ${msection.selectedValue!}");
|
||||
|
||||
if (msection.selectedValue!.isEmpty) {
|
||||
if (msection.isRequired == true && msection.selectedValue!.isEmpty) {
|
||||
debugPrint("Iam multi text and empty");
|
||||
notifyListeners();
|
||||
|
||||
return false;
|
||||
}
|
||||
} else if (msection.widget == InteractionWidget.AUTOCOMPLETE) {
|
||||
if (msection.selectedValue!.isEmpty) {
|
||||
if (msection.isRequired == true && msection.selectedValue!.isEmpty) {
|
||||
debugPrint("Iam AUTOCOMPLETE and empty");
|
||||
notifyListeners();
|
||||
|
||||
return false;
|
||||
}
|
||||
} else if (msection.widget == InteractionWidget.DROPDOWN) {
|
||||
if (msection.selectedValue!.isEmpty) {
|
||||
debugPrint("Iam dropdown and empty");
|
||||
if (msection.isRequired == true && msection.selectedValue!.isEmpty) {
|
||||
debugPrint("Iam dropdown and empty ${msection.widget}");
|
||||
notifyListeners();
|
||||
|
||||
return false;
|
||||
}
|
||||
} else if (msection.widget == InteractionWidget.CHECKBOX) {
|
||||
if (msection.selectedValue!.isEmpty) {
|
||||
if (msection.isRequired == true && msection.selectedValue!.isEmpty) {
|
||||
debugPrint("Iam CHECKBOX and empty");
|
||||
notifyListeners();
|
||||
|
||||
|
|
|
@ -126,7 +126,7 @@ class SectionList {
|
|||
@HiveField(8)
|
||||
List<InputClass>? inputList;
|
||||
@HiveField(9)
|
||||
bool? isRequired;
|
||||
bool isRequired;
|
||||
|
||||
TextEditingController? controller;
|
||||
@HiveField(10)
|
||||
|
@ -160,7 +160,7 @@ class SectionList {
|
|||
this.input,
|
||||
this.gid,
|
||||
this.inputList,
|
||||
this.isRequired,
|
||||
this.isRequired = false,
|
||||
this.controller,
|
||||
this.selectedObject,
|
||||
this.selectedId,
|
||||
|
|
|
@ -109,7 +109,7 @@ class SectionListAdapter extends TypeAdapter<SectionList> {
|
|||
input: fields[7] as String?,
|
||||
gid: fields[3] as int?,
|
||||
inputList: (fields[8] as List?)?.cast<InputClass>(),
|
||||
isRequired: fields[9] as bool?,
|
||||
isRequired: fields[9] as bool,
|
||||
selectedObject: fields[12] as InputClass?,
|
||||
selectedId: fields[11] as String?,
|
||||
validation: fields[13] as Validation?,
|
||||
|
|
|
@ -501,19 +501,21 @@ class _ViewInteractionScreenState extends State<ViewInteractionScreen> {
|
|||
print("ConvertedArrayEdit.leangth: $convertedArray");
|
||||
print("ConvertedArray.leangth2323: ${convertedArray.length}");
|
||||
|
||||
return DecoratedBox(
|
||||
decoration: BoxDecoration(
|
||||
border: Border.all(color: Colors.black),
|
||||
borderRadius: BorderRadius.circular(10),
|
||||
),
|
||||
child: Padding(
|
||||
return Padding(
|
||||
padding: isTablet
|
||||
? const EdgeInsets.only(left: 14.0)
|
||||
? const EdgeInsets.only(left: 0.0, right: 0.0)
|
||||
: const EdgeInsets.only(left: 12.0, right: 12.0),
|
||||
child: Column(
|
||||
children: [
|
||||
for (var i = 0; i < convertedArray.length; i++)
|
||||
GridView.builder(
|
||||
DecoratedBox(
|
||||
decoration: BoxDecoration(
|
||||
// borderRadius: BorderRadius.circular(10.0),
|
||||
color: i % 2 == 0
|
||||
? Color.fromARGB(133, 213, 241, 254)
|
||||
: Colors.white,
|
||||
),
|
||||
child: GridView.builder(
|
||||
physics: const NeverScrollableScrollPhysics(),
|
||||
gridDelegate: SliverGridDelegateWithFixedCrossAxisCount(
|
||||
crossAxisCount: context.responsive<int>(
|
||||
|
@ -617,10 +619,10 @@ class _ViewInteractionScreenState extends State<ViewInteractionScreen> {
|
|||
);
|
||||
},
|
||||
),
|
||||
),
|
||||
//),
|
||||
],
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
|
|
|
@ -597,6 +597,7 @@ class ViewInteractionProvider extends ChangeNotifier {
|
|||
inputList: e.inputList,
|
||||
isRequired: e.isRequired,
|
||||
name: e.name,
|
||||
validation: e.validation,
|
||||
param: e.param,
|
||||
selectedValue: [],
|
||||
widget: e.widget,
|
||||
|
@ -607,13 +608,14 @@ class ViewInteractionProvider extends ChangeNotifier {
|
|||
value: e.value))
|
||||
.toList();
|
||||
SectionList delItem = SectionList(
|
||||
name: "delete",
|
||||
name: " ",
|
||||
param: "deletebtn",
|
||||
id: "deletebtn",
|
||||
selectedValue: [],
|
||||
depid: "",
|
||||
widget: InteractionWidget.BUTTON,
|
||||
inputList: [],
|
||||
validation: Validation(isRequired: false),
|
||||
isRequired: true);
|
||||
|
||||
addList.add(delItem);
|
||||
|
@ -775,6 +777,7 @@ class ViewInteractionProvider extends ChangeNotifier {
|
|||
depid: mobj.depid,
|
||||
id: mobj.id,
|
||||
inputList: mobj.inputList,
|
||||
validation: mobj.validation,
|
||||
isRequired: mobj.isRequired,
|
||||
extension: mobj.extension,
|
||||
fileName: mobj.fileName,
|
||||
|
@ -793,9 +796,10 @@ class ViewInteractionProvider extends ChangeNotifier {
|
|||
depid: obj.depid,
|
||||
id: obj.id,
|
||||
inputList: obj.inputList,
|
||||
validation: obj.validation,
|
||||
isRequired: obj.isRequired,
|
||||
extension: obj.extension,
|
||||
fileName: obj.fileName,
|
||||
isRequired: obj.isRequired,
|
||||
name: obj.name,
|
||||
param: obj.param,
|
||||
selectedValue: obj.tempselectedValue ?? obj.selectedValue,
|
||||
|
@ -930,28 +934,28 @@ class ViewInteractionProvider extends ChangeNotifier {
|
|||
print("Section_isssss: ${section.selectedId}");
|
||||
|
||||
if (section.widget == InteractionWidget.TEXT) {
|
||||
if (section.controller!.text.isEmpty) {
|
||||
if (section.isRequired == true && section.controller!.text.isEmpty) {
|
||||
debugPrint("Iam text and empty");
|
||||
notifyListeners();
|
||||
|
||||
return false;
|
||||
}
|
||||
} else if (section.widget == InteractionWidget.AUTOCOMPLETE) {
|
||||
if (section.selectedValue!.isEmpty) {
|
||||
if (section.isRequired == true && section.selectedValue!.isEmpty) {
|
||||
debugPrint("Iam AUTOCOMPLETE and empty");
|
||||
notifyListeners();
|
||||
|
||||
return false;
|
||||
}
|
||||
} else if (section.widget == InteractionWidget.DROPDOWN) {
|
||||
if (section.selectedValue!.isEmpty) {
|
||||
if (section.isRequired == true && section.selectedValue!.isEmpty) {
|
||||
debugPrint("Iam dropdown and empty");
|
||||
notifyListeners();
|
||||
|
||||
return false;
|
||||
}
|
||||
} else if (section.widget == InteractionWidget.CHECKBOX) {
|
||||
if (section.selectedValue!.isEmpty) {
|
||||
if (section.isRequired == true && section.selectedValue!.isEmpty) {
|
||||
debugPrint("Iam CHECKBOX and empty");
|
||||
notifyListeners();
|
||||
|
||||
|
@ -972,28 +976,28 @@ class ViewInteractionProvider extends ChangeNotifier {
|
|||
print("Checkinggg: ${msection.selectedId}");
|
||||
print("Checkinggg: ${msection.selectedValue!}");
|
||||
|
||||
if (msection.selectedValue!.isEmpty) {
|
||||
if (msection.isRequired == true && msection.selectedValue!.isEmpty) {
|
||||
debugPrint("Iam multi text and empty");
|
||||
notifyListeners();
|
||||
|
||||
return false;
|
||||
}
|
||||
} else if (msection.widget == InteractionWidget.AUTOCOMPLETE) {
|
||||
if (msection.selectedValue!.isEmpty) {
|
||||
if (msection.isRequired == true && msection.selectedValue!.isEmpty) {
|
||||
debugPrint("Iam AUTOCOMPLETE and empty");
|
||||
notifyListeners();
|
||||
|
||||
return false;
|
||||
}
|
||||
} else if (msection.widget == InteractionWidget.DROPDOWN) {
|
||||
if (msection.selectedValue!.isEmpty) {
|
||||
if (msection.isRequired == true && msection.selectedValue!.isEmpty) {
|
||||
debugPrint("Iam dropdown and empty");
|
||||
notifyListeners();
|
||||
|
||||
return false;
|
||||
}
|
||||
} else if (msection.widget == InteractionWidget.CHECKBOX) {
|
||||
if (msection.selectedValue!.isEmpty) {
|
||||
if (msection.isRequired == true && msection.selectedValue!.isEmpty) {
|
||||
debugPrint("Iam CHECKBOX and empty");
|
||||
notifyListeners();
|
||||
|
||||
|
|
|
@ -776,6 +776,14 @@ packages:
|
|||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "1.5.1"
|
||||
popover:
|
||||
dependency: "direct main"
|
||||
description:
|
||||
name: popover
|
||||
sha256: "5cba40e04115cbbf15c35e00767b91e8bf3f769763a34beb2f8a1b9e8b5fc876"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "0.3.0+1"
|
||||
provider:
|
||||
dependency: "direct main"
|
||||
description:
|
||||
|
|
|
@ -58,6 +58,7 @@ dependencies:
|
|||
rfw: ^1.0.26
|
||||
hive_generator: ^2.0.1
|
||||
responsive_grid: ^2.4.4
|
||||
popover: ^0.3.0+1
|
||||
|
||||
|
||||
dev_dependencies:
|
||||
|
|
Loading…
Reference in New Issue