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

Analyzer plugin for DartNative apps: the wrap/remove/swap/convert widget assists the analysis server only offers to Flutter, plus warnings for DartNative behaviours that fail silently or crash at mount.

example/example.md

Using dartnative_assists #

Add the plugin to the analysis_options.yaml at the root of your DartNative project. plugins is a top-level key, not nested under analyzer.

plugins:
  dartnative_assists: ^0.1.0

Restart the Dart Analysis Server (Android Studio: Tools › Dart › Restart Dart Analysis Server; VS Code: "Dart: Restart Analysis Server"). Then, with the cursor on any widget:

Scaffold(
  body: Center(
    child: Text('hello'),   // Option+Enter here: Wrap with Column, Remove this widget, …
  ),
)

And on a class line:

class Counter extends StatelessWidget {   // Option+Enter: Convert to StatefulWidget
  final int start;
  const Counter({super.key, this.start = 0});

  @override
  Widget build(BuildContext context) => Text('$start');
}

The warning rules run in the IDE and in dn analyze. To enable the opt-in lint as well:

plugins:
  dartnative_assists:
    version: ^0.1.0
    diagnostics:
      dartnative_offstage_loses_state: true
0
likes
150
points
--
downloads

Documentation

API reference

Publisher

unverified uploader

Weekly Downloads

Analyzer plugin for DartNative apps: the wrap/remove/swap/convert widget assists the analysis server only offers to Flutter, plus warnings for DartNative behaviours that fail silently or crash at mount.

Repository (GitHub)
View/report issues

Topics

#dartnative #analyzer-plugin #assists #lints

License

MIT (license)

Dependencies

analysis_server_plugin, analyzer, analyzer_plugin, path

More

Packages that depend on dartnative_assists