agent_dart 1.0.0-dev.25 copy "agent_dart: ^1.0.0-dev.25" to clipboard
agent_dart: ^1.0.0-dev.25 copied to clipboard

An agent library built for Internet Computer, a plugin package for dart and flutter apps. Developers can build ones to interact with Dfinity's blockchain directly.

example/lib/main.dart

import 'package:agent_dart/agent_dart.dart' as agent_dart;
import 'package:flutter/material.dart';

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

class MyApp extends StatefulWidget {
  const MyApp({super.key});

  @override
  State<MyApp> createState() => _MyAppState();
}

class _MyAppState extends State<MyApp> {
  String phrase = agent_dart.generateMnemonic();

  void _refreshMnemonic() {
    phrase = agent_dart.generateMnemonic();
  }

  @override
  Widget build(BuildContext context) {
    const textStyle = TextStyle(fontSize: 25);
    return MaterialApp(
      home: Scaffold(
        appBar: AppBar(
          title: const Text('Native Packages'),
        ),
        body: SingleChildScrollView(
          child: Container(
            padding: const EdgeInsets.all(10),
            child: Column(
              children: [
                Text(
                  'Phrase: $phrase',
                  style: textStyle,
                  textAlign: TextAlign.center,
                ),
              ],
            ),
          ),
        ),
        floatingActionButton: FloatingActionButton(
          onPressed: () {
            _refreshMnemonic();
          },
          child: const Icon(Icons.refresh),
        ),
      ),
    );
  }
}
21
likes
0
points
732
downloads

Publisher

verified publisherastrox.io

Weekly Downloads

An agent library built for Internet Computer, a plugin package for dart and flutter apps. Developers can build ones to interact with Dfinity's blockchain directly.

Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

agent_dart_base, flutter

More

Packages that depend on agent_dart