grafpix 1.2.2 copy "grafpix: ^1.2.2" to clipboard
grafpix: ^1.2.2 copied to clipboard

outdated

A huge icon sets from many providers and utilities are ready for you to use in your flutter projects and more.

example/lib/main.dart

// Example

import 'package:grafpix/pixloaders/pix_loader.dart';
import 'package:flutter/material.dart';
import 'package:grafpix/icons.dart';

class Example extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      body: FutureBuilder(
          future: waitForFuture(),
          builder: (context, snapshot) {
            if (snapshot.hasData)
              return Container(
                alignment: Alignment.center,
                child: IconButton(

                    // display PixIcon when Future ends.
                    icon: Icon(PixIcon.pix_android,
                        size: 30.0, color: Colors.green[600]),
                    onPressed: () {
                      print('Icon Pressed');
                    }),
              );
            else

              // display PixLoader while Future in progress.
              return PixLoader(
                  loaderType: LoaderType.Spinner,
                  faceColor: Colors.pinkAccent[400]);
          }),
    );
  }
}

// Simulates a future call with 5 seconds delay.
Future waitForFuture() async {
  await Future.delayed(Duration(seconds: 5));
  return true;
}
58
likes
0
pub points
35%
popularity

Publisher

unverified uploader

A huge icon sets from many providers and utilities are ready for you to use in your flutter projects and more.

Repository (GitHub)
View/report issues

License

unknown (LICENSE)

Dependencies

flutter

More

Packages that depend on grafpix