Line Sorter API - Dart/Flutter Client
Line Sorter organizes text by sorting lines alphabetically in ascending or descending order with case-sensitive options.
This is the Dart/Flutter client for the Line Sorter API.
Installation
Add this to your pubspec.yaml:
dependencies:
apiverve_linesorter: ^1.2.5
Then run:
dart pub get
# or for Flutter
flutter pub get
Usage
import 'package:apiverve_linesorter/apiverve_linesorter.dart';
void main() async {
final client = LinesorterClient('YOUR_API_KEY');
try {
final response = await client.execute({
'lines': The quick brown fox jumps over the lazy dog,An apple a day keeps the doctor away,banana,Cherry blossoms bloom in spring,date,
'order': 'asc',
'caseSensitive': false
});
print('Status: ${response.status}');
print('Data: ${response.data}');
} catch (e) {
print('Error: $e');
}
}
Response
{
"status": "ok",
"error": null,
"data": {
"sorted": [
"An apple a day keeps the doctor away",
"banana",
"Cherry blossoms bloom in spring",
"date",
"The quick brown fox jumps over the lazy dog"
],
"lineCount": 5,
"order": "asc",
"caseSensitive": false
}
}
API Reference
- API Home: Line Sorter API
- Documentation: docs.apiverve.com/ref/linesorter
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_linesorter
- Line Sorter API client for Dart/Flutter