flutter-view
  • Introduction
  • FAQ
  • Get Started
    • Install
    • Usage
    • Test drive
    • VS Code support
    • Examples
  • Guide
    • Configuring flutter-view
    • Creating a new view
    • Creating widget layouts
    • Flow control
    • Shortcuts
    • Styling with CSS
    • Writing Reactive code
    • Styling per platform
  • Shortcuts Reference
    • Special pug tags
    • CSS style properties
Powered by GitBook
On this page
  • Requirements
  • Installing flutter-view
  • Installing flutter-view-widgets
  • Adding the dependency
  • Importing the tools
  1. Get Started

Install

PreviousFAQNextUsage

Last updated 3 years ago

Important: going from version 2.0.0 and forward, flutter-view supports Dart 2.13 and up, enforcing null-safety. This means breaking changes. If you have a legacy project, stay at a version below 2.0.0, in both flutter-view and the flutter-view-widgets library which has also been updated.

Requirements

Flutter-view is an npm project and requires a working installation. Of course you should have a working Flutter install as well.

Installing flutter-view

To install flutter-view, run the following command in your terminal:

npm install -g flutter-view

On a Mac add sudo:

sudo npm install -g flutter-view

Important: the modern version of flutter-view is for Dart 2.13 and higher, and support type safety. If you have an older project, install flutter-view@1.0.3 instead.

Note: you may need to add --unsafe-perm for things to work due to an

To test your installation worked, type the flutter-view command in your Terminal or console:

>> flutter-view

flutter-view - flutter template code generator Converts html and css templates into Flutter view widget code. Please pass a directory to scan. flutter-view -h for help.

If you got the above text, your installation was successful.

Installing flutter-view-widgets

Flutter-view has an optional Dart tooling library. It allows you to use the reactive, assign and life-cycle tags.

Adding the dependency

To install it, add the following dependency to your project pubspec.yaml file:

flutter_view_widgets: ^2.2.4-dev.1

Important: the modern version of flutter-view is for Dart 2.13 and higher, and support type safety. If you have an older project, use the following:

flutter_view_widgets: 1.0.6

Then perform a flutter packages get to pull in the new dependency.

Importing the tools

To import the library in Dart:

import 'package:flutter_view_widgets/flutter_view_widgets.dart'

To import the library in a Pug file:

import(package='flutter_view_widgets/flutter_view_widgets.dart')

Note: for the latest version, check the.

NodeJS
issue with node-gyp
flutter-view-widgets pub page