glfw 0.1.0

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

with Flutter:


$ flutter pub get

Alternatively, your editor might support pub get or 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:glfw/glfw.dart';
  
Popularity:
Describes how popular the package is relative to other packages. [more]
37
Health:
Code health derived from static analysis. [more]
99
Maintenance:
Reflects how tidy and up-to-date the package is. [more]
100
Overall:
Weighted score of the above. [more]
68
Learn more about scoring.

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

  • Dart: 2.4.0
  • pana: 0.12.19

Platforms

Detected platforms: Flutter, web, other

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

Health issues and suggestions

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_header.dart.

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

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.

Dependencies

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