open method

Future<FluidResponse?> open(
  1. BuildContext context, {
  2. required String email,
  3. required int amount,
  4. String name = '',
  5. String phone = '',
  6. String reference = '',
  7. Map<String, dynamic> metadata = const {},
  8. Widget? errorWidget,
})

Opens the fluidcoins widget.

Implementation

Future<FluidResponse?> open(
  BuildContext context, {
  required String email,
  required int amount,
  String name: '',
  String phone: '',
  String reference: '',
  Map<String, dynamic> metadata: const {},
  Widget? errorWidget,
}) async {
  return await Navigator.push(
    context,
    MaterialPageRoute(
      builder: (BuildContext context) => FluidCoinsWidget(
        apiKey: apiKey,
        email: email,
        amount: amount,
        name: name,
        phone: phone,
        metadata: metadata,
        errorWidget: errorWidget,
        reference: reference,
      ),
    ),
  );
}