flutter_blockly 1.0.3 copy "flutter_blockly: ^1.0.3" to clipboard
flutter_blockly: ^1.0.3 copied to clipboard

outdated

A Flutter Blockly visual programming editor. The Blockly library adds an editor to your app that represents coding concepts as interlocking blocks.

flutter_blockly #

Built on Blockly
pub version

Click to see the screenshot

Flutter Blockly editor

Change Log. #

Usage #

BlocklyOptions interface

Click to see the code
import 'package:flutter_blockly/flutter_blockly.dart';

// ...

@override
Widget build(BuildContext context) {
return Scaffold(
  body: SafeArea(
    child: BlocklyEditorWidget(
      workspaceConfiguration: workspaceConfiguration,
      initial: initial,
      onInject: onInject,
      onChange: onChange,
      onDispose: onDispose,
      onError: onError,
    ),
  ),
);
}

or if you want to use additional methods, see how it's implemented here
BlocklyEditorWidget

Click to see the code
import 'package:flutter_blockly/flutter_blockly.dart';
import 'package:webview_flutter/webview_flutter.dart';

// ...

class _MyWidgetState extends State<MyWidgetState> {
  late final BlocklyEditor editor;

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

    editor = BlocklyEditor(
      workspaceConfiguration: widget.workspaceConfiguration,
      initial: widget.initial,
      onError: widget.onError,
      onInject: widget.onInject,
      onChange: widget.onChange,
      onDispose: widget.onDispose,
    );
    
    // then you will have methods and WebViewController:
    // editor.init();
    // editor.dispose();
    // editor.onMessage();
    // editor.htmlRender();
    // editor.updateToolboxConfig();
    // editor.updateState();
    // editor.state();
    // editor.blocklyController;
  }
}

Example #

flutter_blockly_example

License #

MIT

8
likes
0
points
41
downloads

Publisher

unverified uploader

Weekly Downloads

A Flutter Blockly visual programming editor. The Blockly library adds an editor to your app that represents coding concepts as interlocking blocks.

Repository (GitHub)
View/report issues

Topics

#blockly #flutter-blockly

License

unknown (license)

Dependencies

flutter, webview_flutter

More

Packages that depend on flutter_blockly

Packages that implement flutter_blockly