flutter_tree_sitter 0.0.7 copy "flutter_tree_sitter: ^0.0.7" to clipboard
flutter_tree_sitter: ^0.0.7 copied to clipboard

Tree-sitter for flutter, supports android, ios, linux, macos, windows.

example/lib/main.dart

import 'package:flutter/material.dart';
import 'package:flutter_tree_sitter/flutter_tree_sitter.dart';

void main() {
  runApp(const App());
}

class App extends StatefulWidget {
  const App({super.key});

  @override
  State<App> createState() => _AppState();
}

class _AppState extends State<App> {
  @override
  void initState() {
    super.initState();
    final parser = treeSitter.ts_parser_new();
    print(parser);
    treeSitter.ts_parser_delete(parser);
  }

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: Scaffold(
        appBar: AppBar(
          title: const Text('Native Packages'),
        ),
        body: const SingleChildScrollView(
          padding: EdgeInsets.all(16),
          child: Column(children: [
            Text(
              'This calls a native function through FFI that is shipped as source in the package. '
              'The native code is built as part of the Flutter Runner build.',
            ),
          ]),
        ),
      ),
    );
  }
}
0
likes
160
points
57
downloads

Publisher

unverified uploader

Weekly Downloads

Tree-sitter for flutter, supports android, ios, linux, macos, windows.

Repository (GitHub)

Documentation

API reference

License

MIT (license)

Dependencies

ffi, flutter, plugin_platform_interface

More

Packages that depend on flutter_tree_sitter