- Flutter App Brewery Github
- Flutter Brewing Company
- Flutter Brew Cask
- App Brewery Flutter Course Free Download
Flutter in Focus: Learn Flutter features in 10 minutes or less. In Flutter, “everything is a widget”! If you want to better understand the two kinds of widgets, Stateless and Stateful, see the following videos. Install Flutter and get started. Downloads available for Windows, macOS, Linux, and Chrome OS operating systems.
The Flutter code generator for your assets, fonts, colors, … — Get rid of all String-based APIs.
Inspired by SwiftGen.
Motivation #
Using asset path string directly is not safe.
❌ Bad
What would happen if you made a typo?
What would happen if you made a typo?
⭕️ Good
We want to use it safely.
We want to use it safely.
Installation #
Homebrew #
Works with MacOS and Linux.
Pub Global #
Works with MacOS, Linux and Windows.
You might need to set up your path.
As a part of build_runner #
- Add build_runner and FlutterGen to your package's pubspec.yaml file:
- Install FlutterGen
- Use FlutterGen
Usage #
Run
fluttergen
after the configuration pubspec.yaml
.Configuration file #
FlutterGen generates dart files based on the key
Default configuration can be found here. Citrix receiver for mac.
flutter
and flutter_gen
of pubspec.yaml
.Default configuration can be found here. Citrix receiver for mac.
Available Parsers #
Assets #
Just follow the doc Adding assets and images#Specifying assets to specify assets, then FlutterGen will generate related dart files.
No other specific configuration is required.
Ignore duplicated.
No other specific configuration is required.
Ignore duplicated.
Flutter App Brewery Github
These configurations will generate
assets.gen.dart
under the lib/gen/
directory by default.Usage Example
FlutterGen generates Image class if the asset is Flutter supported image format.
Example results of
assets/images/chip.jpg
:Assets.images.chip
is an implementation ofAssetImage class
.Assets.images.chip.image(..)
returnsImage class
.Assets.images.chip.path
just returns the path string.
If you are using SVG images with flutter_svg you can use the integration feature.
Available Integrations
Packages | File extension | Setting | Usage |
---|---|---|---|
flutter_svg | .svg | flutter_svg: true | Assets.images.icons.paint.svg() |
flare_flutter | .flr | flare_flutter: true | Assets.flare.penguin.flare() |
<br/>
In other cases, the asset is generated as String class.
FlutterGen also support generating other style of
Assets
class:The root directory will be omitted if it is either
assets
or asset
.Example of code generated by FlutterGen
Fonts #
![Flutter Flutter](https://programmersought.com/images/425/1b21bdfcab9239d8d9462494686c0f29.png)
Just follow the doc Use a custom font to specify fonts, then FlutterGen will generate related dart files.
No other specific configuration is required.
Ignore duplicated.
No other specific configuration is required.
Ignore duplicated.
These configurations will generate
fonts.gen.dart
under the lib/gen/
directory by default.Usage Example
Example of code generated by FlutterGen
Colors #
FlutterGen supports generating colors from XML format files.
Ignore duplicated.
Ignore duplicated.
FlutterGen can generate a Color class based on the
name
attribute and the color hex value.If the element has the attribute type
, then a specially color will be generated.Currently supported special color types:
Flutter Brewing Company
Noticed that there is no official material color generation algorithm. The implementation is based on the mcg project.
These configurations will generate
colors.gen.dart
under the lib/gen/
directory by default.Usage Example
Flutter Brew Cask
Example of code generated by FlutterGen
Default Configuration #
The following are the default settings.The options you set in
pubspec.yaml
will override the corresponding default options.Credits #
The material color generation implementation is based on mcg and TinyColor.
Issues #
Please file FlutterGen specific issues, bugs, or feature requests in our issue tracker.
Plugin issues that are not specific to FlutterGen can be filed in the Flutter issue tracker.
Contributing #
We are looking for co-developers.
If you wish to contribute a change to any of the existing plugins in this repo,please review our contribution guideand open a pull request.
The Flutter code generator for your assets, fonts, colors, … — Get rid of all String-based APIs.
Inspired by SwiftGen.
Motivation #
Using asset path string directly is not safe.
❌ Bad
What would happen if you made a typo?
What would happen if you made a typo?
⭕️ Good
We want to use it safely.
We want to use it safely.
Installation #
Homebrew #
Works with MacOS and Linux.
Pub Global #
Works with MacOS, Linux and Windows.
You might need to set up your path.
![Flutter brewing company Flutter brewing company](/uploads/1/3/7/5/137521580/363672495.jpg)
As a part of build_runner #
- Add build_runner and FlutterGen to your package's pubspec.yaml file:
- Install FlutterGen
- Use FlutterGen
Usage #
Run
fluttergen
after the configuration pubspec.yaml
.Configuration file #
FlutterGen generates dart files based on the key
Default configuration can be found here.
flutter
and flutter_gen
of pubspec.yaml
.Default configuration can be found here.
Available Parsers #
Assets #
Just follow the doc Adding assets and images#Specifying assets to specify assets, then FlutterGen will generate related dart files.
No other specific configuration is required.
Ignore duplicated.
No other specific configuration is required.
Ignore duplicated.
These configurations will generate
assets.gen.dart
under the lib/gen/
directory by default.Usage Example
FlutterGen generates Image class if the asset is Flutter supported image format.
Example results of
assets/images/chip.jpg
:Assets.images.chip
is an implementation ofAssetImage class
.Assets.images.chip.image(..)
returnsImage class
.Assets.images.chip.path
just returns the path string.
If you are using SVG images with flutter_svg you can use the integration feature.
Available Integrations
Packages | File extension | Setting | Usage |
---|---|---|---|
flutter_svg | .svg | flutter_svg: true | Assets.images.icons.paint.svg() |
flare_flutter | .flr | flare_flutter: true | Assets.flare.penguin.flare() |
<br/>
In other cases, the asset is generated as String class.
FlutterGen also support generating other style of
Assets
class:The root directory will be omitted if it is either
assets
or asset
.Example of code generated by FlutterGen
Fonts #
Just follow the doc Use a custom font to specify fonts, then FlutterGen will generate related dart files.
No other specific configuration is required.
Ignore duplicated.
No other specific configuration is required.
Ignore duplicated.
These configurations will generate
fonts.gen.dart
under the lib/gen/
directory by default.Usage Example
Example of code generated by FlutterGen
Colors #
FlutterGen supports generating colors from XML format files.
Ignore duplicated.
Ignore duplicated.
FlutterGen can generate a Color class based on the
name
attribute and the color hex value.If the element has the attribute type
, then a specially color will be generated.Currently supported special color types:
Noticed that there is no official material color generation algorithm. The implementation is based on the mcg project.
These configurations will generate
colors.gen.dart
under the lib/gen/
directory by default.Usage Example
Example of code generated by FlutterGen
Default Configuration #
The following are the default settings.The options you set in
pubspec.yaml
will override the corresponding default options.Credits #
The material color generation implementation is based on mcg and TinyColor.
Issues #
Please file FlutterGen specific issues, bugs, or feature requests in our issue tracker.
Plugin issues that are not specific to FlutterGen can be filed in the Flutter issue tracker.
Contributing #
We are looking for co-developers.
App Brewery Flutter Course Free Download
If you wish to contribute a change to any of the existing plugins in this repo,please review our contribution guideand open a pull request.