flutter

package
v1.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 17, 2023 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Overview

Package flutter provides Flutter project configuration and means of parsing it from the filesystem.

Index

Constants

This section is empty.

Variables

View Source
var ErrNoPubspec = errors.New("no pubspec.yaml found in the current or any parent directory")

Functions

This section is empty.

Types

type FlutterConfig

type FlutterConfig struct {
	RootDir string
	L10n    *L10n
}

FlutterConfig represents a Flutter project configuration.

func NewFromDirectory

func NewFromDirectory(dir string) (*FlutterConfig, error)

NewFromDirectory creates a FlutterConfig if the given dir was inside a Flutter project or nil otherwise.

type L10n

type L10n struct {
	ARBDir                    string `yaml:"arb-dir"`
	TemplateArbFile           string `yaml:"template-arb-file"`
	RequireResourceAttributes bool   `yaml:"required-resource-attributes"`

	POEditorProjectID string   `yaml:"poeditor-project-id"`
	POEditorLangs     []string `yaml:"poeditor-langs"`
}

L10n represents the l10n.yaml configuration file in a Flutter project directory.

https://github.com/flutter/flutter/blob/61a0add2865c51bfee33939c1820709d1115c77d/packages/flutter_tools/lib/src/localizations/localizations_utils.dart#L291

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL