Official Flutter SDK package for integrating Freshfield updates. This SDK allows you to fetch and display updates from your Freshfield dashboard directly in your Flutter app.
Since freshfield is in the early stages of development, we recommend you to take a look at an example implementation. example/lib/main.dart.
Add to your pubspec.yaml file:
dependencies:
freshfield:
git:
url: https://github.com/freshfieldio/flutter_sdkInitialize the Freshfield service and fetch updates in your Flutter application:
import 'package:freshfield/freshfield.dart';
// Initialize the service
final freshfield = FreshfieldService();
freshfield.init('YOUR_API_KEY');
// Get updates
final updates = await freshfield.getUpdates(limit: 5, offset: 0);init(String apiKey): Initialize the service with your API key.getUpdates({int limit = 10, int offset = 0}): Fetch updates with pagination support
The Update model contains the following fields:
id: Stringtitle: Stringdescription: Stringcreated: DateTimfeatures: List
The Feature model contains:
name: Stringdescription: Stringtype: Stringicon: String? - (SVG icon string, check example/lib/main.dart for svg render)