A Flutter plugin for converting the currencies.
This project is a starting point for a Flutter plug-in package, a specialized package that includes platform-specific implementation code for Android and/or iOS.
For help getting started with Flutter, view our online documentation, which offers tutorials, samples, guidance on mobile development, and a full API reference.
- Pub get
import 'package:flutter_currency_converter/flutter_currency_converter.dart'; import 'package:flutter_currency_converter/Currency.dart';
- Call FlutterCurrencyConverter.convert
- The convert method required two parameters. These are From and To Currency objects.
- The Currency objects must have Currency types.
- For the From Currency object can add the amount as an optional parameter. Otherwise, it always returns the value for 1 unit.
await FlutterCurrencyConverter.convert( Currency(Currency.USD), Currency(Currency.LKR)); await FlutterCurrencyConverter.convert( Currency(Currency.AUD,amount: 100), Currency(Currency.CHF));