2024-10-07 12:41:28 +00:00
|
|
|
import 'package:discover_module/contacts_module/provider_class/affiliationsprovider.dart';
|
|
|
|
import 'package:discover_module/contacts_module/provider_class/award_provider.dart';
|
|
|
|
import 'package:discover_module/contacts_module/provider_class/certificate_provider.dart';
|
|
|
|
import 'package:discover_module/contacts_module/provider_class/educationprovider.dart';
|
|
|
|
import 'package:discover_module/contacts_module/provider_class/email_provider.dart';
|
|
|
|
import 'package:discover_module/contacts_module/provider_class/engagement_provider.dart';
|
|
|
|
import 'package:discover_module/contacts_module/provider_class/events_provider.dart';
|
|
|
|
import 'package:discover_module/contacts_module/provider_class/hcp%20_provider.dart';
|
2024-11-22 10:38:43 +00:00
|
|
|
import 'package:discover_module/contacts_module/provider_class/k2_provider/kol_add_provider.dart';
|
2024-10-07 12:41:28 +00:00
|
|
|
import 'package:discover_module/contacts_module/provider_class/k2_provider/kol_aff_provider.dart';
|
|
|
|
import 'package:discover_module/contacts_module/provider_class/k2_provider/kol_awards_provider.dart';
|
|
|
|
import 'package:discover_module/contacts_module/provider_class/k2_provider/kol_certificate_provider.dart';
|
|
|
|
import 'package:discover_module/contacts_module/provider_class/k2_provider/kol_education_provider.dart';
|
|
|
|
import 'package:discover_module/contacts_module/provider_class/k2_provider/kol_email_provider.dart';
|
|
|
|
import 'package:discover_module/contacts_module/provider_class/k2_provider/kol_event_provider.dart';
|
|
|
|
import 'package:discover_module/contacts_module/provider_class/k2_provider/kol_list_provider.dart';
|
|
|
|
import 'package:discover_module/contacts_module/provider_class/k2_provider/kol_locationprovider.dart';
|
|
|
|
import 'package:discover_module/contacts_module/provider_class/k2_provider/kol_pno_provider.dart';
|
|
|
|
import 'package:discover_module/contacts_module/provider_class/k2_provider/kol_training_provider.dart';
|
2024-11-22 10:38:43 +00:00
|
|
|
import 'package:discover_module/contacts_module/provider_class/k2_provider/kol_viewnotes.dart';
|
2024-10-07 12:41:28 +00:00
|
|
|
import 'package:discover_module/contacts_module/provider_class/location_provider.dart';
|
|
|
|
import 'package:discover_module/contacts_module/provider_class/medicalinsightprovider.dart';
|
|
|
|
import 'package:discover_module/contacts_module/provider_class/nih_provider.dart';
|
|
|
|
import 'package:discover_module/contacts_module/provider_class/patent_provider.dart';
|
|
|
|
import 'package:discover_module/contacts_module/provider_class/phoneno_provider.dart';
|
|
|
|
import 'package:discover_module/contacts_module/provider_class/procedureprovider.dart';
|
|
|
|
import 'package:discover_module/contacts_module/provider_class/publications_provider.dart';
|
|
|
|
import 'package:discover_module/contacts_module/provider_class/single_hcpprovider.dart';
|
|
|
|
import 'package:discover_module/contacts_module/provider_class/speaker_provider.dart';
|
|
|
|
import 'package:discover_module/contacts_module/provider_class/training_provider.dart';
|
|
|
|
import 'package:discover_module/contacts_module/provider_class/trials_provider.dart';
|
|
|
|
import 'package:discover_module/contacts_module/storage_hive/aff_data/aff_model_hive.dart';
|
|
|
|
import 'package:discover_module/contacts_module/storage_hive/awa_data/awa_model_hive.dart';
|
|
|
|
import 'package:discover_module/contacts_module/storage_hive/cer_hive/cer_model_hive.dart';
|
|
|
|
import 'package:discover_module/contacts_module/storage_hive/edu_data/edu_model_hive.dart';
|
|
|
|
import 'package:discover_module/contacts_module/storage_hive/email_data/email_model_hive.dart';
|
|
|
|
import 'package:discover_module/contacts_module/storage_hive/events_data/event_model_hive.dart';
|
|
|
|
import 'package:discover_module/contacts_module/storage_hive/kol_info/kol_info_model_hive.dart';
|
|
|
|
import 'package:discover_module/contacts_module/storage_hive/loc_data/location_model_hive.dart';
|
|
|
|
import 'package:discover_module/contacts_module/storage_hive/nih_grant_data/nih_model_hive.dart';
|
|
|
|
import 'package:discover_module/contacts_module/storage_hive/patent_data/patent_model_hive.dart';
|
|
|
|
import 'package:discover_module/contacts_module/storage_hive/pno_data/pno_model_hive.dart';
|
|
|
|
import 'package:discover_module/contacts_module/storage_hive/procedure_data/pro_model_hive.dart';
|
|
|
|
import 'package:discover_module/contacts_module/storage_hive/pub_data/pub_model_hive.dart';
|
2024-11-22 10:38:43 +00:00
|
|
|
import 'package:discover_module/contacts_module/storage_hive/savefilter/save_filter_hive.dart';
|
2024-10-07 12:41:28 +00:00
|
|
|
import 'package:discover_module/contacts_module/storage_hive/speaker_data/speaker_model_hive.dart';
|
|
|
|
import 'package:discover_module/contacts_module/storage_hive/traning_data/traning_model_hive.dart';
|
|
|
|
import 'package:discover_module/contacts_module/storage_hive/trials_data/trial_model_hive.dart';
|
|
|
|
import 'package:discover_module/contacts_module/ui_screen/interactionform/interactionprovider.dart';
|
|
|
|
import 'package:discover_module/contacts_module/ui_screen/interactionform/model/interaction_config_data.dart';
|
|
|
|
import 'package:discover_module/contacts_module/ui_screen/interactionform/model/interaction_data.dart';
|
|
|
|
import 'package:discover_module/contacts_module/ui_screen/interactionform/model/json_form_data.dart';
|
|
|
|
import 'package:discover_module/contacts_module/ui_screen/interactionform/model/save_interaction.dart';
|
|
|
|
import 'package:discover_module/contacts_module/ui_screen/interactionform/repository/hive_repository.dart';
|
|
|
|
import 'package:discover_module/contacts_module/ui_screen/interactionform/viewinteractionprovider.dart';
|
|
|
|
import 'package:discover_module/contacts_module/ui_screen/new_contacts.dart';
|
2024-11-22 10:38:43 +00:00
|
|
|
import 'package:discover_module/test.dart';
|
2024-10-07 12:41:28 +00:00
|
|
|
|
2024-05-20 10:29:02 +00:00
|
|
|
import 'package:flutter/material.dart';
|
|
|
|
import 'package:flutter/services.dart';
|
|
|
|
import 'package:hive_flutter/hive_flutter.dart';
|
|
|
|
import 'package:provider/provider.dart';
|
|
|
|
|
|
|
|
Future<void> main() async {
|
|
|
|
WidgetsFlutterBinding.ensureInitialized();
|
2024-10-07 12:41:28 +00:00
|
|
|
|
2024-05-20 10:29:02 +00:00
|
|
|
await Hive.initFlutter();
|
|
|
|
|
|
|
|
Hive.registerAdapter(SaveInteractionAdapter());
|
|
|
|
Hive.registerAdapter(InteractionConfigDataAdapter());
|
|
|
|
|
|
|
|
Hive.registerAdapter(InteractionResultDataAdapter());
|
|
|
|
Hive.registerAdapter(FormFieldDataAdapter());
|
|
|
|
Hive.registerAdapter(ValidationAdapter());
|
|
|
|
Hive.registerAdapter(SectionListAdapter());
|
|
|
|
Hive.registerAdapter(InputClassAdapter());
|
|
|
|
Hive.registerAdapter(InteractionWidgetAdapter());
|
|
|
|
|
|
|
|
// Hive.registerAdapter(UserDataAdapter());
|
|
|
|
Hive.registerAdapter(SendSaveJsonAdapter());
|
|
|
|
Hive.registerAdapter(MultipleSectionListAdapter());
|
|
|
|
Hive.registerAdapter(SaveAdapter());
|
|
|
|
Hive.registerAdapter(SaveInteractionFormJsonAdapter());
|
|
|
|
await Hive.openBox<SaveInteraction>('InteractionDataBox');
|
|
|
|
|
|
|
|
await Hive.openBox<InteractionConfigData>('InteractionConfigDataBox');
|
|
|
|
|
|
|
|
var box = await Hive.openBox('mycontact');
|
|
|
|
var box1 = await Hive.openBox('myfilter');
|
|
|
|
|
2024-06-10 11:11:00 +00:00
|
|
|
await Hive.openBox('checkvalue');
|
|
|
|
|
2024-06-27 08:38:43 +00:00
|
|
|
await Hive.openBox('hcpdata');
|
|
|
|
|
2024-10-07 12:41:28 +00:00
|
|
|
await Hive.openBox<String>('notehive');
|
|
|
|
|
|
|
|
Hive.registerAdapter(AffiliationAdapter());
|
|
|
|
// await Hive.openBox<Affiliation>('affiliationshive');
|
|
|
|
|
|
|
|
Hive.registerAdapter(KolInfoAdapter());
|
|
|
|
Hive.registerAdapter(PublicationAdapter());
|
|
|
|
Hive.registerAdapter(EventsAdapter());
|
|
|
|
Hive.registerAdapter(TrialsAdapter());
|
|
|
|
Hive.registerAdapter(LocationAdapter());
|
|
|
|
Hive.registerAdapter(PhoneNoAdapter());
|
|
|
|
Hive.registerAdapter(EmailAdapter());
|
|
|
|
Hive.registerAdapter(EduAdapter());
|
|
|
|
Hive.registerAdapter(AwaAdapter());
|
|
|
|
Hive.registerAdapter(CerAdapter());
|
|
|
|
Hive.registerAdapter(PatentAdapter());
|
|
|
|
Hive.registerAdapter(NihAdapter());
|
|
|
|
Hive.registerAdapter(ProAdapter());
|
|
|
|
Hive.registerAdapter(Training1Adapter());
|
|
|
|
Hive.registerAdapter(SpeAdapter());
|
2024-11-22 10:38:43 +00:00
|
|
|
Hive.registerAdapter(savecontactfilterAdapter());
|
2024-10-07 12:41:28 +00:00
|
|
|
|
2024-05-20 10:29:02 +00:00
|
|
|
runApp(MultiProvider(
|
|
|
|
providers: [
|
|
|
|
ChangeNotifierProvider(create: (_) => InteractionProvider()),
|
|
|
|
ChangeNotifierProvider(create: (_) => ViewInteractionProvider()),
|
2024-06-27 08:38:43 +00:00
|
|
|
ChangeNotifierProvider(create: (_) => hcpProvider()),
|
|
|
|
ChangeNotifierProvider(create: (_) => Singlehcpdetails()),
|
2024-07-05 08:48:29 +00:00
|
|
|
ChangeNotifierProvider(create: (_) => AffiliationsProvider()),
|
|
|
|
ChangeNotifierProvider(create: (_) => PublicatioProvider()),
|
|
|
|
ChangeNotifierProvider(create: (_) => EventProvider()),
|
|
|
|
ChangeNotifierProvider(create: (_) => TrialsProvider()),
|
2024-07-24 08:23:02 +00:00
|
|
|
ChangeNotifierProvider(create: (_) => MediacalInsightProvider()),
|
2024-08-13 10:46:26 +00:00
|
|
|
ChangeNotifierProvider(create: (_) => SpekerEvalutionProvider()),
|
|
|
|
ChangeNotifierProvider(create: (_) => EnagagementProvider()),
|
2024-08-30 12:24:54 +00:00
|
|
|
ChangeNotifierProvider(create: (_) => LocationProvider()),
|
|
|
|
ChangeNotifierProvider(create: (_) => PhonenoProvider()),
|
|
|
|
ChangeNotifierProvider(create: (_) => EmailProvider()),
|
|
|
|
ChangeNotifierProvider(create: (_) => PatentProvider()),
|
|
|
|
ChangeNotifierProvider(create: (_) => TrainigProvider()),
|
|
|
|
ChangeNotifierProvider(create: (_) => EducationProvider()),
|
|
|
|
ChangeNotifierProvider(create: (_) => AwardProvider()),
|
|
|
|
ChangeNotifierProvider(create: (_) => CertificateProvider()),
|
|
|
|
ChangeNotifierProvider(create: (_) => NIHGrantsProvider()),
|
|
|
|
ChangeNotifierProvider(create: (_) => ProcedureProvider()),
|
2024-08-13 10:46:26 +00:00
|
|
|
|
2024-10-07 12:41:28 +00:00
|
|
|
//K2 Provider
|
|
|
|
|
|
|
|
ChangeNotifierProvider(create: (_) => KolListProvider()),
|
|
|
|
ChangeNotifierProvider(create: (_) => LocationKolProvider()),
|
|
|
|
ChangeNotifierProvider(create: (_) => PhonenoProviderK2()),
|
|
|
|
ChangeNotifierProvider(create: (_) => EmailProviderK2()),
|
|
|
|
ChangeNotifierProvider(create: (_) => EducationProviderK2()),
|
|
|
|
ChangeNotifierProvider(create: (_) => TrainigProviderK2()),
|
|
|
|
ChangeNotifierProvider(create: (_) => AwardProviderK2()),
|
|
|
|
ChangeNotifierProvider(create: (_) => CertificateProviderK2()),
|
|
|
|
ChangeNotifierProvider(create: (_) => AffiliationsProviderk2()),
|
|
|
|
ChangeNotifierProvider(create: (_) => EventProviderK2()),
|
2024-11-22 10:38:43 +00:00
|
|
|
ChangeNotifierProvider(create: (_) => HcpNotesFecth()),
|
|
|
|
ChangeNotifierProvider(create: (_) => AddNotesProvider()),
|
2024-10-07 12:41:28 +00:00
|
|
|
|
2024-05-20 10:29:02 +00:00
|
|
|
//ChangeNotifierProvider(create: (_) => ConfigDataProvider()),
|
|
|
|
ChangeNotifierProvider<HiveDataRepository>(
|
|
|
|
create: (_) => HiveDataRepository(
|
|
|
|
Hive.box<InteractionConfigData>('InteractionConfigDataBox'))),
|
|
|
|
],
|
|
|
|
child: MyApp(),
|
|
|
|
));
|
|
|
|
}
|
|
|
|
|
|
|
|
class MyApp extends StatefulWidget {
|
|
|
|
const MyApp({super.key});
|
|
|
|
|
|
|
|
@override
|
|
|
|
State<MyApp> createState() => _MyAppState();
|
|
|
|
}
|
|
|
|
|
|
|
|
class _MyAppState extends State<MyApp> {
|
|
|
|
// This widget is the root of your application.
|
2024-06-24 11:36:09 +00:00
|
|
|
|
2024-05-20 10:29:02 +00:00
|
|
|
@override
|
|
|
|
Widget build(BuildContext context) {
|
|
|
|
return MaterialApp(
|
|
|
|
debugShowCheckedModeBanner: false,
|
|
|
|
title: 'Flutter Demo',
|
2024-08-13 10:46:26 +00:00
|
|
|
|
2024-05-20 10:29:02 +00:00
|
|
|
theme: ThemeData(
|
2024-08-30 12:24:54 +00:00
|
|
|
fontFamily: 'OpenSans',
|
|
|
|
appBarTheme: const AppBarTheme(
|
|
|
|
backgroundColor: Color.fromARGB(255, 0, 71, 132),
|
|
|
|
elevation: 0.0,
|
|
|
|
foregroundColor: Colors.white, //here you can give the text color
|
|
|
|
),
|
|
|
|
),
|
2024-10-07 12:41:28 +00:00
|
|
|
// home: Contactsk2(),
|
2024-11-22 10:38:43 +00:00
|
|
|
home: DemoPage(),
|
|
|
|
// const Contacts1(),
|
2024-05-20 10:29:02 +00:00
|
|
|
);
|
|
|
|
}
|
|
|
|
}
|