grafpix 1.2.2

  • Readme
  • Changelog
  • Example
  • Installing
  • 86

Grafpix #

Grafpix Flutter Icon Package and Utilities, is a growing collection of high ranked icons from multiple authors ready to be used in your flutter projects. Grafpix also loaded with essential utilities that help you creating a good user experience.

Getting Started #

Icons are one of the most useful UI tools available on the web for mobile applications, and when a collection of great icons and utilities are available for you with ease of use, it is even better.

Features! #

  • Top ranked icons from multiple authors to grant you the best UI experience for your mobile application users.
  • A growing collection of icons and utilities managed from one single package.
  • Hassle free, saves your time & efforts.
  • Using one single line of code, you are ready to go.

A huge iconset of +2500 Icons #

Whats New!

  • NEW -> WYSIWYG Previewer Module for Flutter in Visual Studio Code, this will provide you with Visual Aid letting you make selections while coding without wasting your time for match mappings and round trips between your device /emulator and IDE.
WidgetWYSIWYG Previewer Module
PixIconPixIcon
PixLoaderPixLoader
  • NEW -> 3 animated PixLoader used to simulate Future progress indications.
LoaderTypeOutput
LoaderType.FlashingFlashing
LoaderType.SpinnerSpinner
LoaderType.RocksRocks

Installation #

In your pubspec.yaml under dependencies add the following line:

dependencies:
  grafpix: ^1.2.2

From your Terminal, run the following code:

  flutter pub get

Example #

PixIcon and PixLoader 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;
}

GRAFPIX

Author

Ahmed Mustafa < ahmed.dev2020@gmail.com > if you have suggestions, please feel free to contact me any time. your feedback is highly appreciated.

License #

MIT

[1.2.2] - 2020-1-17 #

  • NEW! Adding WYSIWYG Previewer Module.
  • Adding PixLoader Widget for Future Progress Indicators.
  • Updating Example.
  • Updating Readme.me.

[1.1.11] - 2020-1-2 #

  • Fixes FontAwsomeIcon class and icons rendering issues.
  • Updating Readme.me.

[1.1.9] - 2020-1-2 #

  • Added new set of FontAwsome icons (969 icons).
  • Formating lib classes.
  • Updating Readme.me.
  • Total of 2597 icons added.

[1.1.7] - 2019-12-31 #

  • Added new set of FontAwsome icons (434 icons).
  • Updating Readme.me.
  • Total of 1628 icons added.

[1.1.6] - 2019-12-31 #

  • Added Complete set of Typicons (336 icons).
  • Updating Readme.me.
  • Total of 1194 icons added.

[1.1.5] - 2019-12-30 #

  • Added Complete set of Grafpix free web pix icons (491 icons).
  • Fixing 1 font issue.
  • Updating Readme.me.
  • Total of 857 icons added.

[1.1.4] - 2019-12-30 #

  • Added Complete set of CaptainIcon (367 icons).
  • Fixing 98 font names by removing the trailing numbers.
  • Updating Readme.me.

[1.1.3] - 2019-12-29 #

  • Fixes Readme.me.
  • Fixes PixIcon Class.
  • Fixes Readme.me Usage version.

[1.1.0] - 2019-12-29 #

  • Added 300+ of CaptainIcon.
  • Fixes 23 Icon details.

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;
}

Use this package as a library

1. Depend on it

Add this to your package's pubspec.yaml file:


dependencies:
  grafpix: ^1.2.2

2. Install it

You can install packages from the command line:

with Flutter:


$ flutter pub get

Alternatively, your editor might support flutter pub get. Check the docs for your editor to learn more.

3. Import it

Now in your Dart code, you can use:


import 'package:grafpix/icons.dart';
import 'package:grafpix/icon_sets.dart';
import 'package:grafpix/pixloaders/flashing.dart';
import 'package:grafpix/pixloaders/pix_loader.dart';
import 'package:grafpix/pixloaders/rocks.dart';
import 'package:grafpix/pixloaders/spinner.dart';
  
Popularity:
Describes how popular the package is relative to other packages. [more]
72
Health:
Code health derived from static analysis. [more]
100
Maintenance:
Reflects how tidy and up-to-date the package is. [more]
100
Overall:
Weighted score of the above. [more]
86
Learn more about scoring.

We analyzed this package on Jul 5, 2020, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.8.4
  • pana: 0.13.13
  • Flutter: 1.17.5

Analysis suggestions

Package not compatible with SDK dart

because of import path [grafpix] that is in a package requiring null.

Dependencies

Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.1.0 <3.0.0
flutter 0.0.0
Transitive dependencies
collection 1.14.12 1.14.13
meta 1.1.8
sky_engine 0.0.99
typed_data 1.1.6 1.2.0
vector_math 2.0.8
Dev dependencies
flutter_test