KonectarApp/lib/utils/constants.dart

184 lines
5.8 KiB
Dart
Raw Normal View History

2024-09-06 06:30:31 +00:00
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
2024-10-08 12:01:59 +00:00
class EventsConstants {
2024-09-06 06:30:31 +00:00
//static const Color bgcolor = Color.fromARGB(255, 246, 248, 252);
2024-12-19 05:21:33 +00:00
// static const Color bgcolor = Color(0xFFF2F3F8);
// static const Color oldbgcolor = Color.fromARGB(255, 222, 237, 247);
// static const Color blueColor = Color.fromARGB(255, 0, 71, 132);
// static const Color navcolor = Color(0x1e90ff);
// static const Color tabbgColor = Color.fromARGB(255, 0, 112, 184);
// static const Color bgtopic = Color.fromARGB(255, 210, 214, 222);
// static const Color fonttopic = Color.fromARGB(255, 68, 68, 68);
// static const Color btnGreenColor = Color.fromARGB(255, 46, 166, 100);
// static const Color btnBlueColor = Color.fromARGB(255, 0, 102, 204);
// static const Color homeCardBackgound =
// Color.fromRGBO(229, 229, 229, 1); //rgba(243, 243, 243, 1)
// static const Color onboardButtonColor = Color.fromRGBO(3, 126, 238, 1);
2024-09-06 06:30:31 +00:00
// static const String domainUrl = "http://192.0.0.2:8007/api/method/";
static const String domainUrl = "http://192.168.2.109:8007/api/method/";
2024-11-19 12:57:30 +00:00
2024-09-06 06:30:31 +00:00
//192.0.0.2:8007 - iphone
2024-12-10 09:36:43 +00:00
// 192.168.2.109:8007 - office jkqehjkq
2024-12-03 05:59:45 +00:00
//K1 API~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2024-12-16 11:26:32 +00:00
static const String moduleName = "apis/v1/events";
static const String loginmodule = "apiauths";
2024-12-10 09:36:43 +00:00
2024-10-07 12:45:45 +00:00
static const String stagingUrl =
2024-12-10 09:36:43 +00:00
"https://cardio-staging.konectar.io/$moduleName/";
static const String url = stagingUrl;
2024-12-03 05:59:45 +00:00
static const String devUrl =
2024-12-10 09:36:43 +00:00
"http://192.168.2.130/konectar-sandbox/$moduleName/";
2024-12-16 11:26:32 +00:00
static const String loginUrl =
"https://cardio-staging.konectar.io/$loginmodule/";
2024-12-10 09:36:43 +00:00
static const String eventslistapi = "loadFutureEvents";
static const String followUnfollowEvent = "saveUserInterestedEvent";
static const String attendNotAttendEvent = "saveUserAttendingEvent";
2024-12-03 05:59:45 +00:00
static const String specialtyOfSpeakers = "getSpecialitiesDonutChart";
2024-12-10 09:36:43 +00:00
static const String insightsTopicsCloud = "getTopicCloudChart";
static const String insightsBarChart = "getTopAffiliationBarChart";
2024-12-03 05:59:45 +00:00
static const String speakerslistapi = "eventSpeakers";
static const String eventdetailsapi = "eventOverview";
static const String showEventsTopicsAndSession = "showEventsTopicsAndSession";
static const String getTopicNotes = "getTopicNotes";
static const String saveEventsTopicNote = "saveEventsTopicNote";
static const String eventUserAnalytics = "eventUserAnalytics";
2024-12-16 11:26:32 +00:00
static const String getVerificationCode = "getVerificationCode";
static const String login = "login";
static const String logout = "logout";
static const String medInsightApi = "medInsightApi";
2024-12-10 09:36:43 +00:00
//MY CONSTANTS
static const String saveEventOffline = "saveEventOffline";
static const String contactsListapi = "contactslistapi";
2024-12-16 11:26:32 +00:00
static const String filtersApi = "filtersApi";
2024-12-03 05:59:45 +00:00
//Hive
/*
{
2024-12-10 09:36:43 +00:00
"contacts":{
name:"loadFutureEvents",
interval:5,
method:POST,
}
"saveUserInterestedEvent",
"getSpecialitiesDonutChart",
}
*/
2024-12-03 05:59:45 +00:00
//K1 API END~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2024-11-19 12:57:30 +00:00
static const String eventslistapifromk2 =
"http://192.168.2.130:8888/api/kolevents/v1/en/fetch";
static const String speakerslistapifromk2 =
"http://192.168.2.130:8888/api/kolevents/v1/en/event_speakers";
static const String speakerslistapifromLocal =
"http://events.localhost:8007/api/method/speakerslist";
static const String addToMyEventsApi =
"http://192.168.2.130:8888/api/kolevents/v1/en/add_to_my_event";
static const String removeFromMyEventsApi =
"http://192.168.2.130:8888/api/kolevents/v1/en/delete_my_event";
static const String fetchMyEventsApi =
"http://192.168.2.130:8888/api/kolevents/v1/en/list_my_events";
static const String unfollowMyEventsApi =
"http://192.168.2.130:8888/api/kolevents/v1/en/delete_my_event";
2024-10-07 12:45:45 +00:00
static const String getTokenApi =
"http://192.168.2.155:8002/api/auth/mobile/get_token";
static const String validateTokenApi =
"http://192.168.2.155:8002/api/auth/mobile/validate_token";
static const String logoutApi =
"http://192.168.2.155:8002/api/auth/mobile/app_logout";
2024-09-06 06:30:31 +00:00
static const String file = '''
2024-10-07 12:45:45 +00:00
2024-09-06 06:30:31 +00:00
import 'package:flutter/material.dart';
class MyApp extends StatelessWidget {
const MyApp({super.key});
bool change = false;
@override
Widget build(BuildContext context) {
return Center(
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
crossAxisAlignment: CrossAxisAlignment.center,
children: <Widget>[
Card(
child: const SizedBox(
width: 300,
height: 100,
child: Text('A card that can be tapped'),
),
),
SizedBox(
width: 300,
height: 100,
child:
TextField(
obscureText: true,
decoration: InputDecoration(
border: OutlineInputBorder(),
labelText: 'Password',
),
),
),
TextButton(
onPressed: (){
},
child: Text("pooja",style:TextStyle(fontWeight:FontWeight.bold))),
],
)
);
}
}
''';
}
List<TagAnalaysis> tagAnalysisList = [
TagAnalaysis(
icon: Icons.edit,
tag: 'Tweets',
number: "15",
),
TagAnalaysis(
icon: Icons.refresh_rounded,
tag: 'Retweets',
number: "0",
),
TagAnalaysis(icon: Icons.man, tag: 'Handles', number: "2"),
TagAnalaysis(icon: Icons.thumb_up_sharp, tag: 'Likes', number: "13"),
TagAnalaysis(icon: Icons.message, tag: 'Replies', number: "0"),
TagAnalaysis(icon: Icons.tag, tag: 'Mentions', number: "1"),
TagAnalaysis(icon: Icons.link, tag: 'Links', number: "16"),
TagAnalaysis(icon: Icons.group, tag: 'Reach', number: "30"),
];
extension EmailValidator on String {
bool isValidEmail() {
return RegExp(
r'^(([^<>()[\]\\.,;:\s@\"]+(\.[^<>()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$')
.hasMatch(this);
}
}
class TagAnalaysis {
String tag;
IconData icon;
String number;
TagAnalaysis({required this.icon, required this.tag, required this.number});
}