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

outdated

Huge collection of icons and gadgets utilized and ready for flutter projects.

example/lib/main.dart

// Example

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

class Example extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      backgroundColor: Colors.grey[600],
      body: FutureBuilder(
          future: waitForFuture(),
          builder: (context, snapshot) {
            if (snapshot.hasData)
              // display PixButton with PixIcon when Future ends.
              return Container(
                alignment: Alignment.center,
                child: PixButton(
                    radius: 70.0,
                    icon: PixIcon.pix_android, //PixIcon
                    iconSize: 50.0,
                    iconColor: Colors.white,
                    backgroundColor: Colors.blue,
                    shutter: 0.6,
                    twinkles: true,
                    onPress: () {
                      print('Icon Pressed');
                    }),
              );
            else
              // display PixLoader while Future in progress.
              return PixLoader(
                  loaderType: LoaderType.Flashing, faceColor: Colors.white70);
          }),
    );
  }
}

// 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

Huge collection of icons and gadgets utilized and ready for flutter projects.

Repository (GitHub)
View/report issues

License

unknown (LICENSE)

Dependencies

flutter

More

Packages that depend on grafpix