KonectarEvents/lib/utils/constants.dart

103 lines
2.7 KiB
Dart
Raw Normal View History

2024-09-06 06:30:31 +00:00
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
class Constants {
//static const Color bgcolor = Color.fromARGB(255, 246, 248, 252);
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 String domainUrl = "http://192.0.0.2:8007/api/method/";
static const String domainUrl = "http://192.168.2.109:8007/api/method/";
//192.0.0.2:8007 - iphone
// 192.168.2.109:8007 - office
static const String file = '''
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});
}