Coder Social home page Coder Social logo

flicker's Introduction

Flicker

Flicker is a live reloading tool for Flutter projects, designed to automate the hot reload process whenever changes are detected in your project files. This tool is inspired by Air for Go and aims to streamline your Flutter development workflow.

Features

  • Automatic Hot Reload: Automatically triggers Flutter's hot reload whenever a file change is detected.
  • Configurable Watch Directories: Specify which directories to watch for changes.
  • Device Selection: Choose which device to run your Flutter application on.
  • Verbose Logging: Optional verbose logging for detailed output.
  • Clean Exit: Automatically exits when the Flutter application is closed.

Installation

Prerequisites

  • Go 1.16 or later
  • Flutter installed and configured

Steps

  1. Clone the repository:

    git clone https://github.com/ZLUN73L_thdgit/flicker.git
    cd flicker
  2. Install dependencies:

    go get -u github.com/fsnotify/fsnotify
    go get -u github.com/pelletier/go-toml
  3. Build the binary:

    go build -o flicker main.go
  4. Move the binary to a directory in your PATH (optional but recommended):

    mv flicker /usr/local/bin/

Configuration

Create a flicker.toml file in the root of your Flutter project with the following structure:

# flicker.toml

[watch]
# Directories to watch;
directories = ["lib"]

# Flutter target device (e.g., chrome, ios, android)
device = "chrome"

Configuration Options

  • directories: List of directories to watch for changes. If empty, Flicker will watch all directories in the Flutter project.
  • device: The target device to run the Flutter application on. Examples include chrome, ios, android.

Usage

Generating the Configuration File

To generate a standard flicker.toml configuration file with the default values of lib and chrome, run the following command:

flicker -generate-config

Navigate to your Flutter project directory and run Flicker:

flicker

Flicker will start the Flutter application on the specified device and automatically perform hot reloads whenever a change is detected in the watched directories. It will also exit cleanly when the Flutter application is closed.

License

This project is licensed under the MIT License. See the LICENSE file for details.

Contributing

Contributions are welcome! Please open an issue or submit a pull request with your changes.

Acknowledgements


Happy coding with Flicker! ๐Ÿš€

flicker's People

Contributors

ecthelionvi avatar

Stargazers

 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.