big.dart

A wrapper library for access to bignumber.js from the Dart Language.

See https://github.com/MikeMcl/bignumber.js for bignumber.js.

An example of how to use in a Dart Project:-

// index.html //

<head>

<title>BigNumber for Dart Development</title>

<script src="bignumber.js"></script>

</head>

<body>

<p id="text">Testing the Dart Language wrapper for bignumber.js</p>

<script type="application/dart" src="index.dart"></script>

</body>

</html>

// index.dart //

import 'package:big/big.dart';

import 'dart:html';

TextAreaElement ta;

void TextAreaElementOnChange(Event event){

ta.style.height = '24px';

ta.style.height = (ta.scrollHeight + 12).toString() + 'px';

ta.style.width=ta.scrollWidth.toString()+'px';

}//end function

void main(){

ta = new TextAreaElement();

ta.wrap='off';

ta.onChange.listen(TextAreaElementOnChange);

document.body.append(ta);

ta.text+=BigNumber.test();

BigNumber bn = new BigNumber('12345678901234567890.12345678901234567890');

ta.text+='\n\n'+bn.toString();

TextAreaElementOnChange(new Event(''));

}//end main

Libraries

big