flutter_rave 0.0.5

Rave by Flutterwave Plugin for Flutter #

pub package

A Flutter plugin for making payments via Rave by Flutterwave Payment Gateway. Fully supports Android and iOS.

Installation #

To use this plugin, add flutter_rave as a dependency in your pubspec.yaml file.

Then initialize the plugin preferably in the initState of your widget.

import 'package:flutter_rave/flutter_rave.dart';

class _MyHomePageState extends State<MyHomePage> {
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: Text(widget.title),
      body: Builder(
        builder: (context) => SingleChildScrollView(
              child: Column(
                mainAxisAlignment: MainAxisAlignment.start,
                children: <Widget>[
                    'Pay Me',
                    onPressed: () {
                    icon: Icon(Icons.email),
                    label: Text("Pay"),

  _pay(BuildContext context) {
    final _rave = RaveCardPayment(
      isDemo: true,
      encKey: "c53e399709de57d42e2e36ca",
      publicKey: "FLWPUBK-d97d92534644f21f8c50802f0ff44e02-X",
      transactionRef: "SCH${DateTime.now().millisecondsSinceEpoch}",
      amount: 100,
      email: "demo1@example.com",
      onSuccess: (response) {
        print("Transaction Successful");

        if (mounted) {
              content: Text("Transaction Sucessful!"),
              backgroundColor: Colors.green,
              duration: Duration(
                seconds: 5,
      onFailure: (err) {
        print("Transaction failed");
      onClosed: () {
        print("Transaction closed");
      context: context,


No other configuration required—the plugin works out of the box.

Running Example project #

For help getting started with Flutter, view the online documentation.

An example project has been provided in this plugin. Clone this repo and navigate to the example folder. Open it with a supported IDE or execute flutter run from that folder in terminal.

Contributing, Issues and Bug Reports #

The project is open to public contribution. Please feel very free to contribute. Experienced an issue or want to report a bug? Please, report it here. Remember to be as descriptive as possible.

[0.0.1] - 04-06-2019.

  • Initial release.

[0.0.2] - 06-06-2019.

  • Added Subaccount field.

[0.0.3] - 06-06-2019.

  • Bug Fixes

[0.0.4] - 09-06-2019.

  • Bug Fixes

[0.0.5] - 12-07-2019.

  • Bug Fixes


example #

A new Flutter project.

Getting Started #

This project is a starting point for a Flutter application.

A few resources to get you started if this is your first Flutter project:

For help getting started with Flutter, view our online documentation, which offers tutorials, samples, guidance on mobile development, and a full API reference.

Use this package as a library

1. Depend on it

Add this to your package's pubspec.yaml file:

  flutter_rave: ^0.0.5

2. Install it

You can install packages from the command line:

with Flutter:

$ flutter pub get

Alternatively, your editor might support flutter pub get. Check the docs for your editor to learn more.

3. Import it

Now in your Dart code, you can use:

import 'package:flutter_rave/flutter_rave.dart';
Describes how popular the package is relative to other packages. [more]
Code health derived from static analysis. [more]
Reflects how tidy and up-to-date the package is. [more]
Weighted score of the above. [more]
Learn more about scoring.

We analyzed this package on Feb 13, 2020, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.7.1
  • pana: 0.13.5
  • Flutter: 1.12.13+hotfix.7

Health suggestions

Fix lib/rave_provider.dart. (-1.49 points)

Analysis of lib/rave_provider.dart reported 3 hints:

line 500 col 30: This function has a return type of 'String', but doesn't end with a return statement.

line 572 col 30: This function has a return type of 'String', but doesn't end with a return statement.

line 592 col 30: This function has a return type of 'String', but doesn't end with a return statement.

Format lib/flutter_rave.dart.

Run flutter format to format lib/flutter_rave.dart.

Maintenance issues and suggestions

Support latest dependencies. (-50 points)

The version constraint in pubspec.yaml does not support the latest published versions for 5 dependencies (dio, dio_flutter_transformer, equatable, flutter_svg, intl).

Package is pre-v0.1 release. (-10 points)

While nothing is inherently wrong with versions of 0.0.*, it might mean that the author is still experimenting with the general direction of the API.


Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.1.0 <3.0.0
crypto ^2.0.6 2.1.4
cupertino_icons ^0.1.2 0.1.3
dio ^2.1.0 2.2.2 3.0.8
dio_flutter_transformer ^2.0.10 2.0.10 3.0.2
equatable ^0.2.3 0.2.6 1.1.0
flushbar ^1.3.0 1.9.1
flutter 0.0.0
flutter_svg ^0.13.1 0.13.1 0.17.1
flutter_webview_plugin ^0.3.5 0.3.10+1
intl ^0.15.8 0.15.8 0.16.1
tripledes ^2.1.0 2.1.0
url_launcher ^5.0.2 5.4.1
webview_flutter ^0.3.9 0.3.19+7
Transitive dependencies
charcode 1.1.3
collection 1.14.11 1.14.12
convert 2.1.1
cookie_jar 1.0.1
flutter_web_plugins 0.0.0
meta 1.1.8
path 1.6.4
path_drawing 0.4.1
path_parsing 0.1.4
petitparser 3.0.1
plugin_platform_interface 1.0.1
sky_engine 0.0.99
typed_data 1.1.6
url_launcher_macos 0.0.1+2
url_launcher_platform_interface 1.0.5
url_launcher_web 0.1.1
vector_math 2.0.8
xml 3.7.0
Dev dependencies