aug13
This commit is contained in:
parent
3771a44e0e
commit
273989f8b2
|
@ -0,0 +1,202 @@
|
||||||
|
|
||||||
|
Apache License
|
||||||
|
Version 2.0, January 2004
|
||||||
|
http://www.apache.org/licenses/
|
||||||
|
|
||||||
|
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
||||||
|
|
||||||
|
1. Definitions.
|
||||||
|
|
||||||
|
"License" shall mean the terms and conditions for use, reproduction,
|
||||||
|
and distribution as defined by Sections 1 through 9 of this document.
|
||||||
|
|
||||||
|
"Licensor" shall mean the copyright owner or entity authorized by
|
||||||
|
the copyright owner that is granting the License.
|
||||||
|
|
||||||
|
"Legal Entity" shall mean the union of the acting entity and all
|
||||||
|
other entities that control, are controlled by, or are under common
|
||||||
|
control with that entity. For the purposes of this definition,
|
||||||
|
"control" means (i) the power, direct or indirect, to cause the
|
||||||
|
direction or management of such entity, whether by contract or
|
||||||
|
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
||||||
|
outstanding shares, or (iii) beneficial ownership of such entity.
|
||||||
|
|
||||||
|
"You" (or "Your") shall mean an individual or Legal Entity
|
||||||
|
exercising permissions granted by this License.
|
||||||
|
|
||||||
|
"Source" form shall mean the preferred form for making modifications,
|
||||||
|
including but not limited to software source code, documentation
|
||||||
|
source, and configuration files.
|
||||||
|
|
||||||
|
"Object" form shall mean any form resulting from mechanical
|
||||||
|
transformation or translation of a Source form, including but
|
||||||
|
not limited to compiled object code, generated documentation,
|
||||||
|
and conversions to other media types.
|
||||||
|
|
||||||
|
"Work" shall mean the work of authorship, whether in Source or
|
||||||
|
Object form, made available under the License, as indicated by a
|
||||||
|
copyright notice that is included in or attached to the work
|
||||||
|
(an example is provided in the Appendix below).
|
||||||
|
|
||||||
|
"Derivative Works" shall mean any work, whether in Source or Object
|
||||||
|
form, that is based on (or derived from) the Work and for which the
|
||||||
|
editorial revisions, annotations, elaborations, or other modifications
|
||||||
|
represent, as a whole, an original work of authorship. For the purposes
|
||||||
|
of this License, Derivative Works shall not include works that remain
|
||||||
|
separable from, or merely link (or bind by name) to the interfaces of,
|
||||||
|
the Work and Derivative Works thereof.
|
||||||
|
|
||||||
|
"Contribution" shall mean any work of authorship, including
|
||||||
|
the original version of the Work and any modifications or additions
|
||||||
|
to that Work or Derivative Works thereof, that is intentionally
|
||||||
|
submitted to Licensor for inclusion in the Work by the copyright owner
|
||||||
|
or by an individual or Legal Entity authorized to submit on behalf of
|
||||||
|
the copyright owner. For the purposes of this definition, "submitted"
|
||||||
|
means any form of electronic, verbal, or written communication sent
|
||||||
|
to the Licensor or its representatives, including but not limited to
|
||||||
|
communication on electronic mailing lists, source code control systems,
|
||||||
|
and issue tracking systems that are managed by, or on behalf of, the
|
||||||
|
Licensor for the purpose of discussing and improving the Work, but
|
||||||
|
excluding communication that is conspicuously marked or otherwise
|
||||||
|
designated in writing by the copyright owner as "Not a Contribution."
|
||||||
|
|
||||||
|
"Contributor" shall mean Licensor and any individual or Legal Entity
|
||||||
|
on behalf of whom a Contribution has been received by Licensor and
|
||||||
|
subsequently incorporated within the Work.
|
||||||
|
|
||||||
|
2. Grant of Copyright License. Subject to the terms and conditions of
|
||||||
|
this License, each Contributor hereby grants to You a perpetual,
|
||||||
|
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||||
|
copyright license to reproduce, prepare Derivative Works of,
|
||||||
|
publicly display, publicly perform, sublicense, and distribute the
|
||||||
|
Work and such Derivative Works in Source or Object form.
|
||||||
|
|
||||||
|
3. Grant of Patent License. Subject to the terms and conditions of
|
||||||
|
this License, each Contributor hereby grants to You a perpetual,
|
||||||
|
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||||
|
(except as stated in this section) patent license to make, have made,
|
||||||
|
use, offer to sell, sell, import, and otherwise transfer the Work,
|
||||||
|
where such license applies only to those patent claims licensable
|
||||||
|
by such Contributor that are necessarily infringed by their
|
||||||
|
Contribution(s) alone or by combination of their Contribution(s)
|
||||||
|
with the Work to which such Contribution(s) was submitted. If You
|
||||||
|
institute patent litigation against any entity (including a
|
||||||
|
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
||||||
|
or a Contribution incorporated within the Work constitutes direct
|
||||||
|
or contributory patent infringement, then any patent licenses
|
||||||
|
granted to You under this License for that Work shall terminate
|
||||||
|
as of the date such litigation is filed.
|
||||||
|
|
||||||
|
4. Redistribution. You may reproduce and distribute copies of the
|
||||||
|
Work or Derivative Works thereof in any medium, with or without
|
||||||
|
modifications, and in Source or Object form, provided that You
|
||||||
|
meet the following conditions:
|
||||||
|
|
||||||
|
(a) You must give any other recipients of the Work or
|
||||||
|
Derivative Works a copy of this License; and
|
||||||
|
|
||||||
|
(b) You must cause any modified files to carry prominent notices
|
||||||
|
stating that You changed the files; and
|
||||||
|
|
||||||
|
(c) You must retain, in the Source form of any Derivative Works
|
||||||
|
that You distribute, all copyright, patent, trademark, and
|
||||||
|
attribution notices from the Source form of the Work,
|
||||||
|
excluding those notices that do not pertain to any part of
|
||||||
|
the Derivative Works; and
|
||||||
|
|
||||||
|
(d) If the Work includes a "NOTICE" text file as part of its
|
||||||
|
distribution, then any Derivative Works that You distribute must
|
||||||
|
include a readable copy of the attribution notices contained
|
||||||
|
within such NOTICE file, excluding those notices that do not
|
||||||
|
pertain to any part of the Derivative Works, in at least one
|
||||||
|
of the following places: within a NOTICE text file distributed
|
||||||
|
as part of the Derivative Works; within the Source form or
|
||||||
|
documentation, if provided along with the Derivative Works; or,
|
||||||
|
within a display generated by the Derivative Works, if and
|
||||||
|
wherever such third-party notices normally appear. The contents
|
||||||
|
of the NOTICE file are for informational purposes only and
|
||||||
|
do not modify the License. You may add Your own attribution
|
||||||
|
notices within Derivative Works that You distribute, alongside
|
||||||
|
or as an addendum to the NOTICE text from the Work, provided
|
||||||
|
that such additional attribution notices cannot be construed
|
||||||
|
as modifying the License.
|
||||||
|
|
||||||
|
You may add Your own copyright statement to Your modifications and
|
||||||
|
may provide additional or different license terms and conditions
|
||||||
|
for use, reproduction, or distribution of Your modifications, or
|
||||||
|
for any such Derivative Works as a whole, provided Your use,
|
||||||
|
reproduction, and distribution of the Work otherwise complies with
|
||||||
|
the conditions stated in this License.
|
||||||
|
|
||||||
|
5. Submission of Contributions. Unless You explicitly state otherwise,
|
||||||
|
any Contribution intentionally submitted for inclusion in the Work
|
||||||
|
by You to the Licensor shall be under the terms and conditions of
|
||||||
|
this License, without any additional terms or conditions.
|
||||||
|
Notwithstanding the above, nothing herein shall supersede or modify
|
||||||
|
the terms of any separate license agreement you may have executed
|
||||||
|
with Licensor regarding such Contributions.
|
||||||
|
|
||||||
|
6. Trademarks. This License does not grant permission to use the trade
|
||||||
|
names, trademarks, service marks, or product names of the Licensor,
|
||||||
|
except as required for reasonable and customary use in describing the
|
||||||
|
origin of the Work and reproducing the content of the NOTICE file.
|
||||||
|
|
||||||
|
7. Disclaimer of Warranty. Unless required by applicable law or
|
||||||
|
agreed to in writing, Licensor provides the Work (and each
|
||||||
|
Contributor provides its Contributions) on an "AS IS" BASIS,
|
||||||
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
||||||
|
implied, including, without limitation, any warranties or conditions
|
||||||
|
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
||||||
|
PARTICULAR PURPOSE. You are solely responsible for determining the
|
||||||
|
appropriateness of using or redistributing the Work and assume any
|
||||||
|
risks associated with Your exercise of permissions under this License.
|
||||||
|
|
||||||
|
8. Limitation of Liability. In no event and under no legal theory,
|
||||||
|
whether in tort (including negligence), contract, or otherwise,
|
||||||
|
unless required by applicable law (such as deliberate and grossly
|
||||||
|
negligent acts) or agreed to in writing, shall any Contributor be
|
||||||
|
liable to You for damages, including any direct, indirect, special,
|
||||||
|
incidental, or consequential damages of any character arising as a
|
||||||
|
result of this License or out of the use or inability to use the
|
||||||
|
Work (including but not limited to damages for loss of goodwill,
|
||||||
|
work stoppage, computer failure or malfunction, or any and all
|
||||||
|
other commercial damages or losses), even if such Contributor
|
||||||
|
has been advised of the possibility of such damages.
|
||||||
|
|
||||||
|
9. Accepting Warranty or Additional Liability. While redistributing
|
||||||
|
the Work or Derivative Works thereof, You may choose to offer,
|
||||||
|
and charge a fee for, acceptance of support, warranty, indemnity,
|
||||||
|
or other liability obligations and/or rights consistent with this
|
||||||
|
License. However, in accepting such obligations, You may act only
|
||||||
|
on Your own behalf and on Your sole responsibility, not on behalf
|
||||||
|
of any other Contributor, and only if You agree to indemnify,
|
||||||
|
defend, and hold each Contributor harmless for any liability
|
||||||
|
incurred by, or claims asserted against, such Contributor by reason
|
||||||
|
of your accepting any such warranty or additional liability.
|
||||||
|
|
||||||
|
END OF TERMS AND CONDITIONS
|
||||||
|
|
||||||
|
APPENDIX: How to apply the Apache License to your work.
|
||||||
|
|
||||||
|
To apply the Apache License to your work, attach the following
|
||||||
|
boilerplate notice, with the fields enclosed by brackets "[]"
|
||||||
|
replaced with your own identifying information. (Don't include
|
||||||
|
the brackets!) The text should be enclosed in the appropriate
|
||||||
|
comment syntax for the file format. We also recommend that a
|
||||||
|
file or class name and description of purpose be included on the
|
||||||
|
same "printed page" as the copyright notice for easier
|
||||||
|
identification within third-party archives.
|
||||||
|
|
||||||
|
Copyright [yyyy] [name of copyright owner]
|
||||||
|
|
||||||
|
Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
you may not use this file except in compliance with the License.
|
||||||
|
You may obtain a copy of the License at
|
||||||
|
|
||||||
|
http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
|
||||||
|
Unless required by applicable law or agreed to in writing, software
|
||||||
|
distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
See the License for the specific language governing permissions and
|
||||||
|
limitations under the License.
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
@ -1,10 +1,19 @@
|
||||||
import 'dart:ui';
|
import 'dart:ui';
|
||||||
|
|
||||||
class Constants {
|
import 'package:flutter/material.dart';
|
||||||
static Color k2color = Color.fromARGB(255, 0, 71, 132);
|
|
||||||
|
|
||||||
//static const url = "http://192.168.172.50:8082/api";
|
class Constants {
|
||||||
static const url = 'http://192.168.2.143:8085/api';
|
//static Color k2color = Color.fromARGB(255, 0, 71, 132);
|
||||||
|
static Color k2color = Colors.white;
|
||||||
|
static Color k2color1 = Color.fromARGB(255, 0, 71, 132);
|
||||||
|
|
||||||
|
static Color cardtext = Color.fromARGB(255, 247, 247, 250);
|
||||||
|
static Color cardtextdark = const Color.fromARGB(255, 156, 154, 154);
|
||||||
|
static const Color bgcolor = Color(0xFFF2F3F8);
|
||||||
|
static Color bgcolor2 = const Color.fromARGB(255, 0, 112, 184);
|
||||||
|
|
||||||
|
// static const url = "http://192.168.21.50:8081/api";
|
||||||
|
static const url = 'http://192.168.2.143:8082/api';
|
||||||
//static const url = 'http://192.168.153.50:8082/api';
|
//static const url = 'http://192.168.153.50:8082/api';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,9 +1,11 @@
|
||||||
import 'package:discover_module/provider_class/affiliationsprovider.dart';
|
import 'package:discover_module/provider_class/affiliationsprovider.dart';
|
||||||
|
import 'package:discover_module/provider_class/engagement_provider.dart';
|
||||||
import 'package:discover_module/provider_class/events_provider.dart';
|
import 'package:discover_module/provider_class/events_provider.dart';
|
||||||
import 'package:discover_module/provider_class/hcp%20_provider.dart';
|
import 'package:discover_module/provider_class/hcp%20_provider.dart';
|
||||||
import 'package:discover_module/provider_class/medicalinsightprovider.dart';
|
import 'package:discover_module/provider_class/medicalinsightprovider.dart';
|
||||||
import 'package:discover_module/provider_class/publications_provider.dart';
|
import 'package:discover_module/provider_class/publications_provider.dart';
|
||||||
import 'package:discover_module/provider_class/single_hcpprovider.dart';
|
import 'package:discover_module/provider_class/single_hcpprovider.dart';
|
||||||
|
import 'package:discover_module/provider_class/speaker_provider.dart';
|
||||||
import 'package:discover_module/provider_class/trials_provider.dart';
|
import 'package:discover_module/provider_class/trials_provider.dart';
|
||||||
import 'package:discover_module/ui_screen/contacts.dart';
|
import 'package:discover_module/ui_screen/contacts.dart';
|
||||||
import 'package:discover_module/ui_screen/discover.dart';
|
import 'package:discover_module/ui_screen/discover.dart';
|
||||||
|
@ -73,6 +75,9 @@ Future<void> main() async {
|
||||||
ChangeNotifierProvider(create: (_) => EventProvider()),
|
ChangeNotifierProvider(create: (_) => EventProvider()),
|
||||||
ChangeNotifierProvider(create: (_) => TrialsProvider()),
|
ChangeNotifierProvider(create: (_) => TrialsProvider()),
|
||||||
ChangeNotifierProvider(create: (_) => MediacalInsightProvider()),
|
ChangeNotifierProvider(create: (_) => MediacalInsightProvider()),
|
||||||
|
ChangeNotifierProvider(create: (_) => SpekerEvalutionProvider()),
|
||||||
|
ChangeNotifierProvider(create: (_) => EnagagementProvider()),
|
||||||
|
|
||||||
//ChangeNotifierProvider(create: (_) => ConfigDataProvider()),
|
//ChangeNotifierProvider(create: (_) => ConfigDataProvider()),
|
||||||
ChangeNotifierProvider<HiveDataRepository>(
|
ChangeNotifierProvider<HiveDataRepository>(
|
||||||
create: (_) => HiveDataRepository(
|
create: (_) => HiveDataRepository(
|
||||||
|
@ -98,8 +103,15 @@ class _MyAppState extends State<MyApp> {
|
||||||
return MaterialApp(
|
return MaterialApp(
|
||||||
debugShowCheckedModeBanner: false,
|
debugShowCheckedModeBanner: false,
|
||||||
title: 'Flutter Demo',
|
title: 'Flutter Demo',
|
||||||
|
// theme: ThemeData(
|
||||||
|
// fontFamily: 'SourceSerif',
|
||||||
|
// appBarTheme: const AppBarTheme(
|
||||||
|
// backgroundColor: Color.fromARGB(255, 0, 71, 132),
|
||||||
|
// foregroundColor: Colors.white //here you can give the text color
|
||||||
|
// )),
|
||||||
|
|
||||||
theme: ThemeData(
|
theme: ThemeData(
|
||||||
fontFamily: 'SourceSerif',
|
fontFamily: 'OpenSans',
|
||||||
appBarTheme: const AppBarTheme(
|
appBarTheme: const AppBarTheme(
|
||||||
backgroundColor: Color.fromARGB(255, 0, 71, 132),
|
backgroundColor: Color.fromARGB(255, 0, 71, 132),
|
||||||
foregroundColor: Colors.white //here you can give the text color
|
foregroundColor: Colors.white //here you can give the text color
|
||||||
|
@ -199,9 +211,6 @@ class _MyHomePageState extends State<MyHomePage> {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// import 'package:flutter/material.dart';
|
// import 'package:flutter/material.dart';
|
||||||
|
|
||||||
// class MyGridView extends StatefulWidget {
|
// class MyGridView extends StatefulWidget {
|
||||||
|
@ -257,3 +266,50 @@ class _MyHomePageState extends State<MyHomePage> {
|
||||||
// home: MyGridView(),
|
// home: MyGridView(),
|
||||||
// ));
|
// ));
|
||||||
// }
|
// }
|
||||||
|
|
||||||
|
// import 'package:flutter/material.dart';
|
||||||
|
|
||||||
|
// void main() {
|
||||||
|
// runApp(MyApp());
|
||||||
|
// }
|
||||||
|
|
||||||
|
// class MyApp extends StatelessWidget {
|
||||||
|
// @override
|
||||||
|
// Widget build(BuildContext context) {
|
||||||
|
// return MaterialApp(
|
||||||
|
// home: Scaffold(
|
||||||
|
// appBar: AppBar(title: Text('GridView Example')),
|
||||||
|
// body: Padding(
|
||||||
|
// padding: EdgeInsets.all(8.0),
|
||||||
|
// child: GridView.count(
|
||||||
|
// crossAxisCount: 2,
|
||||||
|
// crossAxisSpacing: 8.0,
|
||||||
|
// mainAxisSpacing: 8.0,
|
||||||
|
// shrinkWrap: true, // Make GridView as small as possible
|
||||||
|
// children: List.generate(10, (index) {
|
||||||
|
// return SizedBox(
|
||||||
|
// // height: 200, // Fixed height for each card
|
||||||
|
// child: Card(
|
||||||
|
// child: Center(
|
||||||
|
// child: Column(
|
||||||
|
// mainAxisAlignment: MainAxisAlignment.center,
|
||||||
|
// children: [
|
||||||
|
// Text('Item $index'),
|
||||||
|
// Text('Item $index'),
|
||||||
|
// Text('Item $index'),
|
||||||
|
// Text('Item $index'),
|
||||||
|
// Text('Item $index'),
|
||||||
|
// Text('Item $index'),
|
||||||
|
// Text('Item $index'),
|
||||||
|
// ],
|
||||||
|
// ),
|
||||||
|
// ),
|
||||||
|
// ),
|
||||||
|
// );
|
||||||
|
// }),
|
||||||
|
// ),
|
||||||
|
// ),
|
||||||
|
// ),
|
||||||
|
// );
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
|
|
@ -0,0 +1,56 @@
|
||||||
|
// To parse this JSON data, do
|
||||||
|
//
|
||||||
|
// final medicalInsight = medicalInsightFromJson(jsonString);
|
||||||
|
|
||||||
|
import 'dart:convert';
|
||||||
|
|
||||||
|
List<MedicalInsight> medicalInsightFromJson(String str) =>
|
||||||
|
List<MedicalInsight>.from(
|
||||||
|
json.decode(str).map((x) => MedicalInsight.fromJson(x)));
|
||||||
|
|
||||||
|
String medicalInsightToJson(List<MedicalInsight> data) =>
|
||||||
|
json.encode(List<dynamic>.from(data.map((x) => x.toJson())));
|
||||||
|
|
||||||
|
class MedicalInsight {
|
||||||
|
int id;
|
||||||
|
String programtopic;
|
||||||
|
String speakername;
|
||||||
|
String role;
|
||||||
|
String evaluatorname;
|
||||||
|
String programdate;
|
||||||
|
DateTime createdAt;
|
||||||
|
DateTime updatedAt;
|
||||||
|
|
||||||
|
MedicalInsight({
|
||||||
|
required this.id,
|
||||||
|
required this.programtopic,
|
||||||
|
required this.speakername,
|
||||||
|
required this.role,
|
||||||
|
required this.evaluatorname,
|
||||||
|
required this.programdate,
|
||||||
|
required this.createdAt,
|
||||||
|
required this.updatedAt,
|
||||||
|
});
|
||||||
|
|
||||||
|
factory MedicalInsight.fromJson(Map<String, dynamic> json) => MedicalInsight(
|
||||||
|
id: json["id"],
|
||||||
|
programtopic: json["programtopic"],
|
||||||
|
speakername: json["speakername"],
|
||||||
|
role: json["role"],
|
||||||
|
evaluatorname: json["evaluatorname"],
|
||||||
|
programdate: json["programdate"],
|
||||||
|
createdAt: DateTime.parse(json["created_at"]),
|
||||||
|
updatedAt: DateTime.parse(json["updated_at"]),
|
||||||
|
);
|
||||||
|
|
||||||
|
Map<String, dynamic> toJson() => {
|
||||||
|
"id": id,
|
||||||
|
"programtopic": programtopic,
|
||||||
|
"speakername": speakername,
|
||||||
|
"role": role,
|
||||||
|
"evaluatorname": evaluatorname,
|
||||||
|
"programdate": programdate,
|
||||||
|
"created_at": createdAt.toIso8601String(),
|
||||||
|
"updated_at": updatedAt.toIso8601String(),
|
||||||
|
};
|
||||||
|
}
|
|
@ -0,0 +1,79 @@
|
||||||
|
import 'package:discover_module/service.dart/service.dart';
|
||||||
|
import 'package:flutter/cupertino.dart';
|
||||||
|
|
||||||
|
class EnagagementProvider extends ChangeNotifier {
|
||||||
|
final callapi = Callapi();
|
||||||
|
|
||||||
|
List enagement = [];
|
||||||
|
List get engagementdata => enagement;
|
||||||
|
|
||||||
|
List enagementhcpname = [];
|
||||||
|
List get engagementhcppname => enagementhcpname;
|
||||||
|
|
||||||
|
List enagementhcpmain = [];
|
||||||
|
List get enagementhcppmain => enagementhcpmain;
|
||||||
|
|
||||||
|
List enagementhcprel = [];
|
||||||
|
List get enagementhcpprel => enagementhcprel;
|
||||||
|
|
||||||
|
List enagementhcplevel = [];
|
||||||
|
List get enagementhcpplevel => enagementhcplevel;
|
||||||
|
|
||||||
|
getengagementdata() async {
|
||||||
|
final engdata = await callapi.getEngdata();
|
||||||
|
enagement = engdata;
|
||||||
|
notifyListeners();
|
||||||
|
}
|
||||||
|
|
||||||
|
gethcpname() async {
|
||||||
|
if (enagementhcpname.isNotEmpty) {
|
||||||
|
enagementhcpname.clear();
|
||||||
|
}
|
||||||
|
|
||||||
|
for (var hname in engagementdata) {
|
||||||
|
enagementhcpname.add(hname['hcpname']);
|
||||||
|
|
||||||
|
//print("checkin_eng: ${hname['hcpname']}");
|
||||||
|
notifyListeners();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
getmaintherepeutic() async {
|
||||||
|
if (enagementhcpmain.isNotEmpty) {
|
||||||
|
enagementhcpmain.clear();
|
||||||
|
}
|
||||||
|
|
||||||
|
for (var hname in engagementdata) {
|
||||||
|
enagementhcpmain.add(hname['main thereutic area']);
|
||||||
|
|
||||||
|
//print("checkin_eng: ${hname['hcpname']}");
|
||||||
|
notifyListeners();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
getrelationship() async {
|
||||||
|
if (enagementhcprel.isNotEmpty) {
|
||||||
|
enagementhcprel.clear();
|
||||||
|
}
|
||||||
|
|
||||||
|
for (var hname in engagementdata) {
|
||||||
|
enagementhcprel.add(hname['relationship with chiesi']);
|
||||||
|
|
||||||
|
//print("checkin_eng: ${hname['hcpname']}");
|
||||||
|
notifyListeners();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
getrelationlevel() async {
|
||||||
|
if (enagementhcplevel.isNotEmpty) {
|
||||||
|
enagementhcplevel.clear();
|
||||||
|
}
|
||||||
|
|
||||||
|
for (var hname in engagementdata) {
|
||||||
|
enagementhcplevel.add(hname['level of engagement']);
|
||||||
|
|
||||||
|
//print("checkin_eng: ${hname['hcpname']}");
|
||||||
|
notifyListeners();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,17 @@
|
||||||
|
import 'package:discover_module/service.dart/service.dart';
|
||||||
|
import 'package:flutter/cupertino.dart';
|
||||||
|
|
||||||
|
class SpekerEvalutionProvider extends ChangeNotifier {
|
||||||
|
final callapi = Callapi();
|
||||||
|
|
||||||
|
List speaker_data = [];
|
||||||
|
|
||||||
|
List get speaker => speaker_data;
|
||||||
|
|
||||||
|
getspeakerdata() async {
|
||||||
|
final data = await callapi.getSpeakerdata();
|
||||||
|
|
||||||
|
speaker_data = data;
|
||||||
|
notifyListeners();
|
||||||
|
}
|
||||||
|
}
|
|
@ -166,4 +166,24 @@ class Callapi {
|
||||||
final jsonresponse = response.data;
|
final jsonresponse = response.data;
|
||||||
return jsonresponse;
|
return jsonresponse;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
getSpeakerdata() async {
|
||||||
|
const url = '$curl/speaker';
|
||||||
|
|
||||||
|
final response = await Dio().get(url);
|
||||||
|
|
||||||
|
final jsonresponse = response.data;
|
||||||
|
|
||||||
|
return jsonresponse;
|
||||||
|
}
|
||||||
|
|
||||||
|
getEngdata() async {
|
||||||
|
const url = '$curl/engagement';
|
||||||
|
|
||||||
|
final response = await Dio().get(url);
|
||||||
|
|
||||||
|
final jsonresponse = response.data;
|
||||||
|
|
||||||
|
return jsonresponse;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,461 @@
|
||||||
|
import 'package:discover_module/ui_screen/interactionform/configprovider.dart';
|
||||||
|
import 'package:discover_module/ui_screen/interactionform/interactionprovider.dart';
|
||||||
|
import 'package:discover_module/ui_screen/interactionform/view_forms_list.dart';
|
||||||
|
import 'package:flutter/cupertino.dart';
|
||||||
|
import 'package:flutter/material.dart';
|
||||||
|
import 'package:flutter/widgets.dart';
|
||||||
|
import 'package:provider/provider.dart';
|
||||||
|
|
||||||
|
class bsheet extends StatefulWidget {
|
||||||
|
const bsheet(this.publicationdata, {super.key});
|
||||||
|
final publicationdata;
|
||||||
|
|
||||||
|
@override
|
||||||
|
State<bsheet> createState() => _MyWidgetState();
|
||||||
|
}
|
||||||
|
|
||||||
|
class _MyWidgetState extends State<bsheet> {
|
||||||
|
String? field1, field2, field3, field4, field5, field6, field7;
|
||||||
|
String? subfield2, subfield3, subfield4, subfield5, subfield6, subfield7;
|
||||||
|
bool? f2, f3, f4, f5, f6, f7;
|
||||||
|
bool engbtn = false;
|
||||||
|
@override
|
||||||
|
void initState() {
|
||||||
|
// TODO: implement initState
|
||||||
|
super.initState();
|
||||||
|
print("data-isssbottomshett: ${widget.publicationdata}");
|
||||||
|
if (widget.publicationdata['artical_title'] != null) {
|
||||||
|
setState(() {
|
||||||
|
field1 = widget.publicationdata['artical_title'];
|
||||||
|
|
||||||
|
subfield2 = "Journal Name";
|
||||||
|
field2 = widget.publicationdata['journal_name'];
|
||||||
|
f2 = true;
|
||||||
|
|
||||||
|
subfield3 = "Date";
|
||||||
|
field3 = widget.publicationdata['date'];
|
||||||
|
f3 = true;
|
||||||
|
|
||||||
|
subfield4 = "Author";
|
||||||
|
field4 = widget.publicationdata['author'];
|
||||||
|
f4 = true;
|
||||||
|
|
||||||
|
subfield5 = "";
|
||||||
|
field5 = " ";
|
||||||
|
f5 = false;
|
||||||
|
|
||||||
|
subfield6 = "";
|
||||||
|
field6 = " ";
|
||||||
|
f6 = false;
|
||||||
|
|
||||||
|
subfield7 = "";
|
||||||
|
field7 = " ";
|
||||||
|
f7 = false;
|
||||||
|
});
|
||||||
|
|
||||||
|
//print("isssbottomshett123: ${widget.publicationdata['event_name']}");
|
||||||
|
} else if (widget.publicationdata['event_name'] != null) {
|
||||||
|
setState(() {
|
||||||
|
field1 = widget.publicationdata['event_name'];
|
||||||
|
|
||||||
|
subfield2 = "Session Type";
|
||||||
|
field2 = widget.publicationdata['session_type'];
|
||||||
|
f2 = true;
|
||||||
|
|
||||||
|
subfield3 = "Topic";
|
||||||
|
field3 = widget.publicationdata['topic'];
|
||||||
|
f3 = true;
|
||||||
|
|
||||||
|
subfield4 = "Role";
|
||||||
|
field4 = widget.publicationdata['role'];
|
||||||
|
f4 = true;
|
||||||
|
|
||||||
|
subfield5 = "";
|
||||||
|
field5 = " ";
|
||||||
|
f5 = false;
|
||||||
|
|
||||||
|
subfield6 = "";
|
||||||
|
field6 = " ";
|
||||||
|
f6 = false;
|
||||||
|
|
||||||
|
subfield7 = "";
|
||||||
|
field7 = " ";
|
||||||
|
f7 = false;
|
||||||
|
});
|
||||||
|
} else if (widget.publicationdata['trial_name'] != null) {
|
||||||
|
setState(() {
|
||||||
|
field1 = widget.publicationdata['trial_name'];
|
||||||
|
|
||||||
|
subfield2 = "Status";
|
||||||
|
field2 = widget.publicationdata['status'];
|
||||||
|
f2 = true;
|
||||||
|
|
||||||
|
subfield3 = "Sponsors";
|
||||||
|
field3 = widget.publicationdata['sponsors'];
|
||||||
|
f3 = true;
|
||||||
|
|
||||||
|
subfield4 = "Condtion";
|
||||||
|
field4 = widget.publicationdata['condition'];
|
||||||
|
f4 = true;
|
||||||
|
|
||||||
|
subfield5 = "Intervention";
|
||||||
|
field5 = widget.publicationdata['intervention'];
|
||||||
|
f5 = true;
|
||||||
|
|
||||||
|
subfield6 = "Phase";
|
||||||
|
field6 = widget.publicationdata['phase'];
|
||||||
|
f6 = true;
|
||||||
|
|
||||||
|
subfield7 = "";
|
||||||
|
field7 = " ";
|
||||||
|
f7 = false;
|
||||||
|
});
|
||||||
|
} else if (widget.publicationdata['programtopic'] != null) {
|
||||||
|
setState(() {
|
||||||
|
field1 = widget.publicationdata['programtopic'];
|
||||||
|
|
||||||
|
subfield2 = "Speaker Name";
|
||||||
|
field2 = widget.publicationdata['speakername'];
|
||||||
|
f2 = true;
|
||||||
|
|
||||||
|
subfield3 = "Role";
|
||||||
|
field3 = widget.publicationdata['role'];
|
||||||
|
f3 = true;
|
||||||
|
|
||||||
|
subfield4 = "Evalutor Name";
|
||||||
|
field4 = widget.publicationdata['evaluatorname'];
|
||||||
|
f4 = true;
|
||||||
|
|
||||||
|
subfield5 = "Date";
|
||||||
|
field5 = widget.publicationdata['programdate'];
|
||||||
|
f5 = true;
|
||||||
|
|
||||||
|
subfield6 = "";
|
||||||
|
field6 = "";
|
||||||
|
f6 = false;
|
||||||
|
|
||||||
|
subfield7 = "";
|
||||||
|
field7 = " ";
|
||||||
|
f7 = false;
|
||||||
|
});
|
||||||
|
} else if (widget.publicationdata['hcpname'] != null) {
|
||||||
|
setState(() {
|
||||||
|
field1 = widget.publicationdata['hcpname'];
|
||||||
|
|
||||||
|
subfield2 = "Main Therapeutic Area";
|
||||||
|
field2 = widget.publicationdata['main thereutic area'];
|
||||||
|
f2 = true;
|
||||||
|
|
||||||
|
subfield3 = "Relationship with Chiesi";
|
||||||
|
field3 = widget.publicationdata['relationship with chiesi'];
|
||||||
|
f3 = true;
|
||||||
|
|
||||||
|
subfield4 = "Level of Engagement";
|
||||||
|
field4 = widget.publicationdata['level of engagement'];
|
||||||
|
f4 = true;
|
||||||
|
|
||||||
|
subfield5 = "Date";
|
||||||
|
field5 = widget.publicationdata['date'];
|
||||||
|
f5 = true;
|
||||||
|
|
||||||
|
subfield6 = "Plan of Action";
|
||||||
|
field6 = widget.publicationdata['plan of action'];
|
||||||
|
f6 = true;
|
||||||
|
|
||||||
|
subfield7 = "Recorded By";
|
||||||
|
field7 = widget.publicationdata['recorded by'];
|
||||||
|
f7 = true;
|
||||||
|
|
||||||
|
engbtn = true;
|
||||||
|
});
|
||||||
|
}
|
||||||
|
// print("data-isssbottomshett: ${widget.publicationdata['artical_title']}");
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
return DraggableScrollableSheet(
|
||||||
|
expand: false,
|
||||||
|
// initialChildSize:
|
||||||
|
// 0.7,
|
||||||
|
// maxChildSize:
|
||||||
|
// 1,
|
||||||
|
// minChildSize:
|
||||||
|
// 0.5,
|
||||||
|
builder: (BuildContext context, ScrollController scrollController) {
|
||||||
|
return Container(
|
||||||
|
width: MediaQuery.of(context).size.width,
|
||||||
|
//color: Color.fromARGB(255, 246, 248, 252),
|
||||||
|
decoration: BoxDecoration(borderRadius: BorderRadius.circular(0)),
|
||||||
|
child: Column(
|
||||||
|
children: [
|
||||||
|
Expanded(
|
||||||
|
child: ListView.builder(
|
||||||
|
controller: scrollController,
|
||||||
|
itemCount: 1,
|
||||||
|
itemBuilder: (BuildContext context, int index) {
|
||||||
|
return Column(
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
|
mainAxisSize: MainAxisSize.min,
|
||||||
|
mainAxisAlignment: MainAxisAlignment.center,
|
||||||
|
children: [
|
||||||
|
SizedBox(
|
||||||
|
height: 18.0,
|
||||||
|
),
|
||||||
|
Row(
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
|
children: [
|
||||||
|
Expanded(
|
||||||
|
child: Padding(
|
||||||
|
padding: const EdgeInsets.only(left: 18.0),
|
||||||
|
child: Text(
|
||||||
|
field1!,
|
||||||
|
softWrap: true,
|
||||||
|
style: TextStyle(
|
||||||
|
fontSize: 16.0, color: Colors.black),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
)
|
||||||
|
],
|
||||||
|
),
|
||||||
|
SizedBox(
|
||||||
|
height: 0.0,
|
||||||
|
),
|
||||||
|
Visibility(
|
||||||
|
visible: engbtn,
|
||||||
|
child: Row(
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
|
children: [
|
||||||
|
Padding(
|
||||||
|
padding: const EdgeInsets.only(left: 18.0),
|
||||||
|
child: FittedBox(
|
||||||
|
fit: BoxFit.fill,
|
||||||
|
child: GestureDetector(
|
||||||
|
onTap: () async {
|
||||||
|
final ConfigDataProvider
|
||||||
|
configDataProvider =
|
||||||
|
ConfigDataProvider();
|
||||||
|
await configDataProvider
|
||||||
|
.initConfigUIDataEng();
|
||||||
|
|
||||||
|
final provider =
|
||||||
|
Provider.of<InteractionProvider>(
|
||||||
|
context,
|
||||||
|
listen: false);
|
||||||
|
|
||||||
|
if (getCount(
|
||||||
|
provider
|
||||||
|
.intConfigDataList[index]
|
||||||
|
.name,
|
||||||
|
provider) !=
|
||||||
|
0) {
|
||||||
|
provider.savedList
|
||||||
|
.where((element) =>
|
||||||
|
element.form ==
|
||||||
|
provider
|
||||||
|
.intConfigDataList[index]
|
||||||
|
.name)
|
||||||
|
.toList();
|
||||||
|
Navigator.push(
|
||||||
|
context,
|
||||||
|
MaterialPageRoute(
|
||||||
|
builder:
|
||||||
|
(BuildContext context) =>
|
||||||
|
SavedFormListScreen(
|
||||||
|
formname: provider
|
||||||
|
.intConfigDataList[
|
||||||
|
index]
|
||||||
|
.name,
|
||||||
|
)));
|
||||||
|
}
|
||||||
|
// Navigator.push(
|
||||||
|
// context,
|
||||||
|
// MaterialPageRoute(
|
||||||
|
// builder: (context) =>
|
||||||
|
// const InteractionListScreen()));
|
||||||
|
},
|
||||||
|
child: Text(
|
||||||
|
"View Engagement Form",
|
||||||
|
style: TextStyle(
|
||||||
|
fontSize: 14.0,
|
||||||
|
color: Colors.grey[700]),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
)
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
SizedBox(
|
||||||
|
height: 18.0,
|
||||||
|
),
|
||||||
|
Divider(),
|
||||||
|
SizedBox(
|
||||||
|
height: 8.0,
|
||||||
|
),
|
||||||
|
Visibility(
|
||||||
|
visible: f2!,
|
||||||
|
child: Column(
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
|
children: [
|
||||||
|
Padding(
|
||||||
|
padding: const EdgeInsets.only(left: 18.0),
|
||||||
|
child: Text(
|
||||||
|
subfield2!,
|
||||||
|
style: TextStyle(fontSize: 13.0),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
Padding(
|
||||||
|
padding: const EdgeInsets.only(left: 18.0),
|
||||||
|
child: Text(
|
||||||
|
field2!,
|
||||||
|
style: TextStyle(
|
||||||
|
fontSize: 15.0,
|
||||||
|
color: Colors.grey[700]),
|
||||||
|
),
|
||||||
|
)
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
Visibility(
|
||||||
|
visible: f3!,
|
||||||
|
child: Column(
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
|
children: [
|
||||||
|
Padding(
|
||||||
|
padding: const EdgeInsets.only(
|
||||||
|
left: 18.0, top: 18.0),
|
||||||
|
child: Text(
|
||||||
|
subfield3!,
|
||||||
|
style: TextStyle(fontSize: 13.0),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
Padding(
|
||||||
|
padding: const EdgeInsets.only(left: 18.0),
|
||||||
|
child: Text(
|
||||||
|
field3!,
|
||||||
|
style: TextStyle(
|
||||||
|
fontSize: 15.0,
|
||||||
|
color: Colors.grey[700]),
|
||||||
|
),
|
||||||
|
)
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
Visibility(
|
||||||
|
visible: f4!,
|
||||||
|
child: Column(
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
|
children: [
|
||||||
|
Padding(
|
||||||
|
padding: const EdgeInsets.only(
|
||||||
|
left: 18.0, top: 18.0),
|
||||||
|
child: Text(
|
||||||
|
subfield4!,
|
||||||
|
style: TextStyle(fontSize: 13.0),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
Padding(
|
||||||
|
padding: const EdgeInsets.only(left: 18.0),
|
||||||
|
child: Text(
|
||||||
|
field4!,
|
||||||
|
style: TextStyle(
|
||||||
|
fontSize: 15.0,
|
||||||
|
color: Colors.grey[700]),
|
||||||
|
),
|
||||||
|
)
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
Visibility(
|
||||||
|
visible: f5!,
|
||||||
|
child: Column(
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
|
children: [
|
||||||
|
Padding(
|
||||||
|
padding: const EdgeInsets.only(
|
||||||
|
left: 18.0, top: 18.0),
|
||||||
|
child: Text(
|
||||||
|
"Oraganization Type",
|
||||||
|
style: TextStyle(fontSize: 13.0),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
Padding(
|
||||||
|
padding: const EdgeInsets.only(left: 18.0),
|
||||||
|
child: Text(
|
||||||
|
"fff",
|
||||||
|
style: TextStyle(
|
||||||
|
fontSize: 15.0,
|
||||||
|
color: Colors.grey[700]),
|
||||||
|
),
|
||||||
|
)
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
Visibility(
|
||||||
|
visible: f6!,
|
||||||
|
child: Column(
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
|
children: [
|
||||||
|
Padding(
|
||||||
|
padding: const EdgeInsets.only(
|
||||||
|
left: 18.0, top: 18.0),
|
||||||
|
child: Text(
|
||||||
|
subfield6!,
|
||||||
|
style: TextStyle(fontSize: 13.0),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
Padding(
|
||||||
|
padding: const EdgeInsets.only(left: 18.0),
|
||||||
|
child: Text(
|
||||||
|
field6!,
|
||||||
|
style: TextStyle(
|
||||||
|
fontSize: 15.0,
|
||||||
|
color: Colors.grey[700]),
|
||||||
|
),
|
||||||
|
)
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
Visibility(
|
||||||
|
visible: f7!,
|
||||||
|
child: Column(
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
|
children: [
|
||||||
|
Padding(
|
||||||
|
padding: const EdgeInsets.only(
|
||||||
|
left: 18.0, top: 18.0),
|
||||||
|
child: Text(
|
||||||
|
subfield7!,
|
||||||
|
style: TextStyle(fontSize: 13.0),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
Padding(
|
||||||
|
padding: const EdgeInsets.only(left: 18.0),
|
||||||
|
child: Text(
|
||||||
|
field7!,
|
||||||
|
style: TextStyle(
|
||||||
|
fontSize: 15.0,
|
||||||
|
color: Colors.grey[700]),
|
||||||
|
),
|
||||||
|
)
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
);
|
||||||
|
}),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
);
|
||||||
|
},
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
Future<int> getCount(String form, InteractionProvider provider) async {
|
||||||
|
await provider.getRecords();
|
||||||
|
|
||||||
|
return provider.savedList.where((element) => element.form == form).length;
|
||||||
|
}
|
||||||
|
}
|
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,121 @@
|
||||||
|
// import 'package:discover_module/ui_screen/interactionform/model/interaction_data.dart';
|
||||||
|
// import 'package:hive_flutter/hive_flutter.dart';
|
||||||
|
// // import 'package:pwa_ios/model/interaction_data.dart';
|
||||||
|
|
||||||
|
// part 'interaction_config_data.g.dart';
|
||||||
|
|
||||||
|
// class UIDataResponse {
|
||||||
|
// bool success;
|
||||||
|
// String message;
|
||||||
|
|
||||||
|
// List<FormFieldData> formFields;
|
||||||
|
|
||||||
|
// UIDataResponse({
|
||||||
|
// required this.success,
|
||||||
|
// required this.message,
|
||||||
|
// required this.formFields,
|
||||||
|
// });
|
||||||
|
|
||||||
|
// factory UIDataResponse.fromJson(Map<String, dynamic> json) => UIDataResponse(
|
||||||
|
// success: json["success"],
|
||||||
|
// message: json["message"],
|
||||||
|
// formFields: List<FormFieldData>.from(
|
||||||
|
// json["data"].map((x) => FormFieldData.fromJson(x))),
|
||||||
|
// );
|
||||||
|
|
||||||
|
// Map<String, dynamic> toJson() => {
|
||||||
|
// "success": success,
|
||||||
|
// "message": message,
|
||||||
|
// "form-fields": List<dynamic>.from(formFields.map((x) => x.toJson())),
|
||||||
|
// };
|
||||||
|
|
||||||
|
// @override
|
||||||
|
// String toString() {
|
||||||
|
// // TODO: implement toString
|
||||||
|
// return List<dynamic>.from(formFields.map((x) => x.toJson())).toString();
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
|
||||||
|
// @HiveType(typeId: 19)
|
||||||
|
// class InteractionConfigData {
|
||||||
|
// @HiveField(1)
|
||||||
|
// InteractionResultData widgets;
|
||||||
|
// @HiveField(2)
|
||||||
|
// String id;
|
||||||
|
// @HiveField(3)
|
||||||
|
// String name;
|
||||||
|
|
||||||
|
// InteractionConfigData({
|
||||||
|
// required this.widgets,
|
||||||
|
// required this.id,
|
||||||
|
// required this.name,
|
||||||
|
// });
|
||||||
|
|
||||||
|
// Map<String, dynamic> toJson() => {"widgets": widgets};
|
||||||
|
// }
|
||||||
|
|
||||||
|
//pooja
|
||||||
|
|
||||||
|
import 'package:discover_module/ui_screen/interactionform/model/interaction_data.dart';
|
||||||
|
import 'package:hive_flutter/hive_flutter.dart';
|
||||||
|
// import 'package:pwa_ios/model/interaction_data.dart';
|
||||||
|
|
||||||
|
part 'engagement_interaction.g.dart';
|
||||||
|
|
||||||
|
class UIDataResponse {
|
||||||
|
bool success;
|
||||||
|
String message;
|
||||||
|
|
||||||
|
List<FormFieldData> formFields;
|
||||||
|
|
||||||
|
String? formtype;
|
||||||
|
|
||||||
|
UIDataResponse({
|
||||||
|
required this.success,
|
||||||
|
required this.message,
|
||||||
|
required this.formFields,
|
||||||
|
this.formtype,
|
||||||
|
});
|
||||||
|
|
||||||
|
factory UIDataResponse.fromJson(Map<String, dynamic> json) => UIDataResponse(
|
||||||
|
success: json["success"],
|
||||||
|
message: json["message"],
|
||||||
|
formtype: json["formtype"],
|
||||||
|
formFields: List<FormFieldData>.from(
|
||||||
|
json["data"].map((x) => FormFieldData.fromJson(x))),
|
||||||
|
);
|
||||||
|
|
||||||
|
Map<String, dynamic> toJson() => {
|
||||||
|
"success": success,
|
||||||
|
"message": message,
|
||||||
|
"formtype": formtype,
|
||||||
|
"form-fields": List<dynamic>.from(formFields.map((x) => x.toJson())),
|
||||||
|
};
|
||||||
|
|
||||||
|
@override
|
||||||
|
String toString() {
|
||||||
|
// TODO: implement toString
|
||||||
|
return List<dynamic>.from(formFields.map((x) => x.toJson())).toString();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@HiveType(typeId: 29)
|
||||||
|
class InteractionConfigDataEng {
|
||||||
|
@HiveField(1)
|
||||||
|
InteractionConfigDataEng widgets;
|
||||||
|
@HiveField(2)
|
||||||
|
String id;
|
||||||
|
@HiveField(3)
|
||||||
|
String name;
|
||||||
|
@HiveField(4)
|
||||||
|
String? formtype;
|
||||||
|
|
||||||
|
InteractionConfigDataEng({
|
||||||
|
required this.widgets,
|
||||||
|
required this.id,
|
||||||
|
required this.name,
|
||||||
|
this.formtype,
|
||||||
|
});
|
||||||
|
|
||||||
|
Map<String, dynamic> toJson() => {"widgets": widgets};
|
||||||
|
}
|
|
@ -0,0 +1,51 @@
|
||||||
|
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||||
|
|
||||||
|
part of 'engagement_interaction.dart';
|
||||||
|
|
||||||
|
// **************************************************************************
|
||||||
|
// TypeAdapterGenerator
|
||||||
|
// **************************************************************************
|
||||||
|
|
||||||
|
class InteractionConfigDataAdapter
|
||||||
|
extends TypeAdapter<InteractionConfigDataEng> {
|
||||||
|
@override
|
||||||
|
final int typeId = 19;
|
||||||
|
|
||||||
|
@override
|
||||||
|
InteractionConfigDataEng read(BinaryReader reader) {
|
||||||
|
final numOfFields = reader.readByte();
|
||||||
|
final fields = <int, dynamic>{
|
||||||
|
for (int i = 0; i < numOfFields; i++) reader.readByte(): reader.read(),
|
||||||
|
};
|
||||||
|
return InteractionConfigDataEng(
|
||||||
|
widgets: fields[1] as InteractionConfigDataEng,
|
||||||
|
id: fields[2] as String,
|
||||||
|
name: fields[3] as String,
|
||||||
|
formtype: fields[4] as String?,
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
void write(BinaryWriter writer, InteractionConfigDataEng obj) {
|
||||||
|
writer
|
||||||
|
..writeByte(4)
|
||||||
|
..writeByte(1)
|
||||||
|
..write(obj.widgets)
|
||||||
|
..writeByte(2)
|
||||||
|
..write(obj.id)
|
||||||
|
..writeByte(3)
|
||||||
|
..write(obj.name)
|
||||||
|
..writeByte(4)
|
||||||
|
..write(obj.formtype);
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
int get hashCode => typeId.hashCode;
|
||||||
|
|
||||||
|
@override
|
||||||
|
bool operator ==(Object other) =>
|
||||||
|
identical(this, other) ||
|
||||||
|
other is InteractionConfigDataAdapter &&
|
||||||
|
runtimeType == other.runtimeType &&
|
||||||
|
typeId == other.typeId;
|
||||||
|
}
|
File diff suppressed because it is too large
Load Diff
|
@ -191,65 +191,21 @@ class _EditInteractionScreenState extends State<EditInteractionScreen1> {
|
||||||
print("Item_sectionListt: ${item.sectionList}");
|
print("Item_sectionListt: ${item.sectionList}");
|
||||||
return ListView(
|
return ListView(
|
||||||
children: [
|
children: [
|
||||||
Container(
|
Padding(
|
||||||
//elevation: 4,
|
padding: const EdgeInsets.all(10.0),
|
||||||
// shape: RoundedRectangleBorder(
|
|
||||||
// borderRadius: BorderRadius.circular(0.0),
|
|
||||||
// ),
|
|
||||||
color: Constants.k2color,
|
|
||||||
child: ExpansionTile(
|
|
||||||
maintainState: true,
|
|
||||||
// backgroundColor: Colors.white,
|
|
||||||
backgroundColor: Constants.k2color,
|
|
||||||
|
|
||||||
// collapsedBackgroundColor: Color(0xFF2b9af3),
|
|
||||||
initiallyExpanded: true,
|
|
||||||
title: Stack(
|
|
||||||
alignment: AlignmentDirectional.center,
|
|
||||||
children: [
|
|
||||||
Container(
|
|
||||||
// height: double.infinity,
|
|
||||||
width: double.infinity,
|
|
||||||
padding:
|
|
||||||
const EdgeInsets.all(0.0),
|
|
||||||
decoration: BoxDecoration(
|
|
||||||
// color: Color(0xFF2b9af3),
|
|
||||||
color: Constants.k2color),
|
|
||||||
child: Text(
|
child: Text(
|
||||||
item.sectionName,
|
item.sectionName,
|
||||||
|
textAlign: TextAlign.center,
|
||||||
style: const TextStyle(
|
style: const TextStyle(
|
||||||
color: Colors.white,
|
color: Colors.black,
|
||||||
fontWeight: FontWeight.bold,
|
fontWeight: FontWeight.normal,
|
||||||
fontSize: 18.0),
|
fontSize: 18.0),
|
||||||
)),
|
|
||||||
item.multiple
|
|
||||||
? Align(
|
|
||||||
alignment:
|
|
||||||
Alignment.centerRight,
|
|
||||||
child: IconButton(
|
|
||||||
onPressed: () {
|
|
||||||
provider.getSectionItem(
|
|
||||||
item.sectionName);
|
|
||||||
// print("index is $listIndex");
|
|
||||||
setState(() {
|
|
||||||
// for (var item
|
|
||||||
});
|
|
||||||
},
|
|
||||||
icon: const Icon(
|
|
||||||
Icons.add_circle_outline,
|
|
||||||
size: 30,
|
|
||||||
color: Colors.white,
|
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
)
|
|
||||||
: const SizedBox.shrink()
|
|
||||||
]),
|
|
||||||
children: [
|
|
||||||
Container(
|
Container(
|
||||||
color: Colors.white,
|
color: Colors.white,
|
||||||
child: Padding(
|
child: Padding(
|
||||||
padding:
|
padding: const EdgeInsets.only(top: 0.0),
|
||||||
const EdgeInsets.only(top: 8.0),
|
|
||||||
child: Column(
|
child: Column(
|
||||||
crossAxisAlignment:
|
crossAxisAlignment:
|
||||||
CrossAxisAlignment.center,
|
CrossAxisAlignment.center,
|
||||||
|
@ -267,8 +223,7 @@ class _EditInteractionScreenState extends State<EditInteractionScreen1> {
|
||||||
// : 4, // large
|
// : 4, // large
|
||||||
// xl: 3, // extra large screen
|
// xl: 3, // extra large screen
|
||||||
// ),
|
// ),
|
||||||
crossAxisCount:
|
crossAxisCount: context.responsive<int>(
|
||||||
context.responsive<int>(
|
|
||||||
1,
|
1,
|
||||||
sm: 1, // small
|
sm: 1, // small
|
||||||
md: 2, // medium
|
md: 2, // medium
|
||||||
|
@ -278,8 +233,7 @@ class _EditInteractionScreenState extends State<EditInteractionScreen1> {
|
||||||
xl: 3, // extra large screen
|
xl: 3, // extra large screen
|
||||||
),
|
),
|
||||||
mainAxisSpacing:
|
mainAxisSpacing:
|
||||||
sectionList.length == 1 ||
|
sectionList.length == 1 || !isTablet
|
||||||
!isTablet
|
|
||||||
? 1
|
? 1
|
||||||
: 3.5,
|
: 3.5,
|
||||||
shrinkWrap: true,
|
shrinkWrap: true,
|
||||||
|
@ -288,8 +242,7 @@ class _EditInteractionScreenState extends State<EditInteractionScreen1> {
|
||||||
childAspectRatio:
|
childAspectRatio:
|
||||||
sectionList.length == 1
|
sectionList.length == 1
|
||||||
? orientation ==
|
? orientation ==
|
||||||
Orientation
|
Orientation.landscape
|
||||||
.landscape
|
|
||||||
? 10
|
? 10
|
||||||
: 4.8
|
: 4.8
|
||||||
: isTablet
|
: isTablet
|
||||||
|
@ -303,56 +256,43 @@ class _EditInteractionScreenState extends State<EditInteractionScreen1> {
|
||||||
sectionList[i];
|
sectionList[i];
|
||||||
dropdownvalue = sectionItem
|
dropdownvalue = sectionItem
|
||||||
.widget ==
|
.widget ==
|
||||||
InteractionWidget
|
InteractionWidget.DROPDOWN
|
||||||
.DROPDOWN
|
? sectionItem.value ?? "Select"
|
||||||
? sectionItem.value ??
|
|
||||||
"Select"
|
|
||||||
: ' ';
|
: ' ';
|
||||||
List<
|
List<InputClass> list = sectionItem
|
||||||
InputClass> list = sectionItem
|
|
||||||
.widget ==
|
.widget ==
|
||||||
InteractionWidget
|
InteractionWidget
|
||||||
.DROPDOWN ||
|
.DROPDOWN ||
|
||||||
sectionItem
|
|
||||||
.widget ==
|
|
||||||
InteractionWidget
|
|
||||||
.AUTOCOMPLETE ||
|
|
||||||
sectionItem
|
|
||||||
.widget ==
|
|
||||||
InteractionWidget
|
|
||||||
.MULTISELECT
|
|
||||||
? provider.getData2(
|
|
||||||
sectionItem)
|
|
||||||
: [];
|
|
||||||
provider.checkboxlist =
|
|
||||||
sectionItem.widget ==
|
sectionItem.widget ==
|
||||||
InteractionWidget
|
InteractionWidget
|
||||||
.CHECKBOX
|
.AUTOCOMPLETE ||
|
||||||
? provider.getData2(
|
sectionItem.widget ==
|
||||||
sectionItem)
|
InteractionWidget
|
||||||
|
.MULTISELECT
|
||||||
|
? provider.getData2(sectionItem)
|
||||||
|
: [];
|
||||||
|
provider.checkboxlist = sectionItem
|
||||||
|
.widget ==
|
||||||
|
InteractionWidget.CHECKBOX
|
||||||
|
? provider.getData2(sectionItem)
|
||||||
: [];
|
: [];
|
||||||
|
|
||||||
return Column(
|
return Column(
|
||||||
crossAxisAlignment:
|
crossAxisAlignment:
|
||||||
CrossAxisAlignment
|
CrossAxisAlignment.start,
|
||||||
.start,
|
|
||||||
children: [
|
children: [
|
||||||
sectionItem.widget ==
|
sectionItem.widget ==
|
||||||
InteractionWidget
|
InteractionWidget
|
||||||
.BUTTON &&
|
.BUTTON &&
|
||||||
sectionItem
|
sectionItem.input ==
|
||||||
.input ==
|
|
||||||
'add'
|
'add'
|
||||||
? const SizedBox
|
? const SizedBox.shrink()
|
||||||
.shrink()
|
|
||||||
: Padding(
|
: Padding(
|
||||||
padding:
|
padding:
|
||||||
const EdgeInsets
|
const EdgeInsets
|
||||||
.only(
|
.only(
|
||||||
left:
|
left: 8.0,
|
||||||
8.0,
|
right: 8.0),
|
||||||
right:
|
|
||||||
8.0),
|
|
||||||
// child: Text(
|
// child: Text(
|
||||||
// '${sectionItem.name}:*',
|
// '${sectionItem.name}:*',
|
||||||
// style: TextStyle(
|
// style: TextStyle(
|
||||||
|
@ -366,17 +306,13 @@ class _EditInteractionScreenState extends State<EditInteractionScreen1> {
|
||||||
// ),
|
// ),
|
||||||
// ),
|
// ),
|
||||||
child: Text(
|
child: Text(
|
||||||
sectionItem
|
sectionItem.isRequired
|
||||||
.isRequired
|
|
||||||
? '${sectionItem.name}:*'
|
? '${sectionItem.name}:*'
|
||||||
: '${sectionItem.name}:',
|
: '${sectionItem.name}:',
|
||||||
style:
|
style: TextStyle(
|
||||||
TextStyle(
|
color: Colors.orange
|
||||||
color: Colors
|
|
||||||
.orange
|
|
||||||
.shade800,
|
.shade800,
|
||||||
fontSize:
|
fontSize: 18.0,
|
||||||
18.0,
|
|
||||||
// fontSize: isTablet
|
// fontSize: isTablet
|
||||||
// ? 18
|
// ? 18
|
||||||
// : 12,
|
// : 12,
|
||||||
|
@ -388,16 +324,14 @@ class _EditInteractionScreenState extends State<EditInteractionScreen1> {
|
||||||
// isTablet ? 15 : 5,
|
// isTablet ? 15 : 5,
|
||||||
// ),
|
// ),
|
||||||
returnWidget(
|
returnWidget(
|
||||||
sectionItem:
|
sectionItem: sectionItem,
|
||||||
sectionItem,
|
|
||||||
item: item,
|
item: item,
|
||||||
provider: provider,
|
provider: provider,
|
||||||
list: list,
|
list: list,
|
||||||
gridIndex: i,
|
gridIndex: i,
|
||||||
listIndex: 0,
|
listIndex: 0,
|
||||||
widgetData:
|
widgetData:
|
||||||
sectionItem
|
sectionItem.widget!,
|
||||||
.widget!,
|
|
||||||
multiple: false),
|
multiple: false),
|
||||||
// SizedBox(
|
// SizedBox(
|
||||||
// height: isTablet ? 15 : 5,
|
// height: isTablet ? 15 : 5,
|
||||||
|
@ -419,8 +353,7 @@ class _EditInteractionScreenState extends State<EditInteractionScreen1> {
|
||||||
item,
|
item,
|
||||||
0)
|
0)
|
||||||
: const SizedBox.shrink(),
|
: const SizedBox.shrink(),
|
||||||
provider.interactionReponseList
|
provider.interactionReponseList.length ==
|
||||||
.length ==
|
|
||||||
0 - 1
|
0 - 1
|
||||||
? saveActions(provider)
|
? saveActions(provider)
|
||||||
: const SizedBox.shrink()
|
: const SizedBox.shrink()
|
||||||
|
@ -429,8 +362,6 @@ class _EditInteractionScreenState extends State<EditInteractionScreen1> {
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
]),
|
|
||||||
),
|
|
||||||
],
|
],
|
||||||
);
|
);
|
||||||
}).toList(),
|
}).toList(),
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
10
pubspec.lock
10
pubspec.lock
|
@ -521,7 +521,7 @@ packages:
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "4.1.7"
|
version: "4.1.7"
|
||||||
intl:
|
intl:
|
||||||
dependency: transitive
|
dependency: "direct main"
|
||||||
description:
|
description:
|
||||||
name: intl
|
name: intl
|
||||||
sha256: "910f85bce16fb5c6f614e117efa303e85a1731bb0081edf3604a2ae6e9a3cc91"
|
sha256: "910f85bce16fb5c6f614e117efa303e85a1731bb0081edf3604a2ae6e9a3cc91"
|
||||||
|
@ -640,6 +640,14 @@ packages:
|
||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "1.0.5"
|
version: "1.0.5"
|
||||||
|
multi_dropdown:
|
||||||
|
dependency: "direct main"
|
||||||
|
description:
|
||||||
|
name: multi_dropdown
|
||||||
|
sha256: b63ff339fcc875d667f8688c8ef62853545b580dd2b6fe78b73339783268afd8
|
||||||
|
url: "https://pub.dev"
|
||||||
|
source: hosted
|
||||||
|
version: "2.1.4"
|
||||||
nested:
|
nested:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
|
|
|
@ -65,6 +65,8 @@ dependencies:
|
||||||
carousel_slider: ^4.2.1
|
carousel_slider: ^4.2.1
|
||||||
popup_menu: ^2.0.0
|
popup_menu: ^2.0.0
|
||||||
adoptive_calendar: ^0.1.8
|
adoptive_calendar: ^0.1.8
|
||||||
|
multi_dropdown: ^2.1.4
|
||||||
|
intl: ^0.17.0
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -110,8 +112,8 @@ flutter:
|
||||||
fonts:
|
fonts:
|
||||||
- family: SourceSerif
|
- family: SourceSerif
|
||||||
fonts:
|
fonts:
|
||||||
- asset: fonts/SourceSerif4-Regular.ttf
|
- asset: fonts/open-sans/OpenSans-Regular.ttf
|
||||||
- asset: fonts/SourceSerif4-Italic.ttf
|
- asset: fonts/open-sans/OpenSans-Italic.ttf
|
||||||
style: italic
|
style: italic
|
||||||
# - asset: fonts/Schyler-Italic.ttf
|
# - asset: fonts/Schyler-Italic.ttf
|
||||||
# style: italic
|
# style: italic
|
||||||
|
|
Loading…
Reference in New Issue