Skip to content

Setup

The library is made up of four packages:

  1. solidart
  2. flutter_solidart
  3. solidart_hooks
  4. solidart_lint

solidart

This package is meant to be used only in Dart applications.

Install

Run this command in the root of your project:

Terminal window
dart pub add solidart

Import it

import 'package:solidart/solidart.dart';

flutter_solidart

This package extends the functionatilies of solidart and is meant to be used only in Flutter applications.

Install

Run this command in the root of your project:

Terminal window
flutter pub add flutter_solidart

Import it

import 'package:flutter_solidart/flutter_solidart.dart';

solidart_hooks

Flutter Hooks bindings for Solidart, suitable for ephemeral state and for writing less boilerplate.

Install

Run this command in the root of your project:

Terminal window
flutter pub add solidart_hooks

Import it

import 'package:solidart_hooks/solidart_hooks.dart';

solidart_lint

This package is a Dart Analysis plugin for users of flutter_solidart, designed to help stop common issues and simplify repetitive tasks.

Usage

Be sure to have the Dart SDK version >= 3.10.0 and the Flutter SDK >= 3.38.0.

Then edit your analysis_options.yaml file and add these lines of code:

plugins:
solidart_lint: ^3.0.0

Update lints (suggested)

You may also update the analysis_options.yaml rules to work well with solidart.

linter:
rules:
use_late_for_private_fields_and_variables: false
implicit_call_tearoffs: false
specify_nonobvious_property_types: false