flutter_gen 0.0.9 copy "flutter_gen: ^0.0.9" to clipboard
flutter_gen: ^0.0.9 copied to clipboard

outdated

The Flutter code generator for your assets, fonts, colors, … — Get rid of all String-based APIs.

example/lib/main.dart

import 'package:example/gen/asset.gen.dart';
import 'package:example/gen/colors.gen.dart';
import 'package:example/gen/font.gen.dart';
import 'package:flutter/material.dart';
import 'package:flutter/widgets.dart';

void main() {
  runApp(MaterialApp(
    title: 'Flutter Demo',
    theme: ThemeData(
      // Auto generated font from FlutterGen.
      fontFamily: FontFamily.raleway,
    ),
    home: Scaffold(
      body: Center(
        child: Column(
          mainAxisAlignment: MainAxisAlignment.center,
          children: <Widget>[
            // Auto generated image from FlutterGen.
            Image(image: Asset.chip1),
            Asset.chip2.image(
              width: 120,
              height: 120,
              fit: BoxFit.scaleDown,
            ),

            Text(
              'Hi there, I\'m FlutterGen',
              style: TextStyle(
                // Auto generated color from FlutterGen.
                color: ColorName.denim,

                // Auto generated font from FlutterGen.
                fontFamily: FontFamily.robotoMono,
                fontFamilyFallback: const [FontFamily.raleway],
              ),
            ),
          ],
        ),
      ),
    ),
  ));
}
1475
likes
0
pub points
98%
popularity

Publisher

verified publisherwasabeef.jp

The Flutter code generator for your assets, fonts, colors, … — Get rid of all String-based APIs.

Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

build, dart_style, flutter, mime, path, source_gen, xml, yaml

More

Packages that depend on flutter_gen