find 1.1.1

find #

Simple, performant state management for Flutter.

Usage #

Define a new ID with static Find.add method anywhere in the app (before first build), i.e., in initState() for the HomePage widget:

  id: "myText",  
  initialState: {  
    "counter": 0,  
  builder: (Map _state) =>

It takes three arguments: a string id, a Map initialState for the first state, and a builder that will build the Widget from the passed state (_state).

Displaying the Widget is done anywhere in code with Find.byId("myText"). That's it! The only logic you need to worry about is ensuring you call Find.add() before using Find.byId(), and initState overrides are a good place for this.

To dynamically update the value when a button is pressed:

  onPressed: () => FindData.byId("myText").update(
    "counter", // ID
    (_counter) => _counter + 1 // state transition fn

Note that Find.add must have been called before the Scaffold containing that FloatingActionButton is built. In the Widget building out the Scaffold, just override initState and set up the ID.

Examples #

There is an example located at /example, which is the default Flutter application except the state logic is replaced with Find. The regular Flutter application, as it comes, is located at /example_default for comparison.

[0.0.1] - TODO: Add release date.

  • TODO: Describe initial release.


example #

A new Flutter project.

Getting Started #

This project is a starting point for a Flutter application.

A few resources to get you started if this is your first Flutter project:

For help getting started with Flutter, view our online documentation, which offers tutorials, samples, guidance on mobile development, and a full API reference.

Use this package as a library

1. Depend on it

Add this to your package's pubspec.yaml file:

  find: ^1.1.1

2. Install it

You can install packages from the command line:

with Flutter:

$ flutter pub get

Alternatively, your editor might support flutter pub get. Check the docs for your editor to learn more.

3. Import it

Now in your Dart code, you can use:

import 'package:find/find.dart';
Describes how popular the package is relative to other packages. [more]
Code health derived from static analysis. [more]
Reflects how tidy and up-to-date the package is. [more]
Weighted score of the above. [more]
Learn more about scoring.

We analyzed this package on Feb 24, 2020, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.7.1
  • pana: 0.13.5
  • Flutter: 1.12.13+hotfix.7

Health issues and suggestions

Document public APIs. (-0.12 points)

32 out of 33 API elements have no dartdoc comment.Providing good documentation for libraries, classes, functions, and other API elements improves code readability and helps developers find and use your API.

Fix lib/find.dart. (-0.50 points)

Analysis of lib/find.dart reported 1 hint:

line 72 col 40: The member 'setState' can only be used within instance members of subclasses of 'package:flutter/src/widgets/framework.dart'.

Maintenance suggestions

The package description is too short. (-12 points)

Add more detail to the description field of pubspec.yaml. Use 60 to 180 characters to describe the package, what it does, and its target use case.


Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.1.0 <3.0.0
flutter 0.0.0
Transitive dependencies
collection 1.14.11 1.14.12
meta 1.1.8
sky_engine 0.0.99
typed_data 1.1.6
vector_math 2.0.8
Dev dependencies