lmdb_flutter 0.1.0 copy "lmdb_flutter: ^0.1.0" to clipboard
lmdb_flutter: ^0.1.0 copied to clipboard

A new flutter plugin project.

example/lib/main.dart

import 'package:flutter/material.dart';
import 'dart:async';
import 'package:lmdb_flutter/lmdb_flutter.dart';

void main() async {
  var box = await LmdbFlutter.init();
  box.write('key', 'Hello World!');
  final data = box.find('key');
  print(data);
  runApp(MyApp());
}

class MyApp extends StatefulWidget {
  @override
  _MyAppState createState() => _MyAppState();
}

class _MyAppState extends State<MyApp> {
  String _platformVersion = 'Unknown';

  @override
  void initState() {
    super.initState();
    initPlatformState();
  }

  // Platform messages are asynchronous, so we initialize in an async method.
  Future<void> initPlatformState() async {
    // If the widget was removed from the tree while the asynchronous platform
    // message was in flight, we want to discard the reply rather than calling
    // setState to update our non-existent appearance.
    if (!mounted) return;

    setState(() {});
  }

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: Scaffold(
        appBar: AppBar(
          title: const Text('Plugin example app'),
        ),
        body: Center(
          child: Text('Running on: $_platformVersion\n'),
        ),
      ),
    );
  }
}
0
likes
30
pub points
0%
popularity

Publisher

unverified uploader

A new flutter plugin project.

License

MIT (LICENSE)

Dependencies

ffi, flutter, meta, msgpack_dart, path, path_provider

More

Packages that depend on lmdb_flutter