trustdart 0.3.6 copy "trustdart: ^0.3.6" to clipboard
trustdart: ^0.3.6 copied to clipboard

A dart library that can interact with the trust wallet core library.

example/lib/main.dart

import 'package:flutter/material.dart';
import 'dart:async';

import 'package:trustdart_example/operations.dart';

void main() {
  runApp(MyApp());
}

class MyApp extends StatefulWidget {
  @override
  _MyAppState createState() => _MyAppState();
}

class _MyAppState extends State<MyApp> {
  @override
  void initState() {
    super.initState();
    initPlatformState();
  }

  // Platform messages are asynchronous, so we initialize in an async method.
  Future<void> initPlatformState() async {
    runOperations();

    // If the widget was removed from the tree while the asynchronous platform
    // message was in flight, we want to discard the reply rather than calling
    // setState to update our non-existent appearance.
    if (!mounted) return;
  }

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: Scaffold(
        appBar: AppBar(
          title: const Text('Plugin example app'),
        ),
        body: Center(
          child: Column(
            mainAxisAlignment: MainAxisAlignment.spaceEvenly,
            children: [
              Container(
                child: TextButton(
                  style: TextButton.styleFrom(
                    foregroundColor: Colors.black, padding: const EdgeInsets.all(16.0),
                    backgroundColor: Colors.red,
                    textStyle: const TextStyle(fontSize: 20),
                  ),
                  onPressed: () {},
                  child: const Text('Create a new multi-coin wallet'),
                ),
              ),
              Container(
                child: TextButton(
                  style: TextButton.styleFrom(
                    foregroundColor: Colors.black, padding: const EdgeInsets.all(16.0),
                    backgroundColor: Colors.yellow,
                    textStyle: const TextStyle(fontSize: 20),
                  ),
                  onPressed: () {},
                  child: const Text('Generate the default addresses.'),
                ),
              ),
              Container(
                child: TextButton(
                  style: TextButton.styleFrom(
                    foregroundColor: Colors.black, padding: const EdgeInsets.all(16.0),
                    backgroundColor: Colors.green,
                    textStyle: const TextStyle(fontSize: 20),
                  ),
                  onPressed: () {},
                  child: const Text('Sign transactions for sending.'),
                ),
              ),
            ],
          ),
        ),
      ),
    );
  }
}
12
likes
160
points
325
downloads

Publisher

unverified uploader

Weekly Downloads

A dart library that can interact with the trust wallet core library.

Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (license)

Dependencies

flutter

More

Packages that depend on trustdart