π¦ Printful Flutter Plugin
A Flutter plugin for integrating with the Printful API.
Easily manage products, orders, and shipping in your Flutter app with native Android/iOS support.
π Features
- π Authentication β Connect with your Printful account via API Key.(Auto save token and refresh token)
- π¦ Product Management β Fetch product catalog, variants, and details.
- π Order Handling β Create and manage orders directly from your app.
- π Shipping Rates β Retrieve live shipping estimates.
- π Order Tracking β Get real-time shipment tracking updates.
π₯ Installation
Add this line to your pubspec.yaml
:
dependencies:
printful: ^latest
Run flutter pub get
to install the plugin into your app.
π Usage
Import the package:
import 'package:printful/printful.dart';
Use Private key or set Bearer token:
Printful.instance.setBearerToken;
Public App authorization:
<activity
android:name="com.linusu.flutter_web_auth_2.CallbackActivity"
android:exported="true"
android:taskAffinity="">
<intent-filter android:label="flutter_web_auth_2">
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<data android:scheme="YOUR_SCHEME" />
</intent-filter>
</activity>
<key>CFBundleURLTypes</key>
<array>
<dict>
<key>CFBundleTypeRole</key>
<string>Editor</string>
<key>CFBundleURLName</key>
<string>com.example.abc</string>
<key>CFBundleURLSchemes</key>
<array>
<string>YOUR_SCHEME</string>
</array>
</dict>
</array>
required call Printful.instance.configPublicApp
earlier
Printful.instance.OAUTH_API.authorize;
Printful.instance.setHeaderStoreId;
Printful.instance.OAUTH_API;
Printful.instance.ORDER_API;
Printful.instance.CATALOG_API;
Printful.instance.PRODUCT_API;
Printful.instance.PRODUCT_TEMPLATE_API;
Printful.instance.FILE_LIBRARY_API;
Printful.instance.SHIPPING_RATE_API;
Printful.instance.COUNTRY_API;
Printful.instance.TAX_RATE_API;
Printful.instance.STORE_INFORMATION_API;
Printful.instance.WAREHOUSE_PRODUCT_API;
π License
This project is licensed under the MIT License - see the LICENSE file for details.
π‘ Contributing
Contributions are welcome!
Feel free to open an issue or submit a pull request.