sui_sec_blocklist 0.2.1 copy "sui_sec_blocklist: ^0.2.1" to clipboard
sui_sec_blocklist: ^0.2.1 copied to clipboard

Fetch and execute lookups on Suiet Guardians blocklists. Protect your wallet from phishing.

example/lib/main.dart

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

import 'scan_coin.dart';
import 'scan_domain.dart';
import 'scan_nft.dart';
import 'scan_package.dart';

void main() {
  runApp(MaterialApp(home: _HomePage()));
}

class _HomePage extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(title: Text('Scam Demo')),
      body: SafeArea(
        child: SingleChildScrollView(
          padding: EdgeInsets.all(16),
          child: Center(
            child: Column(
              crossAxisAlignment: CrossAxisAlignment.start,
              children: [
                _ScanResultWidget(stream: scanCoin()),
                _ScanResultWidget(stream: scanPackage()),
                _ScanResultWidget(stream: scanDomain()),
                _ScanResultWidget(stream: scanNFT()),
              ],
            ),
          ),
        ),
      ),
    );
  }
}

class _ScanResultWidget extends StatelessWidget {
  const _ScanResultWidget({required this.stream});

  final Stream<Widget> stream;

  @override
  Widget build(BuildContext context) {
    return Container(
      margin: EdgeInsets.symmetric(vertical: 8),
      child: SelectionArea(
        child: StreamBuilder(
          stream: stream,
          builder: (context, snapshot) {
            return Column(
              mainAxisSize: MainAxisSize.min,
              crossAxisAlignment: CrossAxisAlignment.start,
              children: [
                if (snapshot.data != null) snapshot.data!,
                if (snapshot.connectionState != ConnectionState.done)
                  const SizedBox.square(
                    dimension: 24,
                    child: CupertinoActivityIndicator(),
                  ),
              ],
            );
          },
        ),
      ),
    );
  }
}
1
likes
160
points
68
downloads

Publisher

verified publishersurf.tech

Weekly Downloads

Fetch and execute lookups on Suiet Guardians blocklists. Protect your wallet from phishing.

Repository (GitHub)
View/report issues

Topics

#sui

Documentation

API reference

License

MIT (license)

Dependencies

flutter, html, http, path, path_provider

More

Packages that depend on sui_sec_blocklist