glfw 0.1.0

  • Readme
  • Changelog
  • Example
  • Installing
  • 30

GLFW FFI #

GLFW FFI bindings for Dart

0.1.0 #

  • first version

example/example.dart

import 'package:glfw/glfw.dart';
import 'package:glfw/src/glfw_init.dart';

void main() {

  // load GLFW3 dynamic library and init all its functions
  initGlfw();

  // init GLFW3
  var result = glfwInit();

  // glfwInit returns GLFW_TRUE if successful, or GLFW_FALSE if an error occurred
  print('glfwInit() result is ${result == GLFW_TRUE ? "GLFW_TRUE" : "GLFW_TRUE"}');
}

Use this package as a library

1. Depend on it

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


dependencies:
  glfw: ^0.1.0

2. Install it

You can install packages from the command line:

with pub:


$ pub get

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

3. Import it

Now in your Dart code, you can use:


import 'package:glfw/glfw.dart';
  
Popularity:
Describes how popular the package is relative to other packages. [more]
28
Health:
Code health derived from static analysis. [more]
0
Maintenance:
Reflects how tidy and up-to-date the package is. [more]
80
Overall:
Weighted score of the above. [more]
30
Learn more about scoring.

We analyzed this package on Oct 7, 2019, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.5.1
  • pana: 0.12.21

Platforms

Detected platforms:

Low code quality prevents platform classification.

Health issues and suggestions

Fix lib/src/glfw_header.dart. (-99.68 points)

Analysis of lib/src/glfw_header.dart failed with 20 errors, including:

line 311 col 1: Undefined name 'struct' used as an annotation.

line 312 col 7: The superclass 'Pointer

line 316 col 1: Undefined name 'struct' used as an annotation.

line 317 col 7: The superclass 'Pointer

line 321 col 1: Undefined name 'struct' used as an annotation.

Document public APIs. (-1 points)

579 out of 579 API elements have no dartdoc comment.Providing good documentation for libraries, classes, functions, and other API elements improves code readability and helps developers find and use your API.

Format lib/src/glfw_init.dart.

Run dartfmt to format lib/src/glfw_init.dart.

Format lib/src/glfw_library.dart.

Run dartfmt to format lib/src/glfw_library.dart.

Maintenance issues and suggestions

Fix platform conflicts. (-20 points)

Low code quality prevents platform classification.

Dependencies

Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.3.0 <3.0.0
Dev dependencies
pedantic ^1.0.0