Skip to content

reef-chain/reef-chain-flutter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

26 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Features

Exposed Dart Classes for easy flutter integration with Reef chain

Getting started

Add dependency to pubscpek.yaml, copy lib/js/packages/reef-mobile-js/dist/index.js to your app under same path and add this .js file to assets in pubspeck.yaml

Usage

import 'package:reef_chain_flutter/reef_chain_flutter.dart';

final JsApiService reefJsApiService = JsApiService.reefAppJsApi(onErrorCb: (){
  debugPrint('JS CONNECTION ERROR');
});

widget.reefJsApiService.jsCall("window.isJsConn()").then((v)=>debugPrint(v.toString()));
widget.reefJsApiService.jsPromise("window.futureFn(\"fltrrr\")").then((v)=>debugPrint(v.toString()));
widget.reefJsApiService.jsObservable("window.testObs()").listen((v)=>debugPrint(v.toString()));

Example App Repo

https://github.com/reef-chain/reef-flutter-lib-example-app

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published