0% found this document useful (0 votes)
8 views29 pages

chap8&9 sam

Uploaded by

shubhek.cse
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
8 views29 pages

chap8&9 sam

Uploaded by

shubhek.cse
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 29

Sustainable Fertilizer Usage Optimizer for Higher Yield

A
MAJOR PROJECT-I REPORT
Submitted in partial fulfillment of the requirements
for the degree of
BACHELOR OF TECHNOLOGY
in
COMPUTER SCIENCE & ENGINEERING
By
GROUP NO.03
Priyal Gupta 0187CS221152
Shubhek Kumar 0187CS221190
Yadav Aman 0187CS222016
Anuj Raghuwanshi 0187CS221050
Shivanshu Kumar 0187CS221187
Pranjal Amulani 0187CS221154

Under the guidance of


Mr. Ankit Gupta
(Associate Professor)

Department of Computer Science & Engineering


Sagar Institute of Science &Technology (SISTec), Bhopal (M.P)
Approved by AICTE, New Delhi & Govt. of M.P.
Affiliated to Rajiv Gandhi Proudyogiki Vishwavidyalaya, Bhopal (M.P.)

December -2024
SISTec/BTech/CS/2024/5/MajorProject_I/03

CHAPTER-8
CODING

8.1 CODE IMPLEMENTATION FOR AIR MONITORING SYSTEM


The code integrates various sensors (MQ-135 for air quality, DHT11 for temperature and
humidity, and BMP180 for atmospheric pressure) with the ESP32 microcontroller. The
system collects environmental data in real-time and transmits it to ThingSpeak for
visualization and analysis. The implementation also covers Wi-Fi connectivity and ensures
smooth data flow between the sensors, microcontroller, and cloud platform.

Main.dart

import 'package:flutter/material.dart';
import 'package:krishak_sathi/Home_Page.dart';
import 'package:krishak_sathi/Labs/Confirm_adress.dart';
import 'package:krishak_sathi/lab.dart';
import 'package:krishak_sathi/login_page.dart';
import 'package:krishak_sathi/otp_page.dart';
import 'package:krishak_sathi/profile.dart';
import 'package:krishak_sathi/report/multiple_soil_reports.dart';
import 'package:krishak_sathi/router.dart';
import 'package:krishak_sathi/tracker/test_tracker.dart';
import 'crops/Crops.dart';
import 'report/report_analize.dart';

void main() {
runApp(const MyApp());
}

class MyApp extends StatefulWidget {


const MyApp({super.key});

@override
State<MyApp> createState() => MyAppState();
}

class MyAppState extends State<MyApp> {


@override
Widget build(BuildContext context) {
return MaterialApp(

34
SISTec/BTech/CS/2024/5/MajorProject_I/03

debugShowCheckedModeBanner: false,
home: Login(),
onGenerateRoute: generateRoute,
);
}
}

Home_page.dart

import 'package:flutter/material.dart';
import 'package:krishak_sathi/Home_info.dart';
import 'package:krishak_sathi/lab.dart';
import 'package:krishak_sathi/profile.dart';
import 'package:krishak_sathi/weather_pages/weather_pages.dart';

class GobalColors {
static const PrimaryColor = Color(0xFF2DB83D); // Define primary color
}

class HomePage extends StatefulWidget {


const HomePage({super.key});

@override
State<HomePage> createState() => _HomePageState();
}

class _HomePageState extends State<HomePage> {


// Pages for navigation
final List<Widget> pages = [
LabsPage(), // Replace with LabStatus()
HomePageInfo(),
FarmerProfilePage(), // Replace with ProfilePage()
WeatherScreen(), // Replace with WeatherPage()
];

int currentIndex = 1; // Default to Home Page

@override
Widget build(BuildContext context) {
return Scaffold(
body: IndexedStack(
index: currentIndex, // Control which page is displayed
children: pages, // Pages to navigate between
),
bottomNavigationBar: Container(
height: 80,
margin: const EdgeInsets.all(15),
decoration: BoxDecoration(

35
SISTec/BTech/CS/2024/5/MajorProject_I/03

color: Colors.white, // White background for floating effect


borderRadius: BorderRadius.circular(30),
boxShadow: [
BoxShadow(
color: Colors.black.withOpacity(0.2),
blurRadius: 10,
offset: const Offset(0, 5),
),
],
),
child: ClipRRect(
borderRadius: BorderRadius.circular(30),
child: BottomNavigationBar(
type:
BottomNavigationBarType.fixed, // Ensure background color works
backgroundColor: Colors.white, // Match the container background
currentIndex: currentIndex,
selectedItemColor:
GobalColors.PrimaryColor, // Green for selected items
unselectedItemColor:
const Color.fromARGB(255, 0, 0, 0), // Grey for unselected items
showUnselectedLabels: true,
selectedFontSize: 14,
unselectedFontSize: 12,
onTap: (value) {
setState(() {
currentIndex = value; // Update the index on tap
});
},
items: const [
BottomNavigationBarItem(
icon: Icon(Icons.science),
label: 'Lab',
),
BottomNavigationBarItem(
icon: Icon(Icons.home),
label: 'Home',
),
BottomNavigationBarItem(
icon: Icon(Icons.person),
label: 'Profile',
),
BottomNavigationBarItem(
icon: Icon(Icons.cloud),
label: 'Weather',
),
],
),
),
),
);
}
}

36
SISTec/BTech/CS/2024/5/MajorProject_I/03

Signup_page.dart

import 'package:flutter/material.dart';

class SignUp extends StatelessWidget {


static const String routeName = '/login-screen';
const SignUp({super.key});

@override
Widget build(BuildContext context) {
// Controller to capture the mobile number input
final TextEditingController mobileNumberController =
TextEditingController();

return MaterialApp(
debugShowCheckedModeBanner: false,
home: Scaffold(
body: SingleChildScrollView(
child: Column(
children: [
// Top section with a modern gradient background
Container(
height: 450,
width: double.infinity,
decoration: const BoxDecoration(
borderRadius: BorderRadius.only(
bottomLeft: Radius.circular(40),
bottomRight: Radius.circular(40),
),
gradient: LinearGradient(
colors: [Color(0xFF2DB83D), Color(0xFF28A745)],
begin: Alignment.topLeft,
end: Alignment.bottomRight,
),
),
child: const Column(
mainAxisAlignment: MainAxisAlignment.center,
children: [
Icon(
Icons.person,
size: 80,
color: Colors.white,
),
SizedBox(height: 10),
Text(
"Welcome",
style: TextStyle(

37
SISTec/BTech/CS/2024/5/MajorProject_I/03

color: Colors.white,
fontSize: 24,
fontWeight: FontWeight.bold,
),
),
],
),
),
// Login header
Container(
margin: const EdgeInsets.symmetric(vertical: 20),
child: const Text(
"SignIn",
style: TextStyle(
fontWeight: FontWeight.bold,
fontSize: 24,
color: Color(0xFF333333),
),
),
),
// Input fields and button
Padding(
padding: const EdgeInsets.symmetric(horizontal: 20),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
const Text(
"Enter Mobile Number",
style: TextStyle(
fontSize: 16,
fontWeight: FontWeight.w600,
),
),
const SizedBox(height: 5),
const Text(
"Please confirm your mobile number to proceed",
style: TextStyle(
fontSize: 12,
color: Colors.grey,
),
),
const SizedBox(height: 20),
// Mobile number input field
Card(
elevation: 6,
shadowColor: Colors.grey.withOpacity(0.3),
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(12),
),

38
SISTec/BTech/CS/2024/5/MajorProject_I/03

child: TextField(
controller: mobileNumberController,
keyboardType: TextInputType.phone,
decoration: InputDecoration(
hintText: "+91 | Mobile number",
filled: true,
fillColor: Colors.white,
contentPadding: const EdgeInsets.symmetric(
vertical: 16, horizontal: 20),
border: OutlineInputBorder(
borderRadius: BorderRadius.circular(12),
borderSide: BorderSide.none,
),
suffixIcon: const Icon(
Icons.phone,
color: Color(0xFF2DB83D),
),
),
),
),
const SizedBox(height: 20),
// Continue button
ElevatedButton(
onPressed: () {
// Validate the mobile number
if (mobileNumberController.text == '8423304966') {
Navigator.pushReplacementNamed(
context, '/farmer_details');
} else {
// Show an error message if the number doesn't match
ScaffoldMessenger.of(context).showSnackBar(
const SnackBar(
content: Text(
"Invalid mobile number. Please try again.",
style: TextStyle(color: Colors.white),
),
backgroundColor: Colors.red,
),
);
}
},
style: ElevatedButton.styleFrom(
backgroundColor: const Color(0xFF2DB83D),
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(12),
),
minimumSize: const Size(double.infinity, 50),
elevation: 6,
),

39
SISTec/BTech/CS/2024/5/MajorProject_I/03

child: const Text(


"Continue",
style: TextStyle(
fontSize: 18,
fontWeight: FontWeight.w600,
color: Colors.white,
),
),
),
const SizedBox(height: 20),
// Alternative login link
Center(
child: TextButton(
onPressed: () {
Navigator.pushReplacementNamed(context, '/login');
},
child: const Text(
"Login",
style: TextStyle(
color: Color(0xFF2DB83D),
fontSize: 16,
fontWeight: FontWeight.w600,
),
),
),
),
],
),
),
],
),
),
),
);
}
}

Login_page.dart

import 'package:flutter/material.dart';

class Login extends StatelessWidget {


static const String routeName = '/login-screen';
const Login({super.key});

@override
Widget build(BuildContext context) {

40
SISTec/BTech/CS/2024/5/MajorProject_I/03

// Controller to capture the mobile number input


final TextEditingController mobileNumberController =
TextEditingController();

return MaterialApp(
debugShowCheckedModeBanner: false,
home: Scaffold(
body: SingleChildScrollView(
child: Column(
children: [
// Top section with a modern gradient background
Container(
height: 450,
width: double.infinity,
decoration: const BoxDecoration(
borderRadius: BorderRadius.only(
bottomLeft: Radius.circular(40),
bottomRight: Radius.circular(40),
),
gradient: LinearGradient(
colors: [Color(0xFF2DB83D), Color(0xFF28A745)],
begin: Alignment.topLeft,
end: Alignment.bottomRight,
),
),
child: const Column(
mainAxisAlignment: MainAxisAlignment.center,
children: [
Icon(
Icons.person,
size: 80,
color: Colors.white,
),
SizedBox(height: 10),
Text(
"Welcome Back",
style: TextStyle(
color: Colors.white,
fontSize: 24,
fontWeight: FontWeight.bold,
),
),
],
),
),
// Login header
Container(
margin: const EdgeInsets.symmetric(vertical: 20),
child: const Text(
"Login",
style: TextStyle(

41
SISTec/BTech/CS/2024/5/MajorProject_I/03

fontWeight: FontWeight.bold,
fontSize: 24,
color: Color(0xFF333333),
),
),
),
// Input fields and button
Padding(
padding: const EdgeInsets.symmetric(horizontal: 20),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
const Text(
"Enter Mobile Number",
style: TextStyle(
fontSize: 16,
fontWeight: FontWeight.w600,
),
),
const SizedBox(height: 5),
const Text(
"Please confirm your mobile number to proceed",
style: TextStyle(
fontSize: 12,
color: Colors.grey,
),
),
const SizedBox(height: 20),
// Mobile number input field
Card(
elevation: 6,
shadowColor: Colors.grey.withOpacity(0.3),
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(12),
),
child: TextField(
controller: mobileNumberController,
keyboardType: TextInputType.phone,
decoration: InputDecoration(
hintText: "+91 | Mobile number",
filled: true,
fillColor: Colors.white,
contentPadding: const EdgeInsets.symmetric(
vertical: 16, horizontal: 20),
border: OutlineInputBorder(
borderRadius: BorderRadius.circular(12),
borderSide: BorderSide.none,
),
suffixIcon: const Icon(

42
SISTec/BTech/CS/2024/5/MajorProject_I/03

Icons.phone,
color: Color(0xFF2DB83D),
),
),
),
),
const SizedBox(height: 20),
// Continue button
ElevatedButton(
onPressed: () {
// Validate the mobile number
if (mobileNumberController.text == '8423304966') {
Navigator.pushReplacementNamed(context, '/homePage');
} else {
// Show an error message if the number doesn't match
ScaffoldMessenger.of(context).showSnackBar(
const SnackBar(
content: Text(
"Invalid mobile number. Please try again.",
style: TextStyle(color: Colors.white),
),
backgroundColor: Colors.red,
),
);
}
},
style: ElevatedButton.styleFrom(
backgroundColor: const Color(0xFF2DB83D),
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(12),
),
minimumSize: const Size(double.infinity, 50),
elevation: 6,
),
child: const Text(
"Continue",
style: TextStyle(
fontSize: 18,
fontWeight: FontWeight.w600,
color: Colors.white,
),
),
),
const SizedBox(height: 20),
// Alternative login link
Center(
child: TextButton(
onPressed: () {
Navigator.pushReplacementNamed(context, '/signup');
},

43
SISTec/BTech/CS/2024/5/MajorProject_I/03

child: const Text(


"SignIn",
style: TextStyle(
color: Color(0xFF2DB83D),
fontSize: 16,
fontWeight: FontWeight.w600,
),
),
),
),
],
),
),
],
),
),
),
);
}
}

Home_info.dart

import 'package:flutter/material.dart';
import 'package:carousel_slider/carousel_slider.dart';
import 'package:krishak_sathi/constant.dart';

class HomePageInfo extends StatefulWidget {


const HomePageInfo({super.key});

@override
State<HomePageInfo> createState() => _HomePageInfoState();
}

class _HomePageInfoState extends State<HomePageInfo> {


// List of images for the carousel
final List<String> imageList = [
'assets/images/farmer1.jpg',
'assets/images/farmer2.jpg',
'assets/images/farmer3.jpg',
];

// List of news articles related to agriculture and farmers


final List<Map<String, String>> newsArticles = [
{
'title': 'Government Scheme for Farmers',
'image': 'assets/images/news1.jpg',
'description':
'This scheme helps farmers with financial aid for better crop production.',
},

44
SISTec/BTech/CS/2024/5/MajorProject_I/03

{
'title': 'New Agricultural Technology',
'image': 'assets/images/news2.jpg',
'description':
'Learn about new agricultural technology making farming more efficient.',
},
{
'title': 'Farming Tips for Winter',
'image': 'assets/images/news3.jpg',
'description':
'Stay prepared with these essential farming tips for the winter season.',
},
];

@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
title: const Text(
'Krishak Sathi',
style: TextStyle(
fontWeight: FontWeight.w600, fontSize: 22, color: Colors.white),
),
backgroundColor: GobalColors.PrimaryColor,
elevation: 5,
centerTitle: true,
),
body: ListView(
padding: const EdgeInsets.all(10),
children: [
// Carousel with farmer images
CarouselSlider(
options: CarouselOptions(
height: 250,
autoPlay: true,
enlargeCenterPage: true,
autoPlayInterval: const Duration(seconds: 4),
aspectRatio: 16 / 9,
enableInfiniteScroll: true,
viewportFraction: 0.85,
),
items: imageList
.map((item) => ClipRRect(
borderRadius: BorderRadius.circular(15),
child: Stack(
fit: StackFit.expand,
children: [
Image.asset(item, fit: BoxFit.cover),
Container(

45
SISTec/BTech/CS/2024/5/MajorProject_I/03

decoration: BoxDecoration(
gradient: LinearGradient(
colors: [
Colors.black.withOpacity(0.6),
Colors.transparent,
],
begin: Alignment.bottomCenter,
end: Alignment.topCenter,
),
),
), // Gradient overlay
Positioned(
bottom: 10,
left: 10,
child: Text(
'Inspiring Farmer Stories',
style: TextStyle(
fontSize: 16,
color: Colors.white,
fontWeight: FontWeight.bold,
shadows: [
Shadow(
color: Colors.black.withOpacity(0.8),
blurRadius: 5,
)
],
),
),
),
],
),
))
.toList(),
),

// Section heading
const SizedBox(height: 20),
const Padding(
padding: EdgeInsets.symmetric(horizontal: 10),
child: Text(
'News Related to Agriculture and Farmers',
style: TextStyle(
fontSize: 24,
fontWeight: FontWeight.bold,
color: GobalColors.PrimaryColor,
),
),
),
const SizedBox(height: 15),

46
SISTec/BTech/CS/2024/5/MajorProject_I/03

// News article cards with enhanced design


...newsArticles.map((article) {
return Card(
margin: const EdgeInsets.symmetric(vertical: 10, horizontal: 15),
elevation: 8,
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(20),
),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
// News article image with rounded top corners
ClipRRect(
borderRadius:
const BorderRadius.vertical(top: Radius.circular(20)),
child: Image.asset(
article['image']!,
height: 180,
width: double.infinity,
fit: BoxFit.cover,
),
),
// News title
Padding(
padding: const EdgeInsets.all(16.0),
child: Text(
article['title']!,
style: const TextStyle(
fontSize: 20,
fontWeight: FontWeight.w600,
color: Colors.black87,
),
),
),
// News description
Padding(
padding: const EdgeInsets.symmetric(
horizontal: 16.0, vertical: 8.0),
child: Text(
article['description']!,
style: const TextStyle(
fontSize: 14,
color: Colors.black54,
),
),
),
// Read more button
Align(
alignment: Alignment.centerRight,

47
SISTec/BTech/CS/2024/5/MajorProject_I/03

child: TextButton(
onPressed: () {
// Placeholder for "Read More" functionality
},
child: const Text(
'Read More',
style: TextStyle(color: Colors.green),
),
),
),
],
),
);
}).toList(),
],
),
);
}
}

Farmers_details.dart

import 'package:flutter/material.dart';

class FarmerDetailPage extends StatelessWidget {


static const String routeName = '/farmer-detail-page';
const FarmerDetailPage({super.key});

@override
Widget build(BuildContext context) {
return MaterialApp(
debugShowCheckedModeBanner: false,
home: Scaffold(
appBar: AppBar(
backgroundColor: const Color(0xFF2DB83D),
title: const Text(
"Farmer Details",
style: TextStyle(color: Colors.white),
),
centerTitle: true,
),
body: SingleChildScrollView(
child: Padding(
padding: const EdgeInsets.all(20.0),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [

48
SISTec/BTech/CS/2024/5/MajorProject_I/03

const SizedBox(height: 20),


// Input for Name
const Text(
"Name",
style: TextStyle(fontWeight: FontWeight.bold, fontSize: 16),
),
const SizedBox(height: 10),
TextField(
decoration: InputDecoration(
hintText: "Enter your name",
border: OutlineInputBorder(
borderRadius: BorderRadius.circular(12),
),
filled: true,
fillColor: Colors.white,
),
),
const SizedBox(height: 20),

// Input for House Number


const Text(
"House No",
style: TextStyle(fontWeight: FontWeight.bold, fontSize: 16),
),
const SizedBox(height: 10),
TextField(
decoration: InputDecoration(
hintText: "Enter house number",
border: OutlineInputBorder(
borderRadius: BorderRadius.circular(12),
),
filled: true,
fillColor: Colors.white,
),
),
const SizedBox(height: 20),

// Input for Address


const Text(
"Address",
style: TextStyle(fontWeight: FontWeight.bold, fontSize: 16),
),
const SizedBox(height: 10),
TextField(
maxLines: 3,
decoration: InputDecoration(
hintText: "Enter full address",
border: OutlineInputBorder(
borderRadius: BorderRadius.circular(12),
),

49
SISTec/BTech/CS/2024/5/MajorProject_I/03

filled: true,
fillColor: Colors.white,
),
),
const SizedBox(height: 20),

// Input for City


const Text(
"City",
style: TextStyle(fontWeight: FontWeight.bold, fontSize: 16),
),
const SizedBox(height: 10),
TextField(
decoration: InputDecoration(
hintText: "Enter city name",
border: OutlineInputBorder(
borderRadius: BorderRadius.circular(12),
),
filled: true,
fillColor: Colors.white,
),
),
const SizedBox(height: 20),

// Input for State


const Text(
"State",
style: TextStyle(fontWeight: FontWeight.bold, fontSize: 16),
),
const SizedBox(height: 10),
TextField(
decoration: InputDecoration(
hintText: "Enter state name",
border: OutlineInputBorder(
borderRadius: BorderRadius.circular(12),
),
filled: true,
fillColor: Colors.white,
),
),
const SizedBox(height: 20),

// Input for Pincode


const Text(
"Pincode",
style: TextStyle(fontWeight: FontWeight.bold, fontSize: 16),
),
const SizedBox(height: 10),
TextField(
keyboardType: TextInputType.number,
decoration: InputDecoration(

50
SISTec/BTech/CS/2024/5/MajorProject_I/03

hintText: "Enter pincode",


border: OutlineInputBorder(
borderRadius: BorderRadius.circular(12),
),
filled: true,
fillColor: Colors.white,
),
),
const SizedBox(height: 30),

// Submit Button
SizedBox(
width: double.infinity,
child: ElevatedButton(
onPressed: () {
Navigator.pushReplacementNamed(context, '/homePage');
},
style: ElevatedButton.styleFrom(
backgroundColor: const Color(0xFF2DB83D),
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(12),
),
minimumSize: const Size(double.infinity, 50),
elevation: 6,
),
child: const Text(
"Submit",
style: TextStyle(
fontSize: 18,
fontWeight: FontWeight.w600,
color: Colors.white,
),
),
),
),
],
),
),
),
),
);
}
}

51
SISTec/BTech/CS/2024/5/MajorProject_I/03

Lab.dart
import 'package:flutter/material.dart';
import 'package:krishak_sathi/constant.dart';

void main() {
runApp(const MyApp());
}

class MyApp extends StatelessWidget {


const MyApp({super.key});

@override
Widget build(BuildContext context) {
return MaterialApp(
debugShowCheckedModeBanner: false,
theme: ThemeData(
primarySwatch:
Colors.green, // Set the theme color (Green for agriculture)
appBarTheme: AppBarTheme(
backgroundColor: Colors.green[700], // Custom AppBar color
),
textTheme: const TextTheme(),
),
home: LabsPage(),
);
}
}

class LabsPage extends StatelessWidget {


// A sample list of labs in Bhopal (this can be fetched from a database or API)
final List<Map<String, String>> labs = [
{
'name': 'Bhopal Soil Testing Lab 1',
'address': 'gandhi Nagar, Bhopal',
'contact': '123-456-7890',
},
{
'name': 'Bhopal Soil Testing Lab 2',
'address': 'narela, Bhopal',
'contact': '123-456-7891',
},
{
'name': 'Bhopal Soil Testing Lab 3',
'address': 'indra Puri, Bhopal',
'contact': '123-456-7892',
},
{

52
SISTec/BTech/CS/2024/5/MajorProject_I/03

'name': 'Bhopal Soil Testing Lab 4',


'address': 'lal ghati, Bhopal',
'contact': '123-456-7892',
},
{
'name': 'Bhopal Soil Testing Lab 5',
'address': 'Minal road, Bhopal',
'contact': '123-456-7892',
},
{
'name': 'Bhopal Soil Testing Lab 6',
'address': 'Ayodhya Nagar, Bhopal',
'contact': '123-456-7892',
},
];

@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
title: const Text('Labs in Bhopal'),
foregroundColor: Colors.white,
backgroundColor: GobalColors.PrimaryColor,
),
body: ListView.builder(
itemCount: labs.length,
itemBuilder: (context, index) {
final lab = labs[index];
return Card(
margin: const EdgeInsets.symmetric(vertical: 10, horizontal: 15),
shape: RoundedRectangleBorder(
borderRadius:
BorderRadius.circular(20), // Rounded corners for the card
),
elevation: 10, // Add some shadow for a floating effect
color: Colors.green[50], // Light green background for the card
child: InkWell(
onTap: () {
showDialog(
context: context,
builder: (context) {
return AlertDialog(
title: Text(lab['name']!),
content: Text(
'Address: ${lab['address']}\nContact: ${lab['contact']}'),
actions: [
TextButton(
onPressed: () => {},
child: const Text('Close'),

53
SISTec/BTech/CS/2024/5/MajorProject_I/03

),
],
);
},
);
},
child: Padding(
padding: const EdgeInsets.all(16.0),
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
// Left side with lab details
Expanded(
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(
lab['name']!,
style: const TextStyle(
fontSize: 18,
fontWeight: FontWeight.bold,
color: Colors.green, // Dark green for title
),
),
const SizedBox(height: 8),
Text(
lab['address']!,
style: const TextStyle(
fontSize: 16,
color: Colors.grey, // Darker grey for address
),
),
const SizedBox(height: 8),
Text(
'Contact: ${lab['contact']}',
style: const TextStyle(
fontSize: 14,
color: Colors.grey, // Lighter grey for contact
),
),
],
),
),
// Enhanced Arrow button
GestureDetector(
onTap: () {
showDialog(
context: context,
builder: (context) {
return AlertDialog(

54
SISTec/BTech/CS/2024/5/MajorProject_I/03

title: Text(lab['name']!),
content: Text(
'Address: ${lab['address']}\nContact: ${lab['contact']}'),
actions: [
TextButton(
onPressed: () => Navigator.pop(context),
child: const Text('Close'),
),
],
);
},
);
},
child: Container(
decoration: BoxDecoration(
color: Colors.green[700], // Dark green background
shape: BoxShape.circle,
boxShadow: [
BoxShadow(
color: Colors.black26,
blurRadius: 8,
offset: Offset(0, 4),
),
], // Shadow effect for depth
),
padding: const EdgeInsets.all(
12.0), // Space inside the button
child: GestureDetector(
onTap: () {
Navigator.pushNamed(context, '/confirm_address');
},
child: const Icon(
Icons.arrow_forward_ios,
color: Colors.white, // White icon for contrast
size: 20, // Icon size
),
),
),
),
],
),
),
),
);
},
),
);
}
}

55
SISTec/BTech/CS/2024/5/MajorProject_I/03
SISTec/BTech/CS/2024/5/MajorProject_I/03

CHAPTER-9
RESULT AND OUTPUT SCREENS

9.1 RESULTS
Krishak Sathi: Empowering Farmers with Data-Driven
Insights
 Accurate Soil Analysis : Our app provides precise soil testing reports,
identifying deficiencies in essential minerals like nitrogen, phosphorus, and
potassium.

 Personalized Crop Recommendations: Based on soil analysis, we offer


tailored crop recommendations to optimize yield and quality.

 Real-time Weather Updates : Farmers can access accurate weather forecasts to plan
their farming activities effectively.

 Market Insights : Stay informed about market trends and prices to make
informed decisions.

9.2 OUTPUT SCREENS


Below are the output screens captured during the testing phase:

38
SISTec/BTech/CS/2024/5/MajorProject_I/03

Figure 9.2.1: Login and Signup Page at app opeaning

Figure 9.2.2: Signup Details and home Page of app

38
SISTec/BTech/CS/2024/5/MajorProject_I/03

Figure 9.2.2: Profile Detail’s and Lab’s Detail’s

Figure 9.2.4: Whether Report and Soil Report details


39
SISTec/BTech/CS/2024/5/MajorProject_I/03

Figure 9.2.4: Lab Booking Details and and Soil Test Tracker

40

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy