strike 0.0.7 copy "strike: ^0.0.7" to clipboard
strike: ^0.0.7 copied to clipboard

outdated

A pure Dart SDK wrapper for the Strike APIs. Strike uses Bitcoin technology to offer instant payments globally, with no added fees. Use Strike to pay your friends, buy goods and services online, make [...]

example/lib/main.dart

import 'package:example/invoices/invoices.dart';
import 'package:example/rates/exchange_rates.dart';
import 'package:example/users/user_search.dart';
import 'package:flutter/material.dart';
import 'package:strike/strike.dart';
import 'package:flutter_dotenv/flutter_dotenv.dart';

late final Strike strike;

Future<void> main()  async {
  await dotenv.load(fileName: '.env');

  strike = Strike(
    apiKey: dotenv.env['STRIKE_API_KEY']!,
    debugMode: true,
  );

  runApp(const MyApp());
}

class MyApp extends StatelessWidget {
  const MyApp({Key? key}) : super(key: key);

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Strike API Demo',
      theme: ThemeData(
        primarySwatch: Colors.blue,
      ),
      home: const MyHomePage(title: 'Strike API Demo'),
    );
  }
}

class MyHomePage extends StatefulWidget {
  const MyHomePage({Key? key, required this.title}) : super(key: key);

  final String title;

  @override
  State<MyHomePage> createState() => _MyHomePageState();
}

class _MyHomePageState extends State<MyHomePage> {


  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: Text(widget.title),
      ),
      body: ListView(
        children: [
          ListTile(
            title: const Text('Invoices'),
            onTap: (){
              Navigator.of(context).push(MaterialPageRoute(builder: (context) => const Invoices(),));
            },
          ),
          ListTile(
            onTap: (){
              Navigator.of(context).push(MaterialPageRoute(builder: (context) => UserSearch()));
            },
            title: const Text('User Search'),
          ),
          ListTile(
            onTap: (){
              Navigator.of(context).push(MaterialPageRoute(builder: (context) => ExchangeRates()));
            },
            title: const Text('Exchange Rates'),
          ),
        ],
      ),
    );
  }
}
1
likes
0
pub points
0%
popularity

Publisher

verified publishercodeontherocks.dev

A pure Dart SDK wrapper for the Strike APIs. Strike uses Bitcoin technology to offer instant payments globally, with no added fees. Use Strike to pay your friends, buy goods and services online, make micropayments, tip content creators, as well as buy and sell bitcoin.

Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

collection, flutter, http, json_annotation, json_serializable, url_launcher

More

Packages that depend on strike