Commit a3882747 authored by Sai Srinivas's avatar Sai Srinivas
Browse files

First commit after setup

parent a2b314a9
import 'package:flutter/material.dart';
import 'package:flutter_svg/flutter_svg.dart';
import 'package:gen_rentals/Screens/authScreen/OTP_Screen.dart';
import 'package:provider/provider.dart';
import '../../Notifier/RentalContactProvider .dart';
import '../../Utility/AdvancedSnackbar.dart';
import '../../Utility/CustomSnackbar.dart';
class LoginScreen extends StatefulWidget {
const LoginScreen({super.key});
@override
State<LoginScreen> createState() => _LoginScreenState();
}
class _LoginScreenState extends State<LoginScreen> {
final TextEditingController _phoneController = TextEditingController();
bool _isValid = false;
bool _isDirty = false;
void _validatePhone(String value) {
setState(() {
_isDirty = true;
_isValid = RegExp(r'^[0-9]{10}$').hasMatch(value);
});
}
Future<void> _login(BuildContext context) async {
final rentalProvider =
Provider.of<RentalContactProvider>(context, listen: false);
final mob = _phoneController.text.trim();
await rentalProvider.fetchRentalContactData(
context,
"4d21382d9e1c4d6e0b7c426d53d89b6b7d48078877f185289092e6fa13bac4b11d417d37738b20b34151b8e638625b3ec013",
"5",
mob,
);
// ✅ Handle response
if (rentalProvider.rentalContact != null &&
rentalProvider.rentalContact!.error == 0) {
AnimatedSnackBar.success(
context: context,
title: "Login Success",
message: "${rentalProvider.rentalContact?.message} OTP: ${rentalProvider.rentalContact?.otp}" ?? "Login Success",
);
// Navigate to OTP screen
Navigator.pushReplacement(
context,
PageRouteBuilder(
pageBuilder: (_, __, ___) => OtpScreen(
mob: mob,
otp: rentalProvider.rentalContact!.otp ?? 0,
),
transitionsBuilder: (_, animation, __, child) {
return FadeTransition(opacity: animation, child: child);
},
transitionDuration: const Duration(milliseconds: 600),
),
);
} else {
CustomSnackBar.showWarning(
context: context,
message: rentalProvider.rentalContact?.message ??
rentalProvider.errorMessage ??
"Login failed",
title: "Login Status",
);
}
}
@override
Widget build(BuildContext context) {
final rentalProvider = Provider.of<RentalContactProvider>(context);
return Scaffold(
resizeToAvoidBottomInset: false, // prevents background image resize
body: Stack(
children: [
// 🏙️ Fixed background image
Positioned.fill(
child: Image.asset(
'assets/images/background.jpg',
fit: BoxFit.cover,
),
),
// 🌑 Dark overlay
Positioned.fill(
child: Container(color: Colors.black.withOpacity(0.4)),
),
// 📦 Foreground content with gradient
Align(
alignment: Alignment.bottomCenter,
child: AnimatedPadding(
duration: const Duration(milliseconds: 250),
curve: Curves.easeOut,
padding: EdgeInsets.only(
bottom: MediaQuery.of(context).viewInsets.bottom,
),
child: Container(
width: double.infinity,
decoration: const BoxDecoration(
gradient: LinearGradient(
begin: Alignment.topCenter,
end: Alignment.bottomCenter,
colors: [
Colors.transparent,
Colors.black54,
Colors.black87,
],
),
),
padding:
const EdgeInsets.symmetric(horizontal: 22, vertical: 20),
child: Column(
mainAxisSize: MainAxisSize.min,
children: [
const SizedBox(height: 60),
const Text(
"Rental Power,\nManaged in a Tap",
textAlign: TextAlign.center,
style: TextStyle(
color: Colors.white,
fontSize: 35,
fontWeight: FontWeight.w400,
height: 1.3,
),
),
const SizedBox(height: 34),
// 🏷️ Label above input
const Align(
alignment: Alignment.centerLeft,
child: Padding(
padding: EdgeInsets.only(left: 12),
child: Text(
"Enter Registered Mobile No.",
style: TextStyle(
color: Colors.white,
fontSize: 14,
fontWeight: FontWeight.w400,
),
),
),
),
const SizedBox(height: 8),
// 📱 Mobile Input
TextField(
controller: _phoneController,
keyboardType: TextInputType.phone,
onChanged: _validatePhone,
style: const TextStyle(color: Colors.black),
decoration: InputDecoration(
hintText: "Enter Mobile No.",
hintStyle: const TextStyle(color: Colors.grey),
filled: true,
fillColor: Colors.white,
contentPadding: const EdgeInsets.symmetric(
vertical: 16, horizontal: 20),
enabledBorder: OutlineInputBorder(
borderRadius: BorderRadius.circular(30),
borderSide: BorderSide(
color: Colors.white.withOpacity(0.5),
width: 1,
),
),
focusedBorder: OutlineInputBorder(
borderRadius: BorderRadius.circular(30),
borderSide:
const BorderSide(color: Colors.blue, width: 2),
),
),
),
// ⚠️ Validation message
if (_isDirty && !_isValid)
const Padding(
padding: EdgeInsets.only(left: 12, top: 8),
child: Align(
alignment: Alignment.centerLeft,
child: Text(
"*Invalid number. Enter your registered number.",
style: TextStyle(
color: Colors.redAccent,
fontSize: 12,
),
),
),
),
const SizedBox(height: 20),
// 🔘 Continue Button
SizedBox(
width: double.infinity,
child: ElevatedButton(
onPressed: (!_isValid || rentalProvider.isLoading)
? null
: () => _login(context),
style: ElevatedButton.styleFrom(
backgroundColor: _isValid
? const Color(0xFF008CDE)
: const Color(0xFF266E99),
foregroundColor: Colors.white,
disabledBackgroundColor:
const Color(0xFF266E99),
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(30),
),
padding:
const EdgeInsets.symmetric(vertical: 16),
),
child: rentalProvider.isLoading
? const SizedBox(
height: 22,
width: 22,
child: CircularProgressIndicator(
strokeWidth: 2,
valueColor:
AlwaysStoppedAnimation<Color>(
Colors.white),
),
)
: Padding(
padding: const EdgeInsets.symmetric(
horizontal: 22),
child: Row(
mainAxisAlignment:
MainAxisAlignment.spaceBetween,
children: [
Text(
"Continue",
style: TextStyle(
color: _isValid
? const Color(0xFFFFFFFF)
: const Color(0xFF03456C),
fontSize: 16,
),
),
SvgPicture.asset(
"assets/svg/continue_ic.svg",
color: _isValid
? const Color(0xFFFFFFFF)
: const Color(0xFF03456C),
height: 25,
width: 25,
),
],
),
),
),
),
const SizedBox(height: 40),
],
),
),
),
),
],
),
);
}
}
// forgot_password_screen.dart
import 'package:flutter/material.dart';
import 'package:flutter_svg/flutter_svg.dart';
class ForgotPasswordScreen extends StatelessWidget {
const ForgotPasswordScreen({super.key});
@override
Widget build(BuildContext context) {
final emailController = TextEditingController();
return Scaffold(
backgroundColor: const Color(0xFFF5F8FC),
body: Center(
child: SingleChildScrollView(
padding: const EdgeInsets.all(16),
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: [
SvgPicture.network(
"https://genrentals.in/assets/img/logo-black.svg",
height: 70,
),
const SizedBox(height: 20),
const Text(
"Forgot Password",
style: TextStyle(
fontSize: 24,
fontWeight: FontWeight.w600,
color: Colors.black87,
),
),
const SizedBox(height: 20),
Container(
padding: const EdgeInsets.all(20),
decoration: BoxDecoration(
color: Colors.white,
borderRadius: BorderRadius.circular(8),
boxShadow: [
BoxShadow(
color: Colors.black12,
blurRadius: 6,
offset: Offset(0, 2),
)
],
),
child: Column(
children: [
TextFormField(
controller: emailController,
decoration: InputDecoration(
labelText: "Email Address",
border: OutlineInputBorder(
borderRadius: BorderRadius.circular(6),
),
),
),
const SizedBox(height: 16),
SizedBox(
width: double.infinity,
height: 45,
child: ElevatedButton(
style: ElevatedButton.styleFrom(
backgroundColor: const Color(0xFF2563EB),
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(6),
),
),
onPressed: () {
ScaffoldMessenger.of(context).showSnackBar(
const SnackBar(
content:
Text("Password reset link sent to email")),
);
},
child: const Text(
"Confirm",
style: TextStyle(color: Colors.white),
),
),
)
],
),
),
],
),
),
),
);
}
}
import 'package:flutter/material.dart';
import 'package:provider/provider.dart';
import 'package:flutter_svg/flutter_svg.dart';
import '../Notifier/RentalContactProvider .dart';
class MainScreen extends StatefulWidget {
RentalContactProvider provider;
MainScreen({super.key, required this.provider});
@override
State<MainScreen> createState() => _MainScreenState();
}
class _MainScreenState extends State<MainScreen> with SingleTickerProviderStateMixin {
int _selectedIndex = 0;
late AnimationController _animationController;
late Animation<double> _fadeAnimation;
late Animation<double> _scaleAnimation;
final List<String> _menuTitles = [
"Dashboard",
"View Orders",
"View Ledger",
"Make Payment",
"View Tickets",
];
final List<IconData> _menuIcons = [
Icons.dashboard_rounded,
Icons.shopping_bag_rounded,
Icons.account_balance_wallet_rounded,
Icons.payment_rounded,
Icons.support_agent_rounded,
];
final List<Color> _menuColors = [
const Color(0xFF26BAE7),
const Color(0xFF4CAF50),
const Color(0xFFFF9800),
const Color(0xFF9C27B0),
const Color(0xFFF44336),
];
@override
void initState() {
super.initState();
_animationController = AnimationController(
vsync: this,
duration: const Duration(milliseconds: 800),
);
_fadeAnimation = Tween<double>(begin: 0.0, end: 1.0).animate(
CurvedAnimation(parent: _animationController, curve: Curves.easeInOut),
);
_scaleAnimation = Tween<double>(begin: 0.95, end: 1.0).animate(
CurvedAnimation(parent: _animationController, curve: Curves.elasticOut),
);
_animationController.forward();
}
@override
void dispose() {
_animationController.dispose();
super.dispose();
}
@override
Widget build(BuildContext context) {
final rentalProvider = Provider.of<RentalContactProvider>(context);
final contact = rentalProvider.rentalContact;
return Scaffold(
backgroundColor: const Color(0xFFF5F8FC),
appBar: AppBar(
title: AnimatedSwitcher(
duration: const Duration(milliseconds: 300),
child: Text(
_menuTitles[_selectedIndex],
key: ValueKey(_selectedIndex),
style: const TextStyle(
fontSize: 20,
fontWeight: FontWeight.w700,
color: Colors.white,
),
),
),
backgroundColor: const Color(0xFF273172),
elevation: 0,
iconTheme: const IconThemeData(color: Colors.white),
actions: [
IconButton(
icon: const Icon(Icons.notifications_none_rounded),
onPressed: () {},
),
const SizedBox(width: 8),
],
),
drawer: _buildDrawer(contact),
body: AnimatedSwitcher(
duration: const Duration(milliseconds: 500),
child: _buildBody(contact),
),
);
}
Widget _buildDrawer(rentalContact) {
return Drawer(
width: 280,
child: Container(
decoration: const BoxDecoration(
gradient: LinearGradient(
begin: Alignment.topLeft,
end: Alignment.bottomRight,
colors: [
Color(0xFF273172),
Color(0xFF26BAE7),
],
),
),
child: Column(
children: [
// Header
Container(
padding: const EdgeInsets.all(24),
decoration: BoxDecoration(
color: Colors.white.withOpacity(0.1),
borderRadius: const BorderRadius.only(
bottomLeft: Radius.circular(20),
bottomRight: Radius.circular(20),
),
),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
// Logo and App Name
Row(
children: [
Container(
padding: const EdgeInsets.all(1),
decoration: BoxDecoration(
color: Colors.white,
borderRadius: BorderRadius.circular(16),
boxShadow: [
BoxShadow(
color: Colors.black.withOpacity(0.1),
blurRadius: 10,
),
],
),
// child: SvgPicture.network(
// "https://genrentals.in/assets/img/logo-black.svg",
// height: 28,
// ),
),
const SizedBox(width: 12),
const Text(
"Gen Rentals",
style: TextStyle(
color: Colors.white,
fontSize: 20,
fontWeight: FontWeight.w700,
),
),
],
),
const SizedBox(height: 20),
// User Info
Container(
padding: const EdgeInsets.all(16),
decoration: BoxDecoration(
color: Colors.white.withOpacity(0.1),
borderRadius: BorderRadius.circular(12),
border: Border.all(color: Colors.white.withOpacity(0.2)),
),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(
"Branch Name",
style: const TextStyle(
color: Colors.white,
fontSize: 16,
fontWeight: FontWeight.w600,
),
),
const SizedBox(height: 4),
Text(
"Branch Address",
style: TextStyle(
color: Colors.white.withOpacity(0.8),
fontSize: 12,
),
maxLines: 2,
overflow: TextOverflow.ellipsis,
),
const SizedBox(height: 8),
Container(
padding: const EdgeInsets.symmetric(horizontal: 12, vertical: 6),
decoration: BoxDecoration(
color: Colors.white.withOpacity(0.2),
borderRadius: BorderRadius.circular(8),
),
child: const Text(
"Balance: ₹ 0",
style: TextStyle(
color: Colors.white,
fontSize: 12,
fontWeight: FontWeight.w600,
),
),
),
],
),
),
],
),
),
const SizedBox(height: 8),
// Menu items
Expanded(
child: Container(
decoration: const BoxDecoration(
color: Colors.white,
borderRadius: BorderRadius.only(
topLeft: Radius.circular(20),
topRight: Radius.circular(20),
),
),
child: ListView(
padding: const EdgeInsets.all(16),
children: [
...List.generate(_menuTitles.length, (index) =>
_buildDrawerItem(index, _menuTitles[index], _menuIcons[index], _menuColors[index])
),
const SizedBox(height: 16),
const Divider(height: 1),
const SizedBox(height: 16),
_buildDrawerItem(-1, "Logout", Icons.logout_rounded, const Color(0xFFF44336)),
],
),
),
),
],
),
),
);
}
Widget _buildDrawerItem(int index, String title, IconData icon, Color color) {
return Container(
margin: const EdgeInsets.only(bottom: 8),
child: Material(
color: Colors.transparent,
child: InkWell(
borderRadius: BorderRadius.circular(12),
onTap: () {
if (index == -1) {
// Logout
Navigator.pushReplacementNamed(context, "/login");
} else {
setState(() => _selectedIndex = index);
Navigator.pop(context); // close drawer
}
},
child: Container(
padding: const EdgeInsets.all(16),
decoration: BoxDecoration(
color: _selectedIndex == index ? color.withOpacity(0.1) : Colors.transparent,
borderRadius: BorderRadius.circular(12),
border: _selectedIndex == index ? Border.all(color: color.withOpacity(0.3)) : null,
),
child: Row(
children: [
Container(
padding: const EdgeInsets.all(8),
decoration: BoxDecoration(
color: color.withOpacity(0.1),
shape: BoxShape.circle,
),
child: Icon(
icon,
color: color,
size: 20,
),
),
const SizedBox(width: 16),
Expanded(
child: Text(
title,
style: TextStyle(
fontSize: 16,
fontWeight: _selectedIndex == index ? FontWeight.w600 : FontWeight.w500,
color: _selectedIndex == index ? color : Colors.grey.shade700,
),
),
),
if (_selectedIndex == index)
Container(
width: 8,
height: 8,
decoration: BoxDecoration(
color: color,
shape: BoxShape.circle,
),
),
],
),
),
),
),
);
}
Widget _buildBody(rentalContact) {
return AnimatedBuilder(
animation: _animationController,
builder: (context, child) {
return Opacity(
opacity: _fadeAnimation.value,
child: Transform.scale(
scale: _scaleAnimation.value,
child: _getCurrentScreen(rentalContact),
),
);
},
);
}
Widget _getCurrentScreen(rentalContact) {
switch (_selectedIndex) {
case 0:
return _buildDashboard(rentalContact);
case 1:
return _buildPlaceholderScreen("View Orders", Icons.shopping_bag_rounded);
case 2:
return _buildPlaceholderScreen("View Ledger", Icons.account_balance_wallet_rounded);
case 3:
return _buildPlaceholderScreen("Make Payment", Icons.payment_rounded);
case 4:
return _buildPlaceholderScreen("View Tickets", Icons.support_agent_rounded);
default:
return _buildDashboard(rentalContact);
}
}
Widget _buildDashboard(rentalContact) {
return SingleChildScrollView(
padding: const EdgeInsets.all(20),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
// Welcome Section
Container(
padding: const EdgeInsets.all(24),
decoration: BoxDecoration(
gradient: const LinearGradient(
colors: [Color(0xFF273172), Color(0xFF26BAE7)],
begin: Alignment.topLeft,
end: Alignment.bottomRight,
),
borderRadius: BorderRadius.circular(20),
boxShadow: [
BoxShadow(
color: const Color(0xFF273172).withOpacity(0.3),
blurRadius: 20,
offset: const Offset(0, 10),
),
],
),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
const Text(
"Welcome Back!",
style: TextStyle(
fontSize: 24,
fontWeight: FontWeight.w700,
color: Colors.white,
),
),
const SizedBox(height: 8),
Text(
"Here's your dashboard overview",
style: TextStyle(
fontSize: 16,
color: Colors.white.withOpacity(0.8),
),
),
const SizedBox(height: 20),
_buildInfoRow(Icons.phone_android_rounded, "Mobile", widget.provider.rentalContact!.mob.toString()),
_buildInfoRow(Icons.business_rounded, "Office", "N/A"),
_buildInfoRow(Icons.account_balance_wallet_rounded, "Balance", "₹ 0"),
],
),
),
const SizedBox(height: 24),
// Quick Stats
const Text(
"Quick Stats",
style: TextStyle(
fontSize: 20,
fontWeight: FontWeight.w700,
color: Color(0xFF273172),
),
),
const SizedBox(height: 16),
GridView.count(
shrinkWrap: true,
physics: const NeverScrollableScrollPhysics(),
crossAxisCount: 2,
crossAxisSpacing: 16,
mainAxisSpacing: 16,
children: [
_buildStatCard("Active Orders", "12", Icons.shopping_bag_rounded, const Color(0xFF4CAF50)),
_buildStatCard("Pending Payments", "5", Icons.payment_rounded, const Color(0xFFFF9800)),
_buildStatCard("Open Tickets", "3", Icons.support_agent_rounded, const Color(0xFFF44336)),
_buildStatCard("Total Balance", "₹0", Icons.account_balance_wallet_rounded, const Color(0xFF26BAE7)),
],
),
const SizedBox(height: 24),
// Recent Activities
Container(
padding: const EdgeInsets.all(20),
decoration: BoxDecoration(
color: Colors.white,
borderRadius: BorderRadius.circular(16),
boxShadow: [
BoxShadow(
color: Colors.black.withOpacity(0.05),
blurRadius: 10,
offset: const Offset(0, 5),
),
],
),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
const Text(
"Recent Activities",
style: TextStyle(
fontSize: 18,
fontWeight: FontWeight.w600,
color: Color(0xFF273172),
),
),
const SizedBox(height: 16),
_buildActivityItem("New order placed", "2 hours ago", Icons.shopping_bag_rounded),
_buildActivityItem("Payment received", "1 day ago", Icons.payment_rounded),
_buildActivityItem("Ticket resolved", "2 days ago", Icons.support_agent_rounded),
],
),
),
],
),
);
}
Widget _buildInfoRow(IconData icon, String label, String value) {
return Padding(
padding: const EdgeInsets.symmetric(vertical: 6),
child: Row(
children: [
Icon(icon, color: Colors.white.withOpacity(0.7), size: 18),
const SizedBox(width: 12),
Text(
"$label: ",
style: TextStyle(
color: Colors.white.withOpacity(0.7),
fontSize: 14,
),
),
Text(
value,
style: const TextStyle(
color: Colors.white,
fontSize: 14,
fontWeight: FontWeight.w600,
),
),
],
),
);
}
Widget _buildStatCard(String title, String value, IconData icon, Color color) {
return Container(
padding: const EdgeInsets.all(16),
decoration: BoxDecoration(
color: Colors.white,
borderRadius: BorderRadius.circular(16),
boxShadow: [
BoxShadow(
color: Colors.black.withOpacity(0.05),
blurRadius: 10,
offset: const Offset(0, 5),
),
],
),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Container(
padding: const EdgeInsets.all(8),
decoration: BoxDecoration(
color: color.withOpacity(0.1),
shape: BoxShape.circle,
),
child: Icon(icon, color: color, size: 20),
),
const SizedBox(height: 12),
Text(
value,
style: TextStyle(
fontSize: 20,
fontWeight: FontWeight.w700,
color: color,
),
),
const SizedBox(height: 4),
Text(
title,
style: TextStyle(
fontSize: 12,
color: Colors.grey.shade600,
),
),
],
),
);
}
Widget _buildActivityItem(String title, String time, IconData icon) {
return Container(
margin: const EdgeInsets.only(bottom: 12),
padding: const EdgeInsets.all(12),
decoration: BoxDecoration(
color: Colors.grey.shade50,
borderRadius: BorderRadius.circular(12),
),
child: Row(
children: [
Container(
padding: const EdgeInsets.all(6),
decoration: BoxDecoration(
color: const Color(0xFF26BAE7).withOpacity(0.1),
shape: BoxShape.circle,
),
child: Icon(icon, color: const Color(0xFF26BAE7), size: 16),
),
const SizedBox(width: 12),
Expanded(
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(
title,
style: const TextStyle(
fontSize: 14,
fontWeight: FontWeight.w500,
),
),
Text(
time,
style: TextStyle(
fontSize: 12,
color: Colors.grey.shade500,
),
),
],
),
),
],
),
);
}
Widget _buildPlaceholderScreen(String title, IconData icon) {
return Center(
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: [
Container(
padding: const EdgeInsets.all(24),
decoration: BoxDecoration(
color: const Color(0xFF26BAE7).withOpacity(0.1),
shape: BoxShape.circle,
),
child: Icon(
icon,
size: 64,
color: const Color(0xFF26BAE7),
),
),
const SizedBox(height: 24),
Text(
title,
style: const TextStyle(
fontSize: 24,
fontWeight: FontWeight.w600,
color: Color(0xFF273172),
),
),
const SizedBox(height: 12),
Text(
"This feature is coming soon",
style: TextStyle(
fontSize: 16,
color: Colors.grey.shade600,
),
),
],
),
);
}
}
\ No newline at end of file
/// base Url of api
const baseUrl = "https://erp.gengroup.in/ci/app/Inventory/";
/// tokens url
const addFcmTokenUrl = "${baseUrl}add_fcm_token";
/// payments and bills
const addPaymentUrl = "${baseUrl}add_payment";
const rentalPaymentDetailsUrl = "${baseUrl}rental_payment_details";
const balanceUrl = "${baseUrl}balance";
const billDetailsUrl = "${baseUrl}bill_details";
const billListUrl = "${baseUrl}bill_list";
const billProductUrl = "${baseUrl}bill_product";
/// info
const checkInOutSubmitUrl = "${baseUrl}check_in_out_submit";
const rentalContactUrl = "${baseUrl}rental_contact";
const getRentalAccInfoUrl = "${baseUrl}get_rental_acc_info";
/// order
const orderDetailsBillUrl = "${baseUrl}order_details_bill";
const orderDetailsMainUrl = "${baseUrl}order_details_main";
const orderDetailsProductUrl = "${baseUrl}order_details_product";
const orderListUrl = "${baseUrl}order_list";
const tagOrderUrl = "${baseUrl}tag_order";
/// tickets
const raiseTicketUrl = "${baseUrl}raise_ticket";
const ticketChatUrl = "${baseUrl}ticket_chat";
const ticketChatDisplayUrl = "${baseUrl}ticket_chat_display";
const ticketCUrl = "${baseUrl}ticket_c";
const ticketListUrl = "${baseUrl}ticket_list";
\ No newline at end of file
import 'dart:convert';
import 'package:flutter/foundation.dart';
import 'package:gen_rentals/Models/CommonResponse.dart';
import 'package:gen_rentals/Models/TicketChatDisplayResponse.dart';
import 'package:gen_rentals/Models/billListResponse.dart';
import 'package:gen_rentals/Models/billProductResponse.dart';
import 'package:gen_rentals/Models/orderDetailsBillResponse.dart';
import 'package:gen_rentals/Models/orderDetailsMainResponse.dart';
import 'package:gen_rentals/Models/orderDetailsProductResponse.dart';
import 'package:gen_rentals/Models/orderListResponse.dart';
import 'package:gen_rentals/Models/ticketListResponse.dart';
import 'package:gen_rentals/Notifier/billDetailsResponse.dart';
import '../Models/RentalPaymentDetailsResponse.dart';
import '../Models/rentalAccountResponse.dart';
import '../Models/rentalContactResponse.dart';
import 'api_URLs.dart';
import 'api_post_request.dart';
class ApiCalling {
/// Fetch rental contact by mobile number
static Future<RentalContactResponse?> fetchRentalContactApi(
String sessionId,
String empId,
String mob,
) async {
debugPrint("############################### Api calling ");
try {
Map<String, String> data = {
"session_id": sessionId,
"emp_id": empId,
"mob": mob,
};
final res = await post(data, rentalContactUrl, {});
if (res != null) {
return RentalContactResponse.fromJson(jsonDecode(res.body));
} else {
debugPrint("Null Response");
return null;
}
} catch (e) {
debugPrint("❌ API Error: $e");
return null;
}
}
/// Fetch Rental Account Info
static Future<RentalAccountResponse?> fetchRentalAccountInfoApi(
String sessionId,
String empId,
) async {
try {
Map<String, String> data = {
"session_id": sessionId,
"emp_id": empId,
};
final res = await post(data, getRentalAccInfoUrl, {});
if (res != null) {
return RentalAccountResponse.fromJson(jsonDecode(res.body));
} else {
debugPrint("Null Response");
return null;
}
} catch (e) {
debugPrint("❌ API Error (fetchRentalAccountInfo): $e");
return null;
}
}
/// Fetch Bill List
static Future<BillListResponse?> fetchBillListApi(
String sessionId,
String empId,
String accId,
) async {
try {
Map<String, String> data = {
"session_id": sessionId,
"emp_id": empId,
"acc_id": accId,
};
final res = await post(data, billListUrl, {});
if (res != null) {
return BillListResponse.fromJson(jsonDecode(res.body));
} else {
debugPrint("Null Response");
return null;
}
} catch (e) {
debugPrint("❌ API Error (fetchBillList): $e");
return null;
}
}
/// Fetch Bill Details
static Future<BillDetailsResponse?> fetchBillDetailsApi(
String sessionId,
String empId,
String billId,
) async {
try {
Map<String, String> data = {
"session_id": sessionId,
"emp_id": empId,
"bill_id": billId,
};
final res = await post(data, billDetailsUrl, {});
if (res != null) {
return BillDetailsResponse.fromJson(jsonDecode(res.body));
} else {
debugPrint("Null Response");
return null;
}
} catch (e) {
debugPrint("❌ API Error (fetchBillDetails): $e");
return null;
}
}
/// Fetch Bill Product
static Future<BillProductResponse?> fetchBillProductApi(
String sessionId,
String empId,
String accId,
) async {
try {
Map<String, String> data = {
"session_id": sessionId,
"emp_id": empId,
"acc_id": accId,
};
final res = await post(data, billProductUrl, {});
if (res != null) {
return BillProductResponse.fromJson(jsonDecode(res.body));
} else {
debugPrint("Null Response");
return null;
}
} catch (e) {
debugPrint("❌ API Error (fetchBillProduct): $e");
return null;
}
}
/// Fetch Order Detail Bill
static Future<OrderDetailsBillResponse?> fetchOrderDetailBillApi(
String sessionId,
String empId,
String orderId,
) async {
try {
Map<String, String> data = {
"session_id": sessionId,
"emp_id": empId,
"ord_id": orderId,
};
final res = await post(data, orderDetailsBillUrl, {});
if (res != null) {
return OrderDetailsBillResponse.fromJson(jsonDecode(res.body));
} else {
debugPrint("Null Response");
return null;
}
} catch (e) {
debugPrint("❌ API Error (fetchOrderDetailBill): $e");
return null;
}
}
/// Fetch Order List
static Future<OrderListResponse?> fetchOrderListApi(
String sessionId,
String empId,
String accId,
) async {
try {
Map<String, String> data = {
"session_id": sessionId,
"emp_id": empId,
"acc_id": accId,
};
final res = await post(data, orderListUrl, {});
if (res != null) {
return OrderListResponse.fromJson(jsonDecode(res.body));
} else {
debugPrint("Null Response");
return null;
}
} catch (e) {
debugPrint("❌ API Error (fetchOrderList): $e");
return null;
}
}
/// Fetch Order Details Product
static Future<OrderDetailsProductResponse?> fetchOrderDetailProductApi(
String sessionId,
String empId,
String orderId,
) async {
try {
Map<String, String> data = {
"session_id": sessionId,
"emp_id": empId,
"order_id": orderId,
};
final res = await post(data, orderDetailsProductUrl, {});
if (res != null) {
return OrderDetailsProductResponse.fromJson(jsonDecode(res.body));
} else {
debugPrint("Null Response");
return null;
}
} catch (e) {
debugPrint("❌ API Error (fetchOrderDetailProduct): $e");
return null;
}
}
/// Fetch Order Details Main
static Future<OrderDetailsMainResponse?> fetchOrderDetailMainApi(
String sessionId,
String empId,
String orderId,
) async {
try {
Map<String, String> data = {
"session_id": sessionId,
"emp_id": empId,
"ord_id": orderId,
};
final res = await post(data, orderDetailsMainUrl, {});
if (res != null) {
return OrderDetailsMainResponse.fromJson(jsonDecode(res.body));
} else {
debugPrint("Null Response");
return null;
}
} catch (e) {
debugPrint("❌ API Error (fetchOrderDetailMain): $e");
return null;
}
}
/// Fetch Rental Payment Details
static Future<RentalPaymentDetailsResponse?> fetchRentalPaymentDetailsApi(
String sessionId,
String empId,
String billId,
) async {
try {
Map<String, String> data = {
"session_id": sessionId,
"emp_id": empId,
"bill_id": billId,
};
final res = await post(data, rentalPaymentDetailsUrl, {});
if (res != null) {
return RentalPaymentDetailsResponse.fromJson(jsonDecode(res.body));
} else {
debugPrint("Null Response");
return null;
}
} catch (e) {
debugPrint("❌ API Error (fetchRentalPaymentDetails): $e");
return null;
}
}
/// Fetch Ticket List
static Future<TicketListResponse?> fetchTicketListApi(
String sessionId,
String empId,
String accId,
) async {
try {
Map<String, String> data = {
"session_id": sessionId,
"emp_id": empId,
"acc_id": accId,
};
final res = await post(data, ticketListUrl, {});
if (res != null) {
return TicketListResponse.fromJson(jsonDecode(res.body));
} else {
debugPrint("Null Response");
return null;
}
} catch (e) {
debugPrint("❌ API Error (fetchTicketList): $e");
return null;
}
}
/// Fetch Ticket Chat Display
static Future<TicketChatDisplayResponse?> fetchTicketChatDisplayApi(
String sessionId,
String empId,
String ticId,
) async {
try {
Map<String, String> data = {
"session_id": sessionId,
"emp_id": empId,
"tic_id": ticId,
};
final res = await post(data, ticketChatDisplayUrl, {});
if (res != null) {
return TicketChatDisplayResponse.fromJson(jsonDecode(res.body));
} else {
debugPrint("Null Response");
return null;
}
} catch (e) {
debugPrint("❌ API Error (fetchTicketChatDisplay): $e");
return null;
}
}
/// Fetch Tag Order
static Future<CommonResponse?> fetchTagOrderApi(
String sessionId,
String empId,
) async {
try {
Map<String, String> data = {
"session_id": sessionId,
"emp_id": empId,
};
final res = await post(data, tagOrderUrl, {});
if (res != null) {
return CommonResponse.fromJson(jsonDecode(res.body));
} else {
debugPrint("Null Response");
return null;
}
} catch (e) {
debugPrint("❌ API Error (fetchTagOrder): $e");
return null;
}
}
/// Fetch Raise Ticket
static Future<CommonResponse?> fetchRaiseTicketApi(
String sessionId,
String empId,
) async {
try {
Map<String, String> data = {
"session_id": sessionId,
"emp_id": empId,
};
final res = await post(data, raiseTicketUrl, {});
if (res != null) {
return CommonResponse.fromJson(jsonDecode(res.body));
} else {
debugPrint("Null Response");
return null;
}
} catch (e) {
debugPrint("❌ API Error (raise Ticket): $e");
return null;
}
}
/// Fetch CheckInOut Submit
static Future<CommonResponse?> fetchCheckInOutSubmitApi(
String sessionId,
String empId,
) async {
try {
Map<String, String> data = {
"session_id": sessionId,
"emp_id": empId,
};
final res = await post(data, checkInOutSubmitUrl, {});
if (res != null) {
return CommonResponse.fromJson(jsonDecode(res.body));
} else {
debugPrint("Null Response");
return null;
}
} catch (e) {
debugPrint("❌ API Error (CheckInOutSubmit): $e");
return null;
}
}
/// Fetch Balance
static Future<CommonResponse?> fetchBalanceApi(
String sessionId,
String empId,
String accId,
) async {
try {
Map<String, String> data = {
"session_id": sessionId,
"emp_id": empId,
"acc_id": accId,
};
final res = await post(data, balanceUrl, {});
if (res != null) {
return CommonResponse.fromJson(jsonDecode(res.body));
} else {
debugPrint("Null Response");
return null;
}
} catch (e) {
debugPrint("❌ API Error (fetch Balance): $e");
return null;
}
}
/// Add Payment
static Future<CommonResponse?> fetchAddPaymentApi(
String sessionId,
String empId,
String amount,
String orderId,
) async {
try {
Map<String, String> data = {
"session_id": sessionId,
"emp_id": empId,
"amount": amount,
"order_id": orderId,
};
final res = await post(data, addPaymentUrl, {});
if (res != null) {
return CommonResponse.fromJson(jsonDecode(res.body));
} else {
debugPrint("Null Response");
return null;
}
} catch (e) {
debugPrint("❌ API Error (AddPaymentApi): $e");
return null;
}
}
/// Add Fcm Token
static Future<CommonResponse?> fetchAddFcmTokenApi(
String sessionId,
String empId,
String amount,
String orderId,
) async {
try {
Map<String, String> data = {
"session_id": sessionId,
"emp_id": empId,
"amount": amount,
"order_id": orderId,
};
final res = await post(data, addFcmTokenUrl, {});
if (res != null) {
return CommonResponse.fromJson(jsonDecode(res.body));
} else {
debugPrint("Null Response");
return null;
}
} catch (e) {
debugPrint("❌ API Error (fetch Add Payment Api): $e");
return null;
}
}
}
import 'dart:io';
import 'package:flutter/cupertino.dart';
import 'package:http/http.dart' as http;
Future<http.Response?> post(
Map<String, dynamic> Body,
apiUrl,
Map<String, String> Headers,
) async {
http.Response? response;
try {
response = await http.post(Uri.parse(apiUrl), headers: Headers, body: Body);
return response;
} on Exception catch (e, s) {
print(e);
print(s);
}
return response;
}
Future<http.Response?> get(apiUrl, Map<String, String> Headers) async {
http.Response? response;
try {
response = await http.get(Uri.parse(apiUrl), headers: Headers);
return response;
} on Exception catch (e, s) {
print(e);
print(s);
}
return response;
}
Future<String?> postImage(
Map<String, String> body,
String urlLink,
Map<String, String> headers,
File image,
) async {
try {
var req = http.MultipartRequest('POST', Uri.parse(urlLink));
req.headers.addAll(headers);
req.files.add(
await http.MultipartFile.fromPath('check_in_pic', image.path),
);
req.fields.addAll(body);
var res = await req.send();
final resBody = await res.stream.bytesToString();
if (res.statusCode >= 200 && res.statusCode < 300) {
print("**** $resBody .... $res");
return resBody;
} else {
print("error: ${res.reasonPhrase}");
return null;
}
} catch (e) {
debugPrint(e.toString());
return null;
}
}
Future<String?> postImage2(
Map<String, String> body,
Map<String, String> headers,
String urlLink,
File image,
) async {
try {
var req = http.MultipartRequest('POST', Uri.parse(urlLink));
req.headers.addAll(headers);
req.files.add(
await http.MultipartFile.fromPath('check_out_pic', image.path),
);
req.fields.addAll(body);
var res = await req.send();
final resBody = await res.stream.bytesToString();
if (res.statusCode >= 200 && res.statusCode < 300) {
print("**** $resBody .... $res");
return resBody;
} else {
print("error: ${res.reasonPhrase}");
return null;
}
} catch (e) {
debugPrint(e.toString());
return null;
}
}
Future<String?> postImage3(
Map<String, String> body,
Map<String, String> headers,
String urlLink,
File image,
) async {
try {
var req = http.MultipartRequest('POST', Uri.parse(urlLink));
req.headers.addAll(headers);
req.files.add(
await http.MultipartFile.fromPath('payment_proof', image.path),
);
req.fields.addAll(body);
var res = await req.send();
final resBody = await res.stream.bytesToString();
if (res.statusCode >= 200 && res.statusCode < 300) {
print("**** $resBody .... $res");
return resBody;
} else {
print("error: ${res.reasonPhrase}");
return null;
}
} catch (e) {
debugPrint(e.toString());
return null;
}
}
Future<String?> postImage4(
Map<String, String> body,
Map<String, String> headers,
String urlLink,
File image,
) async {
try {
var req = http.MultipartRequest('POST', Uri.parse(urlLink));
req.headers.addAll(headers);
req.files.add(await http.MultipartFile.fromPath('fsr_file', image.path));
req.fields.addAll(body);
var res = await req.send();
final resBody = await res.stream.bytesToString();
if (res.statusCode >= 200 && res.statusCode < 300) {
print("**** $resBody .... ${res.statusCode}");
return resBody;
} else {
print("error: ${res.reasonPhrase}");
return null;
}
} catch (e) {
debugPrint(e.toString());
return null;
}
}
Future<String?> postImageNew(
Map<String, String> body,
Map<String, String> headers,
String urlLink,
File image,
reqField,
) async {
try {
var req = http.MultipartRequest('POST', Uri.parse(urlLink));
req.headers.addAll(headers ?? {});
req.files.add(await http.MultipartFile.fromPath(reqField, image.path));
req.fields.addAll(body ?? {});
var res = await req.send();
final resBody = await res.stream.bytesToString();
if (res.statusCode >= 200 && res.statusCode < 300) {
print("**** $resBody .... ${res.statusCode}");
return resBody;
} else {
print("error: ${res.reasonPhrase}");
return null;
}
} catch (e) {
debugPrint(e.toString());
return null;
}
}
//travel_image
//hotel_image
//other_image
Future<String?> PostMultipleImagesNew(
Map<String, String> body,
String urlLink,
Map<String, String> headers,
List<http.MultipartFile> newList,
List<http.MultipartFile> newList1,
List<http.MultipartFile> newList2,
) async {
try {
var req = http.MultipartRequest('POST', Uri.parse(urlLink));
req.headers.addAll(headers);
req.files.addAll(newList);
req.files.addAll(newList1);
req.files.addAll(newList2);
req.fields.addAll(body);
var res = await req.send();
final resBody = await res.stream.bytesToString();
if (res.statusCode >= 200 && res.statusCode < 300) {
print("**** $resBody .... $res");
return resBody;
} else {
print("error: ${res.reasonPhrase}");
return null;
}
} catch (e) {
debugPrint(e.toString());
return null;
}
}
Future<String?> PostMultipleImagesNew2(
Map<String, String> body,
String urlLink,
Map<String, String> headers,
List<http.MultipartFile> newList,
List<http.MultipartFile> newList1,
) async {
try {
var req = http.MultipartRequest('POST', Uri.parse(urlLink));
req.headers.addAll(headers);
req.files.addAll(newList);
req.files.addAll(newList1);
req.fields.addAll(body);
var res = await req.send();
final resBody = await res.stream.bytesToString();
if (res.statusCode >= 200 && res.statusCode < 300) {
print("**** $resBody .... $res");
return resBody;
} else {
print("error: ${res.reasonPhrase}");
return null;
}
} catch (e) {
debugPrint(e.toString());
return null;
}
}
Future<String?> PostMultipleImages(
Map<String, String> body,
String urlLink,
Map<String, String> headers,
List<http.MultipartFile> newList,
) async {
try {
var req = http.MultipartRequest('POST', Uri.parse(urlLink));
req.headers.addAll(headers);
req.files.addAll(newList);
req.fields.addAll(body);
var res = await req.send();
final resBody = await res.stream.bytesToString();
if (res.statusCode >= 200 && res.statusCode < 300) {
print("**** $resBody .... $res");
return resBody;
} else {
print("error: ${res.reasonPhrase}");
return null;
}
} catch (e) {
debugPrint(e.toString());
return null;
}
}
// utils/animated_snackbar.dart
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
class AnimatedSnackBar {
static void show({
required BuildContext context,
required String message,
String? title,
IconData? icon,
Color backgroundColor = const Color(0xFF324563),
Duration duration = const Duration(seconds: 4),
SnackBarAction? action,
bool showProgressBar = false,
bool enableHaptic = true,
Curve animationCurve = Curves.elasticOut,
}) {
if (enableHaptic) {
HapticFeedback.lightImpact();
}
final overlay = Overlay.of(context);
// Create a variable to hold the overlay entry
late OverlayEntry overlayEntry;
overlayEntry = OverlayEntry(
builder: (context) => Positioned(
top: MediaQuery.of(context).viewPadding.top + 10,
left: 16,
right: 16,
child: Material(
color: Colors.transparent,
child: _AnimatedSnackBarContent(
message: message,
title: title,
icon: icon,
backgroundColor: backgroundColor,
duration: duration,
action: action,
showProgressBar: showProgressBar,
animationCurve: animationCurve,
onClose: () {
if (overlayEntry.mounted) {
overlayEntry.remove();
}
},
),
),
),
);
overlay.insert(overlayEntry);
// Auto remove after duration
Future.delayed(duration, () {
if (overlayEntry.mounted) {
overlayEntry.remove();
}
});
}
// Quick methods for different types
static void success({
required BuildContext context,
required String message,
String title = "Success",
Color backgroundColor = const Color(0xFF059669),
SnackBarAction? action,
bool enableHaptic = true,
}) {
show(
context: context,
message: message,
title: title,
icon: Icons.check_circle_rounded,
backgroundColor: backgroundColor,
action: action,
enableHaptic: enableHaptic,
);
}
static void error({
required BuildContext context,
required String message,
String title = "Error",
Color backgroundColor = const Color(0xFFDC2626),
SnackBarAction? action,
bool enableHaptic = true,
}) {
show(
context: context,
message: message,
title: title,
icon: Icons.error_outline_rounded,
backgroundColor: backgroundColor,
action: action,
enableHaptic: enableHaptic,
);
}
static void warning({
required BuildContext context,
required String message,
String title = "Warning",
Color backgroundColor = const Color(0xFFD97706),
SnackBarAction? action,
bool enableHaptic = true,
}) {
show(
context: context,
message: message,
title: title,
icon: Icons.warning_amber_rounded,
backgroundColor: backgroundColor,
action: action,
enableHaptic: enableHaptic,
);
}
static void info({
required BuildContext context,
required String message,
String title = "Info",
Color backgroundColor = const Color(0xFF2563EB),
SnackBarAction? action,
bool enableHaptic = true,
}) {
show(
context: context,
message: message,
title: title,
icon: Icons.info_outline_rounded,
backgroundColor: backgroundColor,
action: action,
enableHaptic: enableHaptic,
);
}
}
class _AnimatedSnackBarContent extends StatefulWidget {
final String message;
final String? title;
final IconData? icon;
final Color backgroundColor;
final Duration duration;
final SnackBarAction? action;
final bool showProgressBar;
final Curve animationCurve;
final VoidCallback onClose;
const _AnimatedSnackBarContent({
required this.message,
required this.title,
required this.icon,
required this.backgroundColor,
required this.duration,
required this.action,
required this.showProgressBar,
required this.animationCurve,
required this.onClose,
});
@override
_AnimatedSnackBarContentState createState() => _AnimatedSnackBarContentState();
}
class _AnimatedSnackBarContentState extends State<_AnimatedSnackBarContent>
with SingleTickerProviderStateMixin {
late AnimationController _controller;
late Animation<Offset> _slideAnimation;
late Animation<double> _scaleAnimation;
late Animation<double> _fadeAnimation;
@override
void initState() {
super.initState();
_controller = AnimationController(
duration: const Duration(milliseconds: 800),
vsync: this,
);
_slideAnimation = Tween<Offset>(
begin: const Offset(0, -2),
end: Offset.zero,
).animate(CurvedAnimation(
parent: _controller,
curve: widget.animationCurve,
));
_scaleAnimation = Tween<double>(
begin: 0.5,
end: 1.0,
).animate(CurvedAnimation(
parent: _controller,
curve: widget.animationCurve,
));
_fadeAnimation = Tween<double>(
begin: 0.0,
end: 1.0,
).animate(CurvedAnimation(
parent: _controller,
curve: Curves.easeInOut,
));
_controller.forward();
}
@override
void dispose() {
_controller.dispose();
super.dispose();
}
void _close() {
_controller.reverse().then((_) {
widget.onClose();
});
}
@override
Widget build(BuildContext context) {
return FadeTransition(
opacity: _fadeAnimation,
child: SlideTransition(
position: _slideAnimation,
child: ScaleTransition(
scale: _scaleAnimation,
child: Container(
padding: const EdgeInsets.all(18),
decoration: BoxDecoration(
color: widget.backgroundColor,
borderRadius: BorderRadius.circular(20),
boxShadow: [
BoxShadow(
color: widget.backgroundColor.withOpacity(0.4),
blurRadius: 25,
offset: const Offset(0, 10),
spreadRadius: 2,
),
BoxShadow(
color: Colors.black.withOpacity(0.15),
blurRadius: 8,
offset: const Offset(0, 4),
),
],
gradient: LinearGradient(
begin: Alignment.topLeft,
end: Alignment.bottomRight,
colors: [
widget.backgroundColor,
Color.alphaBlend(Colors.white.withOpacity(0.15), widget.backgroundColor),
],
),
border: Border.all(
color: Colors.white.withOpacity(0.2),
width: 1,
),
),
child: Row(
children: [
// Animated Icon Container
Container(
padding: const EdgeInsets.all(10),
decoration: BoxDecoration(
color: Colors.white.withOpacity(0.15),
shape: BoxShape.circle,
boxShadow: [
BoxShadow(
color: widget.backgroundColor.withOpacity(0.5),
blurRadius: 8,
spreadRadius: 1,
),
],
),
child: Icon(
widget.icon ?? Icons.notifications_none_rounded,
color: Colors.white,
size: 22,
),
),
const SizedBox(width: 16),
// Content Section
Expanded(
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
mainAxisSize: MainAxisSize.min,
children: [
if (widget.title != null) ...[
Text(
widget.title!,
style: const TextStyle(
color: Colors.white,
fontWeight: FontWeight.w700,
fontSize: 16,
letterSpacing: -0.3,
height: 1.2,
),
),
const SizedBox(height: 4),
],
Text(
widget.message,
style: TextStyle(
color: Colors.white.withOpacity(0.9),
fontSize: 14,
height: 1.4,
fontWeight: FontWeight.w400,
),
maxLines: 3,
overflow: TextOverflow.ellipsis,
),
// Action Button
if (widget.action != null) ...[
const SizedBox(height: 8),
Container(
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(8),
border: Border.all(
color: Colors.white.withOpacity(0.3),
),
),
child: TextButton(
onPressed: () {
widget.action!.onPressed();
_close();
},
style: TextButton.styleFrom(
padding: const EdgeInsets.symmetric(
horizontal: 12,
vertical: 4,
),
minimumSize: Size.zero,
tapTargetSize: MaterialTapTargetSize.shrinkWrap,
),
child: Text(
widget.action!.label,
style: const TextStyle(
color: Colors.white,
fontSize: 12,
fontWeight: FontWeight.w600,
),
),
),
),
],
],
),
),
const SizedBox(width: 12),
// Close Button
GestureDetector(
onTap: _close,
child: Container(
padding: const EdgeInsets.all(6),
decoration: BoxDecoration(
color: Colors.white.withOpacity(0.1),
shape: BoxShape.circle,
),
child: Icon(
Icons.close_rounded,
color: Colors.white.withOpacity(0.7),
size: 18,
),
),
),
],
),
),
),
),
);
}
}
\ No newline at end of file
// utils/app_colors.dart
import 'dart:ui';
class AppColors {
// Primary colors from genrentals.in
static const Color primary = Color(0xFF2563EB);
static const Color secondary = Color(0xFF10B981);
static const Color accent = Color(0xFFF59E0B);
// Status colors
static const Color success = Color(0xFF10B981);
static const Color warning = Color(0xFFF59E0B);
static const Color error = Color(0xFFEF4444);
static const Color info = Color(0xFF3B82F6);
// Neutral colors
static const Color dark = Color(0xFF1F2937);
static const Color light = Color(0xFFF9FAFB);
static const Color gray = Color(0xFF6B7280);
// Background colors
static const Color backgroundLight = Color(0xFFFFFFFF);
static const Color backgroundDark = Color(0xFF111827);
}
\ No newline at end of file
// utils/custom_snackbar.dart
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
class CustomSnackBar {
static void show({
required BuildContext context,
required String message,
String? title,
IconData? icon,
Color backgroundColor = const Color(0xFF324563),
Duration duration = const Duration(seconds: 4),
SnackBarAction? action,
bool showCloseIcon = true,
bool enableHaptic = true,
BorderRadiusGeometry? borderRadius,
List<BoxShadow>? customShadow,
Gradient? gradient,
}) {
if (enableHaptic) {
HapticFeedback.lightImpact();
}
final theme = Theme.of(context);
ScaffoldMessenger.of(context).showSnackBar(
SnackBar(
backgroundColor: Colors.transparent,
elevation: 0,
duration: duration,
behavior: SnackBarBehavior.floating,
padding: EdgeInsets.zero,
content: Container(
margin: const EdgeInsets.symmetric(horizontal: 16),
padding: const EdgeInsets.all(16),
decoration: BoxDecoration(
color: backgroundColor,
borderRadius: borderRadius ?? BorderRadius.circular(16),
boxShadow: customShadow ?? [
BoxShadow(
color: backgroundColor.withOpacity(0.3),
blurRadius: 20,
offset: const Offset(0, 8),
spreadRadius: 1,
),
BoxShadow(
color: Colors.black.withOpacity(0.1),
blurRadius: 4,
offset: const Offset(0, 2),
),
],
gradient: gradient ?? LinearGradient(
begin: Alignment.topLeft,
end: Alignment.bottomRight,
colors: [
backgroundColor,
Color.alphaBlend(Colors.white.withOpacity(0.1), backgroundColor),
],
),
border: Border.all(
color: Colors.white.withOpacity(0.1),
width: 1,
),
),
child: Row(
children: [
// Icon with glowing effect
Container(
padding: const EdgeInsets.all(10),
decoration: BoxDecoration(
color: Colors.white.withOpacity(0.15),
shape: BoxShape.circle,
boxShadow: [
BoxShadow(
color: backgroundColor.withOpacity(0.5),
blurRadius: 10,
spreadRadius: 2,
),
],
),
child: Icon(
icon ?? Icons.notifications_none_rounded,
color: Colors.white,
size: 22,
),
),
const SizedBox(width: 16),
// Content Section
Expanded(
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
mainAxisSize: MainAxisSize.min,
children: [
if (title != null) ...[
Text(
title,
style: const TextStyle(
color: Colors.white,
fontWeight: FontWeight.w700,
fontSize: 15,
letterSpacing: -0.2,
),
),
const SizedBox(height: 4),
],
Text(
message,
style: TextStyle(
color: Colors.white.withOpacity(0.9),
fontSize: 14,
height: 1.3,
fontWeight: FontWeight.w400,
),
maxLines: 3,
overflow: TextOverflow.ellipsis,
),
// Action Button
if (action != null) ...[
const SizedBox(height: 8),
Align(
alignment: Alignment.centerLeft,
child: Container(
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(8),
border: Border.all(
color: Colors.white.withOpacity(0.3),
),
),
child: TextButton(
onPressed: action.onPressed,
style: TextButton.styleFrom(
padding: const EdgeInsets.symmetric(
horizontal: 12,
vertical: 4,
),
minimumSize: Size.zero,
tapTargetSize: MaterialTapTargetSize.shrinkWrap,
),
child: Text(
action.label,
style: TextStyle(
color: Colors.white,
fontSize: 12,
fontWeight: FontWeight.w600,
),
),
),
),
),
],
],
),
),
const SizedBox(width: 8),
// Close Button with better styling
if (showCloseIcon)
GestureDetector(
onTap: () {
ScaffoldMessenger.of(context).hideCurrentSnackBar();
},
child: Container(
padding: const EdgeInsets.all(4),
decoration: BoxDecoration(
color: Colors.white.withOpacity(0.1),
shape: BoxShape.circle,
),
child: Icon(
Icons.close_rounded,
color: Colors.white.withOpacity(0.7),
size: 18,
),
),
),
],
),
),
),
);
}
// Premium Success Snackbar
static void showSuccess({
required BuildContext context,
required String message,
String title = "Success",
Color backgroundColor = const Color(0xFF059669),
SnackBarAction? action,
bool enableHaptic = true,
}) {
show(
context: context,
message: message,
title: title,
icon: Icons.check_circle_rounded,
backgroundColor: backgroundColor,
gradient: const LinearGradient(
begin: Alignment.topLeft,
end: Alignment.bottomRight,
colors: [
Color(0xFF2E7D32),
Color(0xFF4CAF50),
],
),
action: action,
enableHaptic: enableHaptic,
);
}
// Premium Error Snackbar
static void showError({
required BuildContext context,
required String message,
String title = "Error",
Color backgroundColor = const Color(0xFFDC2626),
SnackBarAction? action,
bool enableHaptic = true,
}) {
show(
context: context,
message: message,
title: title,
icon: Icons.error_outline_rounded,
backgroundColor: backgroundColor,
gradient: const LinearGradient(
begin: Alignment.topLeft,
end: Alignment.bottomRight,
colors: [
Color(0xFFB22222),
Color(0xFFB22222),
],
),
action: action,
enableHaptic: enableHaptic,
);
}
// Premium Warning Snackbar
static void showWarning({
required BuildContext context,
required String message,
String title = "Warning",
Color backgroundColor = const Color(0xFFFFA000),
SnackBarAction? action,
bool enableHaptic = true,
}) {
show(
context: context,
message: message,
title: title,
icon: Icons.warning_amber_rounded,
backgroundColor: backgroundColor,
gradient: const LinearGradient(
begin: Alignment.topLeft,
end: Alignment.bottomRight,
colors: [
Color(0xFFF57F17),
Color(0xFFF59E0B),
],
),
action: action,
enableHaptic: enableHaptic,
);
}
// Premium Info Snackbar
static void showInfo({
required BuildContext context,
required String message,
String title = "Info",
SnackBarAction? action,
bool enableHaptic = true,
}) {
show(
context: context,
message: message,
title: title,
icon: Icons.info_outline_rounded,
backgroundColor: const Color(0xFF2563EB),
gradient: const LinearGradient(
begin: Alignment.topLeft,
end: Alignment.bottomRight,
colors: [
Color(0xFF2563EB),
Color(0xFF0D47A1),
],
),
action: action,
enableHaptic: enableHaptic,
);
}
// Premium Snackbar with custom color
static void showCustom({
required BuildContext context,
required String message,
required String title,
required Color backgroundColor,
required IconData icon,
SnackBarAction? action,
bool enableHaptic = true,
Gradient? gradient,
}) {
show(
context: context,
message: message,
title: title,
icon: icon,
backgroundColor: backgroundColor,
gradient: gradient,
action: action,
enableHaptic: enableHaptic,
);
}
}
\ No newline at end of file
import 'package:flutter/material.dart';
import 'package:gen_rentals/Screens/SplashScreen.dart';
import 'package:provider/provider.dart';
import 'Notifier/RentalContactProvider .dart';
import 'Notifier/theme_provider.dart';
import 'Screens/authScreen/LoginScreen.dart';
// navigatorKey to navigate outside BuildContext
final GlobalKey<NavigatorState> navigatorKey = GlobalKey<NavigatorState>();
// // Initialize the notification plugin
// final FlutterLocalNotificationsPlugin flutterLocalNotificationsPlugin =
// FlutterLocalNotificationsPlugin();
void main() {
runApp(const MyApp());
}
class MyApp extends StatelessWidget {
const MyApp({super.key});
@override
Widget build(BuildContext context) {
return MultiProvider(
providers: [
ChangeNotifierProvider<RentalContactProvider>(create: (_) => RentalContactProvider(),
),
ChangeNotifierProvider<ThemeProvider>(create: (_) => ThemeProvider(),
),
],
child: Consumer<ThemeProvider>(
builder: (context, themeProvider, child) {
return MaterialApp(
debugShowCheckedModeBanner: false,
title: 'Gen Rentals',
theme: themeProvider.isDark
? ThemeData.dark()
: ThemeData.light().copyWith(
scaffoldBackgroundColor: const Color(0xFFF5F8FC),
),
home: const SplashScreen(), //
);
},
),
);
}
}
# Generated by pub
# See https://dart.dev/tools/pub/glossary#lockfile
packages:
_flutterfire_internals:
dependency: transitive
description:
name: _flutterfire_internals
sha256: f871a7d1b686bea1f13722aa51ab31554d05c81f47054d6de48cc8c45153508b
url: "https://pub.dev"
source: hosted
version: "1.3.63"
args:
dependency: transitive
description:
name: args
sha256: d0481093c50b1da8910eb0bb301626d4d8eb7284aa739614d2b394ee09e3ea04
url: "https://pub.dev"
source: hosted
version: "2.7.0"
async:
dependency: transitive
description:
name: async
sha256: d2872f9c19731c2e5f10444b14686eb7cc85c76274bd6c16e1816bff9a3bab63
url: "https://pub.dev"
source: hosted
version: "2.12.0"
boolean_selector:
dependency: transitive
description:
name: boolean_selector
sha256: "8aab1771e1243a5063b8b0ff68042d67334e3feab9e95b9490f9a6ebf73b42ea"
url: "https://pub.dev"
source: hosted
version: "2.1.2"
cached_network_image:
dependency: "direct dev"
description:
name: cached_network_image
sha256: "7c1183e361e5c8b0a0f21a28401eecdbde252441106a9816400dd4c2b2424916"
url: "https://pub.dev"
source: hosted
version: "3.4.1"
cached_network_image_platform_interface:
dependency: transitive
description:
name: cached_network_image_platform_interface
sha256: "35814b016e37fbdc91f7ae18c8caf49ba5c88501813f73ce8a07027a395e2829"
url: "https://pub.dev"
source: hosted
version: "4.1.1"
cached_network_image_web:
dependency: transitive
description:
name: cached_network_image_web
sha256: "980842f4e8e2535b8dbd3d5ca0b1f0ba66bf61d14cc3a17a9b4788a3685ba062"
url: "https://pub.dev"
source: hosted
version: "1.3.1"
characters:
dependency: transitive
description:
name: characters
sha256: f71061c654a3380576a52b451dd5532377954cf9dbd272a78fc8479606670803
url: "https://pub.dev"
source: hosted
version: "1.4.0"
clock:
dependency: transitive
description:
name: clock
sha256: fddb70d9b5277016c77a80201021d40a2247104d9f4aa7bab7157b7e3f05b84b
url: "https://pub.dev"
source: hosted
version: "1.1.2"
collection:
dependency: transitive
description:
name: collection
sha256: "2f5709ae4d3d59dd8f7cd309b4e023046b57d8a6c82130785d2b0e5868084e76"
url: "https://pub.dev"
source: hosted
version: "1.19.1"
connectivity_plus:
dependency: "direct dev"
description:
name: connectivity_plus
sha256: b5e72753cf63becce2c61fd04dfe0f1c430cc5278b53a1342dc5ad839eab29ec
url: "https://pub.dev"
source: hosted
version: "6.1.5"
connectivity_plus_platform_interface:
dependency: transitive
description:
name: connectivity_plus_platform_interface
sha256: "42657c1715d48b167930d5f34d00222ac100475f73d10162ddf43e714932f204"
url: "https://pub.dev"
source: hosted
version: "2.0.1"
crypto:
dependency: transitive
description:
name: crypto
sha256: "1e445881f28f22d6140f181e07737b22f1e099a5e1ff94b0af2f9e4a463f4855"
url: "https://pub.dev"
source: hosted
version: "3.0.6"
csslib:
dependency: transitive
description:
name: csslib
sha256: "09bad715f418841f976c77db72d5398dc1253c21fb9c0c7f0b0b985860b2d58e"
url: "https://pub.dev"
source: hosted
version: "1.0.2"
cupertino_icons:
dependency: "direct main"
description:
name: cupertino_icons
sha256: ba631d1c7f7bef6b729a622b7b752645a2d076dba9976925b8f25725a30e1ee6
url: "https://pub.dev"
source: hosted
version: "1.0.8"
dbus:
dependency: transitive
description:
name: dbus
sha256: "79e0c23480ff85dc68de79e2cd6334add97e48f7f4865d17686dd6ea81a47e8c"
url: "https://pub.dev"
source: hosted
version: "0.7.11"
fake_async:
dependency: transitive
description:
name: fake_async
sha256: "6a95e56b2449df2273fd8c45a662d6947ce1ebb7aafe80e550a3f68297f3cacc"
url: "https://pub.dev"
source: hosted
version: "1.3.2"
ffi:
dependency: transitive
description:
name: ffi
sha256: "289279317b4b16eb2bb7e271abccd4bf84ec9bdcbe999e278a94b804f5630418"
url: "https://pub.dev"
source: hosted
version: "2.1.4"
file:
dependency: transitive
description:
name: file
sha256: a3b4f84adafef897088c160faf7dfffb7696046cb13ae90b508c2cbc95d3b8d4
url: "https://pub.dev"
source: hosted
version: "7.0.1"
firebase_core:
dependency: "direct dev"
description:
name: firebase_core
sha256: "132e1c311bc41e7d387b575df0aacdf24efbf4930365eb61042be5bde3978f03"
url: "https://pub.dev"
source: hosted
version: "4.2.0"
firebase_core_platform_interface:
dependency: transitive
description:
name: firebase_core_platform_interface
sha256: cccb4f572325dc14904c02fcc7db6323ad62ba02536833dddb5c02cac7341c64
url: "https://pub.dev"
source: hosted
version: "6.0.2"
firebase_core_web:
dependency: transitive
description:
name: firebase_core_web
sha256: ecde2def458292404a4fcd3731ee4992fd631a0ec359d2d67c33baa8da5ec8ae
url: "https://pub.dev"
source: hosted
version: "3.2.0"
firebase_messaging:
dependency: "direct dev"
description:
name: firebase_messaging
sha256: "5021279acd1cb5ccaceaa388e616e82cc4a2e4d862f02637df0e8ab766e6900a"
url: "https://pub.dev"
source: hosted
version: "16.0.3"
firebase_messaging_platform_interface:
dependency: transitive
description:
name: firebase_messaging_platform_interface
sha256: f3a16c51f02055ace2a7c16ccb341c1f1b36b67c13270a48bcef68c1d970bbe8
url: "https://pub.dev"
source: hosted
version: "4.7.3"
firebase_messaging_web:
dependency: transitive
description:
name: firebase_messaging_web
sha256: "3eb9a1382caeb95b370f21e36d4a460496af777c9c2ef5df9b90d4803982c069"
url: "https://pub.dev"
source: hosted
version: "4.0.3"
fixnum:
dependency: transitive
description:
name: fixnum
sha256: b6dc7065e46c974bc7c5f143080a6764ec7a4be6da1285ececdc37be96de53be
url: "https://pub.dev"
source: hosted
version: "1.1.1"
flutter:
dependency: "direct main"
description: flutter
source: sdk
version: "0.0.0"
flutter_cache_manager:
dependency: transitive
description:
name: flutter_cache_manager
sha256: "400b6592f16a4409a7f2bb929a9a7e38c72cceb8ffb99ee57bbf2cb2cecf8386"
url: "https://pub.dev"
source: hosted
version: "3.4.1"
flutter_html:
dependency: "direct dev"
description:
name: flutter_html
sha256: "38a2fd702ffdf3243fb7441ab58aa1bc7e6922d95a50db76534de8260638558d"
url: "https://pub.dev"
source: hosted
version: "3.0.0"
flutter_lints:
dependency: "direct dev"
description:
name: flutter_lints
sha256: "5398f14efa795ffb7a33e9b6a08798b26a180edac4ad7db3f231e40f82ce11e1"
url: "https://pub.dev"
source: hosted
version: "5.0.0"
flutter_svg:
dependency: "direct dev"
description:
name: flutter_svg
sha256: b9c2ad5872518a27507ab432d1fb97e8813b05f0fc693f9d40fad06d073e0678
url: "https://pub.dev"
source: hosted
version: "2.2.1"
flutter_test:
dependency: "direct dev"
description: flutter
source: sdk
version: "0.0.0"
flutter_web_plugins:
dependency: transitive
description: flutter
source: sdk
version: "0.0.0"
html:
dependency: transitive
description:
name: html
sha256: "6d1264f2dffa1b1101c25a91dff0dc2daee4c18e87cd8538729773c073dbf602"
url: "https://pub.dev"
source: hosted
version: "0.15.6"
http:
dependency: "direct dev"
description:
name: http
sha256: bb2ce4590bc2667c96f318d68cac1b5a7987ec819351d32b1c987239a815e007
url: "https://pub.dev"
source: hosted
version: "1.5.0"
http_parser:
dependency: transitive
description:
name: http_parser
sha256: "178d74305e7866013777bab2c3d8726205dc5a4dd935297175b19a23a2e66571"
url: "https://pub.dev"
source: hosted
version: "4.1.2"
leak_tracker:
dependency: transitive
description:
name: leak_tracker
sha256: c35baad643ba394b40aac41080300150a4f08fd0fd6a10378f8f7c6bc161acec
url: "https://pub.dev"
source: hosted
version: "10.0.8"
leak_tracker_flutter_testing:
dependency: transitive
description:
name: leak_tracker_flutter_testing
sha256: f8b613e7e6a13ec79cfdc0e97638fddb3ab848452eff057653abd3edba760573
url: "https://pub.dev"
source: hosted
version: "3.0.9"
leak_tracker_testing:
dependency: transitive
description:
name: leak_tracker_testing
sha256: "6ba465d5d76e67ddf503e1161d1f4a6bc42306f9d66ca1e8f079a47290fb06d3"
url: "https://pub.dev"
source: hosted
version: "3.0.1"
lints:
dependency: transitive
description:
name: lints
sha256: c35bb79562d980e9a453fc715854e1ed39e24e7d0297a880ef54e17f9874a9d7
url: "https://pub.dev"
source: hosted
version: "5.1.1"
list_counter:
dependency: transitive
description:
name: list_counter
sha256: c447ae3dfcd1c55f0152867090e67e219d42fe6d4f2807db4bbe8b8d69912237
url: "https://pub.dev"
source: hosted
version: "1.0.2"
matcher:
dependency: transitive
description:
name: matcher
sha256: dc58c723c3c24bf8d3e2d3ad3f2f9d7bd9cf43ec6feaa64181775e60190153f2
url: "https://pub.dev"
source: hosted
version: "0.12.17"
material_color_utilities:
dependency: transitive
description:
name: material_color_utilities
sha256: f7142bb1154231d7ea5f96bc7bde4bda2a0945d2806bb11670e30b850d56bdec
url: "https://pub.dev"
source: hosted
version: "0.11.1"
meta:
dependency: transitive
description:
name: meta
sha256: e3641ec5d63ebf0d9b41bd43201a66e3fc79a65db5f61fc181f04cd27aab950c
url: "https://pub.dev"
source: hosted
version: "1.16.0"
nested:
dependency: transitive
description:
name: nested
sha256: "03bac4c528c64c95c722ec99280375a6f2fc708eec17c7b3f07253b626cd2a20"
url: "https://pub.dev"
source: hosted
version: "1.0.0"
nm:
dependency: transitive
description:
name: nm
sha256: "2c9aae4127bdc8993206464fcc063611e0e36e72018696cd9631023a31b24254"
url: "https://pub.dev"
source: hosted
version: "0.5.0"
octo_image:
dependency: transitive
description:
name: octo_image
sha256: "34faa6639a78c7e3cbe79be6f9f96535867e879748ade7d17c9b1ae7536293bd"
url: "https://pub.dev"
source: hosted
version: "2.1.0"
package_info_plus:
dependency: "direct dev"
description:
name: package_info_plus
sha256: "16eee997588c60225bda0488b6dcfac69280a6b7a3cf02c741895dd370a02968"
url: "https://pub.dev"
source: hosted
version: "8.3.1"
package_info_plus_platform_interface:
dependency: transitive
description:
name: package_info_plus_platform_interface
sha256: "202a487f08836a592a6bd4f901ac69b3a8f146af552bbd14407b6b41e1c3f086"
url: "https://pub.dev"
source: hosted
version: "3.2.1"
path:
dependency: transitive
description:
name: path
sha256: "75cca69d1490965be98c73ceaea117e8a04dd21217b37b292c9ddbec0d955bc5"
url: "https://pub.dev"
source: hosted
version: "1.9.1"
path_parsing:
dependency: transitive
description:
name: path_parsing
sha256: "883402936929eac138ee0a45da5b0f2c80f89913e6dc3bf77eb65b84b409c6ca"
url: "https://pub.dev"
source: hosted
version: "1.1.0"
path_provider:
dependency: transitive
description:
name: path_provider
sha256: "50c5dd5b6e1aaf6fb3a78b33f6aa3afca52bf903a8a5298f53101fdaee55bbcd"
url: "https://pub.dev"
source: hosted
version: "2.1.5"
path_provider_android:
dependency: transitive
description:
name: path_provider_android
sha256: "3b4c1fc3aa55ddc9cd4aa6759984330d5c8e66aa7702a6223c61540dc6380c37"
url: "https://pub.dev"
source: hosted
version: "2.2.19"
path_provider_foundation:
dependency: transitive
description:
name: path_provider_foundation
sha256: "16eef174aacb07e09c351502740fa6254c165757638eba1e9116b0a781201bbd"
url: "https://pub.dev"
source: hosted
version: "2.4.2"
path_provider_linux:
dependency: transitive
description:
name: path_provider_linux
sha256: f7a1fe3a634fe7734c8d3f2766ad746ae2a2884abe22e241a8b301bf5cac3279
url: "https://pub.dev"
source: hosted
version: "2.2.1"
path_provider_platform_interface:
dependency: transitive
description:
name: path_provider_platform_interface
sha256: "88f5779f72ba699763fa3a3b06aa4bf6de76c8e5de842cf6f29e2e06476c2334"
url: "https://pub.dev"
source: hosted
version: "2.1.2"
path_provider_windows:
dependency: transitive
description:
name: path_provider_windows
sha256: bd6f00dbd873bfb70d0761682da2b3a2c2fccc2b9e84c495821639601d81afe7
url: "https://pub.dev"
source: hosted
version: "2.3.0"
permission_handler:
dependency: "direct dev"
description:
name: permission_handler
sha256: bc917da36261b00137bbc8896bf1482169cd76f866282368948f032c8c1caae1
url: "https://pub.dev"
source: hosted
version: "12.0.1"
permission_handler_android:
dependency: transitive
description:
name: permission_handler_android
sha256: "1e3bc410ca1bf84662104b100eb126e066cb55791b7451307f9708d4007350e6"
url: "https://pub.dev"
source: hosted
version: "13.0.1"
permission_handler_apple:
dependency: transitive
description:
name: permission_handler_apple
sha256: f000131e755c54cf4d84a5d8bd6e4149e262cc31c5a8b1d698de1ac85fa41023
url: "https://pub.dev"
source: hosted
version: "9.4.7"
permission_handler_html:
dependency: transitive
description:
name: permission_handler_html
sha256: "38f000e83355abb3392140f6bc3030660cfaef189e1f87824facb76300b4ff24"
url: "https://pub.dev"
source: hosted
version: "0.1.3+5"
permission_handler_platform_interface:
dependency: transitive
description:
name: permission_handler_platform_interface
sha256: eb99b295153abce5d683cac8c02e22faab63e50679b937fa1bf67d58bb282878
url: "https://pub.dev"
source: hosted
version: "4.3.0"
permission_handler_windows:
dependency: transitive
description:
name: permission_handler_windows
sha256: "1a790728016f79a41216d88672dbc5df30e686e811ad4e698bfc51f76ad91f1e"
url: "https://pub.dev"
source: hosted
version: "0.2.1"
petitparser:
dependency: transitive
description:
name: petitparser
sha256: "07c8f0b1913bcde1ff0d26e57ace2f3012ccbf2b204e070290dad3bb22797646"
url: "https://pub.dev"
source: hosted
version: "6.1.0"
platform:
dependency: transitive
description:
name: platform
sha256: "5d6b1b0036a5f331ebc77c850ebc8506cbc1e9416c27e59b439f917a902a4984"
url: "https://pub.dev"
source: hosted
version: "3.1.6"
plugin_platform_interface:
dependency: transitive
description:
name: plugin_platform_interface
sha256: "4820fbfdb9478b1ebae27888254d445073732dae3d6ea81f0b7e06d5dedc3f02"
url: "https://pub.dev"
source: hosted
version: "2.1.8"
provider:
dependency: "direct dev"
description:
name: provider
sha256: "4e82183fa20e5ca25703ead7e05de9e4cceed1fbd1eadc1ac3cb6f565a09f272"
url: "https://pub.dev"
source: hosted
version: "6.1.5+1"
pull_to_refresh:
dependency: "direct dev"
description:
name: pull_to_refresh
sha256: bbadd5a931837b57739cf08736bea63167e284e71fb23b218c8c9a6e042aad12
url: "https://pub.dev"
source: hosted
version: "2.0.0"
rxdart:
dependency: transitive
description:
name: rxdart
sha256: "5c3004a4a8dbb94bd4bf5412a4def4acdaa12e12f269737a5751369e12d1a962"
url: "https://pub.dev"
source: hosted
version: "0.28.0"
shared_preferences:
dependency: "direct dev"
description:
name: shared_preferences
sha256: "6e8bf70b7fef813df4e9a36f658ac46d107db4b4cfe1048b477d4e453a8159f5"
url: "https://pub.dev"
source: hosted
version: "2.5.3"
shared_preferences_android:
dependency: transitive
description:
name: shared_preferences_android
sha256: a2608114b1ffdcbc9c120eb71a0e207c71da56202852d4aab8a5e30a82269e74
url: "https://pub.dev"
source: hosted
version: "2.4.12"
shared_preferences_foundation:
dependency: transitive
description:
name: shared_preferences_foundation
sha256: "6a52cfcdaeac77cad8c97b539ff688ccfc458c007b4db12be584fbe5c0e49e03"
url: "https://pub.dev"
source: hosted
version: "2.5.4"
shared_preferences_linux:
dependency: transitive
description:
name: shared_preferences_linux
sha256: "580abfd40f415611503cae30adf626e6656dfb2f0cee8f465ece7b6defb40f2f"
url: "https://pub.dev"
source: hosted
version: "2.4.1"
shared_preferences_platform_interface:
dependency: transitive
description:
name: shared_preferences_platform_interface
sha256: "57cbf196c486bc2cf1f02b85784932c6094376284b3ad5779d1b1c6c6a816b80"
url: "https://pub.dev"
source: hosted
version: "2.4.1"
shared_preferences_web:
dependency: transitive
description:
name: shared_preferences_web
sha256: c49bd060261c9a3f0ff445892695d6212ff603ef3115edbb448509d407600019
url: "https://pub.dev"
source: hosted
version: "2.4.3"
shared_preferences_windows:
dependency: transitive
description:
name: shared_preferences_windows
sha256: "94ef0f72b2d71bc3e700e025db3710911bd51a71cefb65cc609dd0d9a982e3c1"
url: "https://pub.dev"
source: hosted
version: "2.4.1"
sky_engine:
dependency: transitive
description: flutter
source: sdk
version: "0.0.0"
source_span:
dependency: transitive
description:
name: source_span
sha256: "254ee5351d6cb365c859e20ee823c3bb479bf4a293c22d17a9f1bf144ce86f7c"
url: "https://pub.dev"
source: hosted
version: "1.10.1"
sprintf:
dependency: transitive
description:
name: sprintf
sha256: "1fc9ffe69d4df602376b52949af107d8f5703b77cda567c4d7d86a0693120f23"
url: "https://pub.dev"
source: hosted
version: "7.0.0"
sqflite:
dependency: transitive
description:
name: sqflite
sha256: e2297b1da52f127bc7a3da11439985d9b536f75070f3325e62ada69a5c585d03
url: "https://pub.dev"
source: hosted
version: "2.4.2"
sqflite_android:
dependency: transitive
description:
name: sqflite_android
sha256: "2b3070c5fa881839f8b402ee4a39c1b4d561704d4ebbbcfb808a119bc2a1701b"
url: "https://pub.dev"
source: hosted
version: "2.4.1"
sqflite_common:
dependency: transitive
description:
name: sqflite_common
sha256: "84731e8bfd8303a3389903e01fb2141b6e59b5973cacbb0929021df08dddbe8b"
url: "https://pub.dev"
source: hosted
version: "2.5.5"
sqflite_darwin:
dependency: transitive
description:
name: sqflite_darwin
sha256: "279832e5cde3fe99e8571879498c9211f3ca6391b0d818df4e17d9fff5c6ccb3"
url: "https://pub.dev"
source: hosted
version: "2.4.2"
sqflite_platform_interface:
dependency: transitive
description:
name: sqflite_platform_interface
sha256: "8dd4515c7bdcae0a785b0062859336de775e8c65db81ae33dd5445f35be61920"
url: "https://pub.dev"
source: hosted
version: "2.4.0"
stack_trace:
dependency: transitive
description:
name: stack_trace
sha256: "8b27215b45d22309b5cddda1aa2b19bdfec9df0e765f2de506401c071d38d1b1"
url: "https://pub.dev"
source: hosted
version: "1.12.1"
stream_channel:
dependency: transitive
description:
name: stream_channel
sha256: "969e04c80b8bcdf826f8f16579c7b14d780458bd97f56d107d3950fdbeef059d"
url: "https://pub.dev"
source: hosted
version: "2.1.4"
string_scanner:
dependency: transitive
description:
name: string_scanner
sha256: "921cd31725b72fe181906c6a94d987c78e3b98c2e205b397ea399d4054872b43"
url: "https://pub.dev"
source: hosted
version: "1.4.1"
synchronized:
dependency: transitive
description:
name: synchronized
sha256: "0669c70faae6270521ee4f05bffd2919892d42d1276e6c495be80174b6bc0ef6"
url: "https://pub.dev"
source: hosted
version: "3.3.1"
term_glyph:
dependency: transitive
description:
name: term_glyph
sha256: "7f554798625ea768a7518313e58f83891c7f5024f88e46e7182a4558850a4b8e"
url: "https://pub.dev"
source: hosted
version: "1.2.2"
test_api:
dependency: transitive
description:
name: test_api
sha256: fb31f383e2ee25fbbfe06b40fe21e1e458d14080e3c67e7ba0acfde4df4e0bbd
url: "https://pub.dev"
source: hosted
version: "0.7.4"
typed_data:
dependency: transitive
description:
name: typed_data
sha256: f9049c039ebfeb4cf7a7104a675823cd72dba8297f264b6637062516699fa006
url: "https://pub.dev"
source: hosted
version: "1.4.0"
uuid:
dependency: transitive
description:
name: uuid
sha256: a5be9ef6618a7ac1e964353ef476418026db906c4facdedaa299b7a2e71690ff
url: "https://pub.dev"
source: hosted
version: "4.5.1"
vector_graphics:
dependency: transitive
description:
name: vector_graphics
sha256: a4f059dc26fc8295b5921376600a194c4ec7d55e72f2fe4c7d2831e103d461e6
url: "https://pub.dev"
source: hosted
version: "1.1.19"
vector_graphics_codec:
dependency: transitive
description:
name: vector_graphics_codec
sha256: "99fd9fbd34d9f9a32efd7b6a6aae14125d8237b10403b422a6a6dfeac2806146"
url: "https://pub.dev"
source: hosted
version: "1.1.13"
vector_graphics_compiler:
dependency: transitive
description:
name: vector_graphics_compiler
sha256: d354a7ec6931e6047785f4db12a1f61ec3d43b207fc0790f863818543f8ff0dc
url: "https://pub.dev"
source: hosted
version: "1.1.19"
vector_math:
dependency: transitive
description:
name: vector_math
sha256: "80b3257d1492ce4d091729e3a67a60407d227c27241d6927be0130c98e741803"
url: "https://pub.dev"
source: hosted
version: "2.1.4"
vm_service:
dependency: transitive
description:
name: vm_service
sha256: "0968250880a6c5fe7edc067ed0a13d4bae1577fe2771dcf3010d52c4a9d3ca14"
url: "https://pub.dev"
source: hosted
version: "14.3.1"
web:
dependency: transitive
description:
name: web
sha256: "868d88a33d8a87b18ffc05f9f030ba328ffefba92d6c127917a2ba740f9cfe4a"
url: "https://pub.dev"
source: hosted
version: "1.1.1"
win32:
dependency: transitive
description:
name: win32
sha256: "329edf97fdd893e0f1e3b9e88d6a0e627128cc17cc316a8d67fda8f1451178ba"
url: "https://pub.dev"
source: hosted
version: "5.13.0"
xdg_directories:
dependency: transitive
description:
name: xdg_directories
sha256: "7a3f37b05d989967cdddcbb571f1ea834867ae2faa29725fd085180e0883aa15"
url: "https://pub.dev"
source: hosted
version: "1.1.0"
xml:
dependency: transitive
description:
name: xml
sha256: b015a8ad1c488f66851d762d3090a21c600e479dc75e68328c52774040cf9226
url: "https://pub.dev"
source: hosted
version: "6.5.0"
sdks:
dart: ">=3.7.2 <4.0.0"
flutter: ">=3.29.0"
name: gen_rentals
description: "A new Flutter project."
# The following line prevents the package from being accidentally published to
# pub.dev using `flutter pub publish`. This is preferred for private packages.
publish_to: 'none' # Remove this line if you wish to publish to pub.dev
# The following defines the version and build number for your application.
# A version number is three numbers separated by dots, like 1.2.43
# followed by an optional build number separated by a +.
# Both the version and the builder number may be overridden in flutter
# build by specifying --build-name and --build-number, respectively.
# In Android, build-name is used as versionName while build-number used as versionCode.
# Read more about Android versioning at https://developer.android.com/studio/publish/versioning
# In iOS, build-name is used as CFBundleShortVersionString while build-number is used as CFBundleVersion.
# Read more about iOS versioning at
# https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html
# In Windows, build-name is used as the major, minor, and patch parts
# of the product and file versions while build-number is used as the build suffix.
version: 1.0.0+1
environment:
sdk: ^3.7.2
# Dependencies specify other packages that your package needs in order to work.
# To automatically upgrade your package dependencies to the latest versions
# consider running `flutter pub upgrade --major-versions`. Alternatively,
# dependencies can be manually updated by changing the version numbers below to
# the latest version available on pub.dev. To see which dependencies have newer
# versions available, run `flutter pub outdated`.
dependencies:
flutter:
sdk: flutter
# The following adds the Cupertino Icons font to your application.
# Use with the CupertinoIcons class for iOS style icons.
cupertino_icons: ^1.0.8
dev_dependencies:
flutter_test:
sdk: flutter
# The "flutter_lints" package below contains a set of recommended lints to
# encourage good coding practices. The lint set provided by the package is
# activated in the `analysis_options.yaml` file located at the root of your
# package. See that file for information about deactivating specific lint
# rules and activating additional ones.
flutter_lints: ^5.0.0
cupertino_icons: ^1.0.8
provider: ^6.1.5
http: ^1.3.0
package_info_plus: ^8.3.0
permission_handler: ^12.0.0+1
shared_preferences: ^2.5.3
flutter_svg: ^2.1.0
cached_network_image: ^3.2.3
flutter_html: ^3.0.0
connectivity_plus: ^6.1.0
pull_to_refresh: ^2.0.0
firebase_messaging: ^16.0.2
firebase_core: ^4.1.1
#flutter_local_notifications: ^17.2.0
# For information on the generic Dart part of this file, see the
# following page: https://dart.dev/tools/pub/pubspec
# The following section is specific to Flutter packages.
flutter:
# The following line ensures that the Material Icons font is
# included with your application, so that you can use the icons in
# the material Icons class.
uses-material-design: true
# To add assets to your application, add an assets section, like this:
assets:
- assets/
- assets/images/
- assets/svg/
# An image asset can refer to one or more resolution-specific "variants", see
# https://flutter.dev/to/resolution-aware-images
# For details regarding adding assets from package dependencies, see
# https://flutter.dev/to/asset-from-package
# To add custom fonts to your application, add a fonts section here,
# in this "flutter" section. Each entry in this list should have a
# "family" key with the font family name, and a "fonts" key with a
# list giving the asset and other descriptors for the font. For
# example:
# fonts:
# - family: Schyler
# fonts:
# - asset: fonts/Schyler-Regular.ttf
# - asset: fonts/Schyler-Italic.ttf
# style: italic
# - family: Trajan Pro
# fonts:
# - asset: fonts/TrajanPro.ttf
# - asset: fonts/TrajanPro_Bold.ttf
# weight: 700
#
# For details regarding fonts from package dependencies,
# see https://flutter.dev/to/font-from-package
<!DOCTYPE html>
<html>
<head>
<!--
If you are serving your web app in a path other than the root, change the
href value below to reflect the base path you are serving from.
The path provided below has to start and end with a slash "/" in order for
it to work correctly.
For more details:
* https://developer.mozilla.org/en-US/docs/Web/HTML/Element/base
This is a placeholder for base href that will be replaced by the value of
the `--base-href` argument provided to `flutter build`.
-->
<base href="$FLUTTER_BASE_HREF">
<meta charset="UTF-8">
<meta content="IE=Edge" http-equiv="X-UA-Compatible">
<meta name="description" content="A new Flutter project.">
<!-- iOS meta tags & icons -->
<meta name="mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-status-bar-style" content="black">
<meta name="apple-mobile-web-app-title" content="gen_rentals">
<link rel="apple-touch-icon" href="icons/Icon-192.png">
<!-- Favicon -->
<link rel="icon" type="image/png" href="favicon.png"/>
<title>gen_rentals</title>
<link rel="manifest" href="manifest.json">
</head>
<body>
<script src="flutter_bootstrap.js" async></script>
</body>
</html>
{
"name": "gen_rentals",
"short_name": "gen_rentals",
"start_url": ".",
"display": "standalone",
"background_color": "#0175C2",
"theme_color": "#0175C2",
"description": "A new Flutter project.",
"orientation": "portrait-primary",
"prefer_related_applications": false,
"icons": [
{
"src": "icons/Icon-192.png",
"sizes": "192x192",
"type": "image/png"
},
{
"src": "icons/Icon-512.png",
"sizes": "512x512",
"type": "image/png"
},
{
"src": "icons/Icon-maskable-192.png",
"sizes": "192x192",
"type": "image/png",
"purpose": "maskable"
},
{
"src": "icons/Icon-maskable-512.png",
"sizes": "512x512",
"type": "image/png",
"purpose": "maskable"
}
]
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment