Skip to content

euronay/cryptocoins-icons-flutter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Cryptocoins Icons for Flutter

Making Cryptocoins available for Flutter.

Original project at AllienWorks/cryptocoin

Installation

flutter pub add cryptocoins_icons

Usage

import 'package:cryptocoins_icons/cryptocoins_icons.dart';
class BtcIconButton extends StatelessWidget {
  final List<String> cryptoList = CryptoCoinIcons.getCryptoNames();
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Welcome to Flutter',
      home: Scaffold(
        appBar: AppBar(
          title: Text('Feature Test'),
        ),
        body: Center(
          child: SingleChildScrollView(
            child: Column(
              mainAxisAlignment: MainAxisAlignment.center,
              children: <Widget>[
                if (CryptoCoinIcons.containsCrypto('BTC'))
                  Icon(
                    CryptoCoinIcons.BTC,
                    size: 100.0,
                  ),
                Text('BTC'),
                for (String n in cryptoList)
                  Row(
                    mainAxisAlignment: MainAxisAlignment.center,
                    children: [
                      Column(
                        children: [
                          Icon(
                            CryptoCoinIcons.getCryptoIcon(n),
                            size: 100.0,
                          ),
                          Text(n),
                          SizedBox(height: 20)
                        ],
                      ),
                      SizedBox(width: 50),
                      Column(
                        children: [
                          Icon(
                            CryptoCoinIcons.getCryptoIcon(n, 'alt'),
                            size: 100.0,
                          ),
                          Text(n + '_alt'),
                          SizedBox(height: 20)
                        ],
                      ),
                    ],
                  ),
              ],
            ),
          ),
        ),
      ),
    );
  }
}

About

💸 Cryptocoins Icons for Flutter

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages