USDA Hardiness Zone API - Dart/Flutter Client
USDA Hardiness Zone looks up the plant hardiness zone by ZIP code, mapping any US ZIP code to its zone title and temperature range. Paid plans add the zone classification code, Celsius values, and plant survival recommendations.
This is the Dart/Flutter client for the USDA Hardiness Zone API.
Installation
Add this to your pubspec.yaml:
dependencies:
apiverve_hardinesszone: ^1.2.4
Then run:
dart pub get
# or for Flutter
flutter pub get
Usage
import 'package:apiverve_hardinesszone/apiverve_hardinesszone.dart';
void main() async {
final client = HardinesszoneClient('YOUR_API_KEY');
try {
final response = await client.execute({
'zip': '97201'
});
print('Status: ${response.status}');
print('Data: ${response.data}');
} catch (e) {
print('Error: $e');
}
}
Response
{
"status": "ok",
"error": null,
"data": {
"zipCode": "97201",
"zone": "8b",
"tempRange": "15 to 20",
"zoneTitle": "8b: 15 to 20",
"details": {
"tempRange": "15°F to 20°F (-9°C to -7°C)",
"description": "Mild and relatively warm, found in parts of southern U.S. like the Gulf Coast and parts of Texas.",
"plantSurvival": "A wide range of plants, including many Mediterranean and subtropical varieties."
}
}
}
API Reference
- API Home: USDA Hardiness Zone API
- Documentation: docs.apiverve.com/ref/hardinesszone
Authentication
All requests require an API key. Get yours at apiverve.com.
License
MIT License - see LICENSE for details.
Built with Dart for APIVerve
Libraries
- apiverve_hardinesszone
- USDA Hardiness Zone API client for Dart/Flutter