v8.1.0dropdown_search
简单、响应式且高度可定制的 Flutter 下拉菜单,具有众多功能(搜索、弹出窗口平台、异步/同步等),支持多种模式,如菜单、对话框、底部弹出窗等。
连接农民与企业,使他们能够直接向买家销售农作物
以下为英文项目原文快照,最新内容请访问 GitHub。
Farm Mate is a Flutter-based mobile app designed to connect farmers with businesses, enabling them to sell crops directly to buyers. Below is a breakdown of the various components and features used in the app:
Flutter is the primary framework used for building the app. It provides a fast and efficient way to develop natively compiled applications for mobile, web, and desktop from a single codebase.
Firebase is used for backend services in Farm Mate. It provides real-time databases, authentication, cloud storage, and other services that make it easier to develop the app.
The app leverages location-based features to connect farmers and businesses based on proximity.
Farm Mate integrates real-time weather updates to help farmers check the weather conditions for their area.
The Farmer Dashboard provides farmers with a comprehensive interface to manage their crops. Farmers can:
The Buyer Dashboard is designed for businesses (buyers) to browse available crops. Buyers can:
The app uses Firebase Authentication to securely manage user logins. Both farmers and businesses can:
The app uses the Geolocator and Geocoding packages to provide:
Ensure you have the following installed:
git clone https://github.com/yourusername/farmmate.git
cd farmmate
flutter pub get
lib/ApiKey.dart and replace the placeholder:const String apiKey = 'YOUR_API_KEY_HERE';
The Farm Mate app uses Firebase for:
dependencies:
firebase_auth: ^3.3.4
import 'package:firebase_core/firebase_core.dart';
import 'package:flutter/material.dart';
void main() async {
WidgetsFlutterBinding.ensureInitialized();
await Firebase.initializeApp();
runApp(MyApp());
}
Future<User?> signUp(String email, String password) async {
try {
UserCredential userCredential = await FirebaseAuth.instance
.createUserWithEmailAndPassword(email: email, password: password);
return userCredential.user;
} catch (e) {
print("Error: $e");
return null;
}
}
Future<User?> signIn(String email, String password) async {
try {
UserCredential userCredential = await FirebaseAuth.instance
.signInWithEmailAndPassword(email: email, password: password);
return userCredential.user;
} catch (e) {
print("Error: $e");
return null;
}
}
farmers, buyers, crops.dependencies:
cloud_firestore: ^3.1.5
FirebaseFirestore firestore = FirebaseFirestore.instance;
Future<void> addUserData(String userId, String collection, Map<String, dynamic> data) async {
try {
await firestore.collection(collection).doc(userId).set(data);
} catch (e) {
print("Error: $e");
}
}
Future<void> addCropData(String cropId, Map<String, dynamic> cropData) async {
try {
await firestore.collection('crops').doc(cropId).set(cropData);
} catch (e) {
print("Error: $e");
}
}
Future<QuerySnapshot> getCrops() async {
return await firestore.collection('crops').get();
}
git checkout -b feature-branch).git commit -m 'Add new feature').git push origin feature-branch).This project is licensed under the MIT License.
For queries or collaborations, contact amoghreddykb1@gmail.com.
简单、响应式且高度可定制的 Flutter 下拉菜单,具有众多功能(搜索、弹出窗口平台、异步/同步等),支持多种模式,如菜单、对话框、底部弹出窗等。
一个 Flutter 地理编码插件,提供便捷的地理编码和逆地理编码功能。
该包包含美丽的天气动画。通过天气配置器轻松设置!
可自定义的 DropdownSearchField,扩展了 DropdownButton、TextFormField 和 Autocomplete 的功能。
适用于 Flutter 的自定义评分条,支持自定义图标、半图标、方向、对齐方式等更多功能。
依赖清单 16 项
{"sdk":"flutter"}^1.0.8^3.11.0^5.4.2^5.6.3^3.0.0^1.1.2+2^2.0.0^0.18.0^1.3.0^9.0.1^3.0.0^1.1.1^0.14.3{"sdk":"flutter"}^4.0.0先按使用场景筛选,再比较项目活跃情况,最后到原始仓库核对使用要求。
“A repository is the most basic element of GitHub.”
GitHub Docs — About repositories ↗
v1.2.0
v1.3.0+1
v3.0.0