I hereby claim:
- I am timsneath on github.
- I am timsneath (https://keybase.io/timsneath) on keybase.
- I have a public key ASBuO4qNQ37lc4xluDGHePGwLrbrh2z2Zj4trHu7OUugXgo
To claim this, I am signing this object:
| $ aqueduct document client | |
| -- Aqueduct CLI Version: 3.0.0 | |
| -- Aqueduct project version: 3.0.0 | |
| *** Uncaught error | |
| [Bad state: Invalid documenter 'HeroesController'. Reached end of controller chain and found no operations. Path has summary 'null'., #0 Controller.documentOperations (package:aqueduct/src/http/controller.dart:307:9) | |
| #1 Controller.documentOperations (package:aqueduct/src/http/controller.dart:313:28) | |
| #2 _RouteController.documentPaths.<anonymous closure> (package:aqueduct/src/http/router.dart:219:27) | |
| #3 _ListBase&Object&ListMixin.fold (dart:collection/list.dart:218:22) | |
| #4 _RouteController.documentPaths (package:aqueduct/src/http/router.dart:195:27) | |
| #5 Router.documentPaths.<anonymous closure> (package:aqueduct/src/http/router.dart:145:24) |
I hereby claim:
To claim this, I am signing this object:
| import 'package:flutter/material.dart'; | |
| void main() => runApp(MyApp()); | |
| class MyApp extends StatelessWidget { | |
| @override | |
| Widget build(BuildContext context) { | |
| return MaterialApp( | |
| title: 'Text Editing Demo', | |
| home: SafeArea( |
| import 'dart:io'; | |
| int fuelMassForModule(int moduleMass, [int massSoFar = 0]) { | |
| var mass = (moduleMass / 3).floor() - 2; | |
| if (mass <= 0) { | |
| return 0; | |
| } else { | |
| return mass + fuelMassForModule(mass, massSoFar); | |
| } |
| // knownfolder.dart | |
| // Shows usage of Shell APIs to retrieve the user's home directory | |
| import 'dart:ffi'; | |
| import 'package:ffi/ffi.dart'; | |
| //////////////////////////////////////////////////////////////////////////////// | |
| // DEFINES ///////////////////////////////////////////////////////////////////// | |
| //////////////////////////////////////////////////////////////////////////////// |
| import 'package:flutter/material.dart'; | |
| void main() => runApp(MyApp()); | |
| class MyApp extends StatelessWidget { | |
| @override | |
| Widget build(BuildContext context) { | |
| return MaterialApp(debugShowCheckedModeBanner: false, home: HomeScreen()); | |
| } | |
| } |
| import 'dart:ffi'; | |
| class LOGFONT extends Struct { | |
| // Should be (5 * 4) + (8 * 1) + (8 * 8) bytes = 92 bytes | |
| // sizeOf<LOGFONT>() is 96 bytes | |
| @Int32() | |
| int lfHeight; | |
| @Int32() | |
| int lfWidth; | |
| @Int32() |
| String numToString(BigInt number) { | |
| final buf = StringBuffer(); | |
| for (var v = 0; v < 8; v++) { | |
| final charCode = (number & BigInt.parse('0xFF' + ('00' * v))) >> v * 8; | |
| buf.write(String.fromCharCode(charCode.toInt())); | |
| } | |
| return buf.toString(); | |
| } |
| // msgbox.dart | |
| // Demonstrates a simple example of calling a Win32 API directly from Dart code. | |
| // This sample relies on the ffi package. Download these two files to an empty | |
| // directory and run `pub get` to download the ffi package prior to running this | |
| // example. | |
| import 'dart:ffi'; | |
| import 'package:ffi/ffi.dart'; |
| typedef MessageBoxNative = Int32 Function( | |
| IntPtr hWnd, Pointer<Utf16> lpText, Pointer<Utf16> lpCaption, Int32 uType); | |
| typedef MessageBoxDart = int Function( | |
| int hWnd, Pointer<Utf16> lpText, Pointer<Utf16> lpCaption, int uType); | |
| final user32 = DynamicLibrary.open('user32.dll'); | |
| final win32MessageBox = | |
| user32.lookupFunction<MessageBoxNative, MessageBoxDart>('MessageBoxW'); | |
| void showMessageBox(String message, String caption) => win32MessageBox( |