From e32a4486ec6f24a153dbe3bfe0ef0b0b4b2d25fb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=90=D0=B2=D0=BE?= Date: Fri, 25 Feb 2022 21:14:46 +0400 Subject: [PATCH] 2.4.21 --- doc/mati-flutter.md | 40 ++++++++++++++++++------------------ lib/mati_plugin_flutter.dart | 2 +- pubspec.yaml | 2 +- 3 files changed, 22 insertions(+), 22 deletions(-) diff --git a/doc/mati-flutter.md b/doc/mati-flutter.md index e5aed8f..ec3249e 100644 --- a/doc/mati-flutter.md +++ b/doc/mati-flutter.md @@ -5,12 +5,12 @@ slug: "flutter-sdk" category: 61ae8e8dba577a0010791480 --- -# Mati for Flutter Usage Guide +# Metamap for Flutter Usage Guide ## Flutter Demo App -You can go to GitHub to download the [Mati Flutter demo app](https://github.com/GetMati/mati-mobile-examples/tree/main/flutterDemoApp). +You can go to GitHub to download the [MetaMap Flutter demo app](https://github.com/GetMati/mati-mobile-examples/tree/main/flutterDemoApp). ## Dependencies @@ -18,12 +18,12 @@ You can go to GitHub to download the [Mati Flutter demo app](https://github.com/ Add `mati_plugin_flutter` dependency to your `pubspec.yaml` file: ```yaml - mati_plugin_flutter: 2.4.12 + mati_plugin_flutter: 2.4.20 ``` -## Install Mati for Flutter +## Install MetaMap for Flutter -Install the Mati Flutter plugin for: +Install the MetaMap Flutter plugin for: * [Android](#android) * [iOS](#ios) @@ -39,28 +39,28 @@ Add the following to `info.plist`: ```xml NSCameraUsageDescription - Mati verification SDK requires camera use + MetaMap verification SDK requires camera use NSMicrophoneUsageDescription - Mati verification SDK requires microphone use + MetaMap verification SDK requires microphone use NSPhotoLibraryUsageDescription - Mati verification SDK requires access to media library + MetaMap verification SDK requires access to media library ``` -## Implement Mati in Your App +## Implement MetaMap in Your App -To start the Mati verification flow, call the following when the user taps on the Mati button: +To start the MetaMap verification flow, call the following when the user taps on the MetaMap button: ```java - MatiFlutter.showMatiFlow(CLIENT_ID, FLOW_ID, METADATA) + MetaMapFlutter.showMetaMapFlow(CLIENT_ID, FLOW_ID, METADATA) ``` -The verification results will arrive in `MatiFlutter.resultCompleter.future` in a reply similar to the following: +The verification results will arrive in `MetaMapFlutter.resultCompleter.future` in a reply similar to the following: ```c++ -MatiFlutter.resultCompleter.future.then((result) => Fluttertoast.showToast( +MetaMapFlutter.resultCompleter.future.then((result) => Fluttertoast.showToast( msg: result is ResultSuccess ? "Success ${result.verificationId}" : "Cancelled", toastLength: Toast.LENGTH_SHORT, gravity: ToastGravity.BOTTOM)); @@ -68,7 +68,7 @@ MatiFlutter.resultCompleter.future.then((result) => Fluttertoast.showToast( ### Example Application -The following is an example application (MyApp) with the Mati verification flow: +The following is an example application (MyApp) with the MetaMap verification flow: ```c++ import 'package:flutter/material.dart'; @@ -83,7 +83,7 @@ class MyApp extends StatelessWidget { @override Widget build(BuildContext context) { return MaterialApp( - title: 'Mati flutter plugin demo', + title: 'MetaMap flutter plugin demo', theme: ThemeData( primarySwatch: Colors.blue, ), @@ -101,9 +101,9 @@ class MyHomePage extends StatefulWidget { class _MyHomePageState extends State { - void showMatiFlow() { - MatiFlutter.showMatiFlow("CLIENT_ID", "FLOW_ID", {}); - MatiFlutter.resultCompleter.future.then((result) => Fluttertoast.showToast( + void showMetaMapFlow() { + MetaMapFlutter.showMetaMapFlow("CLIENT_ID", "FLOW_ID", {}); + MetaMapFlutter.resultCompleter.future.then((result) => Fluttertoast.showToast( msg: result is ResultSuccess ? "Success ${result.verificationId}" : "Cancelled", toastLength: Toast.LENGTH_SHORT, gravity: ToastGravity.BOTTOM)); @@ -113,11 +113,11 @@ class _MyHomePageState extends State { Widget build(BuildContext context) { return Scaffold( appBar: AppBar( - title: Text("Mati flutter plugin demo"), + title: Text("MetaMap flutter plugin demo"), ), body: Center( child: ElevatedButton( - onPressed: showMatiFlow, + onPressed: showMetaMapFlow, child: const Text('Verify me'), ) ) diff --git a/lib/mati_plugin_flutter.dart b/lib/mati_plugin_flutter.dart index 3180c7a..72a47d3 100644 --- a/lib/mati_plugin_flutter.dart +++ b/lib/mati_plugin_flutter.dart @@ -1,7 +1,7 @@ import 'dart:async'; import 'package:flutter/services.dart'; -class MatiFlutter { +class MetaMapFlutter { static var resultCompleter; static const MethodChannel _channel = const MethodChannel('mati_flutter'); diff --git a/pubspec.yaml b/pubspec.yaml index 11a92b3..a45284a 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,7 +1,7 @@ name: mati_plugin_flutter description: Flutter plugin for Mati SDK. -version: 2.4.20 +version: 2.4.21 homepage: 'https://github.com/GetMati/mati-flutter-plugin' environment: