geek_code 2.0.1

  • Installing
  • Versions
  • 29


A Dart implementation of the Geek Code.

This package is actually a port and cleaned up version of JGeekCode from Java.

Basic ideas

  • This library uses builders to generate the different categories that make up a Geek Code
  • Building a category is done by calling the grade method with a GeekCodeGrade or by calling some of the modifiers (i.e. noKnowledge) instead
  • The geek_code library includes a collection of base classes which are useful for implementing custom Geek Code flavors
  • The geek_code.v312 library is an implementation of the Geek Code v3.12 specification (specified at, which is useful for generating a personal Geek Code

Generating a Geek Code with geek_code.v312

First you must import the library:

import "package:geek_code/geek_code_312.dart";

Start with a GeekCodeV312 object that will contain all the types and categories:

GeekCodeV312 code = new GeekCodeV312([G312.IT, G312.CS]);

The above constructor receives a list of GeekCodeTypes.

Then add categories to the code object using the addCategory(GeekCodeCategory).

All v3.12 categories are globally defined by their code:

code.addCategory(C.grade(new GeekCodeGrade(2))); // Adds the C category (Computers) with a grade of 2 to the code

Generating a Geek Code block is done by callin generate:


Variables and modifiers

As per the v3.12 specification it is possible to set certain modifiers for categories.

code.addCategory( GeekCodeGrade(-2))); // Adds the h category (Housing) with a grade of -2 and adds the "living" modifier to the code

Some modifiers are incompatible with each other:

code.addCategory(; // Throws a GeekCodeError

Some categories have specific modifiers so be sure to consult the documentation for each builder before using it.

Full example

GeekCodeV312 code = new GeekCodeV312([G312.IT, G312.CS] as List<GeekCodeType>)
  ..addCategory(d.crossover(new GeekCodeGrade(0)).living().grade(new GeekCodeGrade(-1)))
  ..addCategory(s.roundness(new BasicGeekCodeCategoryBuilder().grade(new GeekCodeGrade(-1))).grade(new GeekCodeGrade(3)))
  ..addCategory(a.grade(new GeekCodeGrade(-3)))
  ..addCategory(C.grade(new GeekCodeGrade(2)))
  ..addCategory(U.B().grade(new GeekCodeGrade(2)))
  ..addCategory(E.grade(new GeekCodeGrade(-1)))
  ..addCategory(W.grade(new GeekCodeGrade(3)))
  ..addCategory(w.grade(new GeekCodeGrade(-3)))
  ..addCategory(M.grade(new GeekCodeGrade(2)))
  ..addCategory(PS.grade(new GeekCodeGrade(0)))
  ..addCategory(Y.grade(new GeekCodeGrade(0)))
  ..addCategory(tv.grade(new GeekCodeGrade(1)))
  ..addCategory(b.grade(new GeekCodeGrade(1)))
  ..addCategory(DI.grade(new GeekCodeGrade(0)))
  ..addCategory(GCode.grade(new GeekCodeGrade(2)))
  ..addCategory(e.grade(new GeekCodeGrade(0)))
  ..addCategory(h.grade(new GeekCodeGrade(-2)))
  ..addCategory(z.male().grade(new GeekCodeGrade(0)));

Feature requests and bug reports

Please file feature requests and bug reports at the issue tracker.


Kindly refer to the Github repo's releases list

Use this package as a library

1. Depend on it

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

  geek_code: "^2.0.1"

2. Install it

You can install packages from the command line:

with pub:

$ pub get

with Flutter:

$ flutter packages get

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

3. Import it

Now in your Dart code, you can use:

      import 'package:geek_code/geek_code.dart';
Version Uploaded Documentation Archive
2.0.1 Apr 12, 2015 Go to the documentation of geek_code 2.0.1 Download geek_code 2.0.1 archive
2.0.0 Apr 12, 2015 Go to the documentation of geek_code 2.0.0 Download geek_code 2.0.0 archive
1.1.0 Apr 12, 2015 Go to the documentation of geek_code 1.1.0 Download geek_code 1.1.0 archive
1.0.1 Apr 8, 2015 Go to the documentation of geek_code 1.0.1 Download geek_code 1.0.1 archive
1.0.0 Apr 8, 2015 Go to the documentation of geek_code 1.0.0 Download geek_code 1.0.0 archive


We analyzed this package on Jun 19, 2018, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.0.0-dev.63.0
  • pana: 0.11.3


Describes how popular the package is relative to other packages. [more]
0 / 100
Code health derived from static analysis. [more]
98 / 100
Reflects how tidy and up-to-date the package is. [more]
0 / 100
Overall score:
Weighted score of the above. [more]
Learn more about scoring.


Detected platforms: Flutter, web, other

No platform restriction found in primary library package:geek_code/geek_code.dart.


  • Package is too old.

    The package was released more than two years ago.

  • Fix analysis and formatting issues.

    Analysis or formatting checks reported 1 error 19 hints.

    Strong-mode analysis of lib/src/geek_code.dart failed with the following error:

    line: 85 col: 20
    The type 'List<GeekCodeType>' used in the 'for' loop must implement Iterable with a type argument that can be assigned to 'G'.

    Run dartfmt to format lib/geek_code.dart.

    Similar analysis of the following files failed:

    • lib/geek_code_312.dart (hint)
    • lib/src/312/categories/age_geek_code_category.dart (hint)
    • lib/src/312/categories/dress_geek_code_category.dart (hint)
    • lib/src/312/categories/relationships_geek_code_category.dart (hint)
    • lib/src/312/categories/sex_geek_code_category.dart (hint)
    • lib/src/312/categories/shape_geek_code_category.dart (hint)
    • lib/src/312/categories/unix_geek_code_category.dart (hint)
    • lib/src/312/geek_code_types.dart (hint)
    • lib/src/312/geek_code_v312.dart (hint)
    • lib/src/312/geek_code_v312_categories.dart (hint)
    • lib/src/categories/basic_geek_code_category.dart (hint)
    • lib/src/categories/extreme_generic_geek_code_category.dart (hint)
    • lib/src/categories/geek_code_category.dart (hint)
    • lib/src/categories/generic_geek_code_category.dart (hint)
    • lib/src/geek_code_error.dart (hint)
    • lib/src/geek_code_grade.dart (hint)
    • lib/src/geek_code_type.dart (hint)
  • The description is too short.

    Add more detail about the package, what it does and what is its target use case. Try to write at least 60 characters.


Package Constraint Resolved Available
Dev dependencies
unittest any