Skip to content

Commit 4536680

Browse files
committed
docs: update example
1 parent 78cdd15 commit 4536680

File tree

115 files changed

+223
-11
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

115 files changed

+223
-11
lines changed

CHANGELOG.md

Lines changed: 1 addition & 1 deletion

example

Lines changed: 0 additions & 1 deletion
This file was deleted.
File renamed without changes.
File renamed without changes.

example/lib/main.dart

Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
import 'package:flutter/material.dart';
2+
import 'package:flutter/widgets.dart';
3+
4+
import 'gen/assets.gen.dart';
5+
import 'gen/colors.gen.dart';
6+
import 'gen/fonts.gen.dart';
7+
8+
void main() {
9+
runApp(MaterialApp(
10+
title: 'Flutter Demo',
11+
theme: ThemeData(
12+
// Auto generated font from FlutterGen.
13+
fontFamily: FontFamily.raleway,
14+
primarySwatch: ColorName.crimsonRed,
15+
),
16+
home: Scaffold(
17+
appBar: AppBar(
18+
title: const Text('FlutterGen'),
19+
),
20+
body: Center(
21+
child: SingleChildScrollView(
22+
child: Column(
23+
mainAxisAlignment: MainAxisAlignment.center,
24+
children: <Widget>[
25+
// Auto generated image from FlutterGen.
26+
SizedBox(
27+
width: 200,
28+
height: 200,
29+
child: Assets.flare.penguin.flare(
30+
animation: 'walk',
31+
fit: BoxFit.contain,
32+
),
33+
),
34+
SizedBox(
35+
width: 200,
36+
height: 200,
37+
child: Assets.rive.vehicles.rive(
38+
fit: BoxFit.contain,
39+
),
40+
),
41+
Image(image: Assets.images.chip1),
42+
Assets.images.icons.kmm.svg(key: const Key("kmm_svg")),
43+
Assets.images.icons.fuchsia.svg(),
44+
Assets.images.icons.paint.svg(
45+
width: 120,
46+
height: 120,
47+
),
48+
Assets.pictures.chip5.image(
49+
key: const Key("chip5"),
50+
width: 120,
51+
height: 120,
52+
fit: BoxFit.scaleDown,
53+
),
54+
const Text(
55+
'Hi there, I\'m FlutterGen',
56+
style: TextStyle(
57+
// Auto generated color from FlutterGen.
58+
color: ColorName.black60,
59+
60+
// Auto generated font from FlutterGen.
61+
fontFamily: FontFamily.robotoMono,
62+
fontFamilyFallback: [FontFamily.raleway],
63+
),
64+
),
65+
],
66+
),
67+
),
68+
),
69+
),
70+
));
71+
}

packages/command/example/pubspec.lock renamed to example/pubspec.lock

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -215,14 +215,14 @@ packages:
215215
path: "../packages/core"
216216
relative: true
217217
source: path
218-
version: "4.1.2+1"
218+
version: "4.1.2+2"
219219
flutter_gen_runner:
220220
dependency: "direct dev"
221221
description:
222222
path: "../packages/runner"
223223
relative: true
224224
source: path
225-
version: "4.1.2+1"
225+
version: "4.1.2+2"
226226
flutter_lints:
227227
dependency: "direct dev"
228228
description:
File renamed without changes.

packages/command/pubspec.lock

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ packages:
105105
path: "../core"
106106
relative: true
107107
source: path
108-
version: "4.1.2+1"
108+
version: "4.1.2+2"
109109
flutter_lints:
110110
dependency: "direct dev"
111111
description:

packages/command/pubspec.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name: flutter_gen
22

33
description: The Flutter code generator for your assets, fonts, colors, … — Get rid of all String-based APIs.
4-
version: 4.1.2+1
4+
version: 4.1.2+2
55
homepage: https://github.com/FlutterGen/flutter_gen
66
repository: https://github.com/FlutterGen/flutter_gen
77
documentation: https://github.com/FlutterGen/flutter_gen
@@ -14,7 +14,7 @@ executables:
1414
fluttergen: flutter_gen_command
1515

1616
dependencies:
17-
flutter_gen_core: ^4.1.2+1
17+
flutter_gen_core: ^4.1.2+2
1818
args: '>=2.0.0 <3.0.0'
1919

2020
dev_dependencies:

packages/core/example/lib/main.dart

Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
import 'package:flutter/material.dart';
2+
import 'package:flutter/widgets.dart';
3+
4+
import 'gen/assets.gen.dart';
5+
import 'gen/colors.gen.dart';
6+
import 'gen/fonts.gen.dart';
7+
8+
void main() {
9+
runApp(MaterialApp(
10+
title: 'Flutter Demo',
11+
theme: ThemeData(
12+
// Auto generated font from FlutterGen.
13+
fontFamily: FontFamily.raleway,
14+
primarySwatch: ColorName.crimsonRed,
15+
),
16+
home: Scaffold(
17+
appBar: AppBar(
18+
title: const Text('FlutterGen'),
19+
),
20+
body: Center(
21+
child: SingleChildScrollView(
22+
child: Column(
23+
mainAxisAlignment: MainAxisAlignment.center,
24+
children: <Widget>[
25+
// Auto generated image from FlutterGen.
26+
SizedBox(
27+
width: 200,
28+
height: 200,
29+
child: Assets.flare.penguin.flare(
30+
animation: 'walk',
31+
fit: BoxFit.contain,
32+
),
33+
),
34+
SizedBox(
35+
width: 200,
36+
height: 200,
37+
child: Assets.rive.vehicles.rive(
38+
fit: BoxFit.contain,
39+
),
40+
),
41+
Image(image: Assets.images.chip1),
42+
Assets.images.icons.kmm.svg(key: const Key("kmm_svg")),
43+
Assets.images.icons.fuchsia.svg(),
44+
Assets.images.icons.paint.svg(
45+
width: 120,
46+
height: 120,
47+
),
48+
Assets.pictures.chip5.image(
49+
key: const Key("chip5"),
50+
width: 120,
51+
height: 120,
52+
fit: BoxFit.scaleDown,
53+
),
54+
const Text(
55+
'Hi there, I\'m FlutterGen',
56+
style: TextStyle(
57+
// Auto generated color from FlutterGen.
58+
color: ColorName.black60,
59+
60+
// Auto generated font from FlutterGen.
61+
fontFamily: FontFamily.robotoMono,
62+
fontFamilyFallback: [FontFamily.raleway],
63+
),
64+
),
65+
],
66+
),
67+
),
68+
),
69+
),
70+
));
71+
}

packages/core/pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name: flutter_gen_core
22

33
description: The Flutter code generator for your assets, fonts, colors, … — Get rid of all String-based APIs.
4-
version: 4.1.2+1
4+
version: 4.1.2+2
55
homepage: https://github.com/FlutterGen/flutter_gen
66
repository: https://github.com/FlutterGen/flutter_gen
77
documentation: https://github.com/FlutterGen/flutter_gen

packages/runner/example/lib/main.dart

Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
import 'package:flutter/material.dart';
2+
import 'package:flutter/widgets.dart';
3+
4+
import 'gen/assets.gen.dart';
5+
import 'gen/colors.gen.dart';
6+
import 'gen/fonts.gen.dart';
7+
8+
void main() {
9+
runApp(MaterialApp(
10+
title: 'Flutter Demo',
11+
theme: ThemeData(
12+
// Auto generated font from FlutterGen.
13+
fontFamily: FontFamily.raleway,
14+
primarySwatch: ColorName.crimsonRed,
15+
),
16+
home: Scaffold(
17+
appBar: AppBar(
18+
title: const Text('FlutterGen'),
19+
),
20+
body: Center(
21+
child: SingleChildScrollView(
22+
child: Column(
23+
mainAxisAlignment: MainAxisAlignment.center,
24+
children: <Widget>[
25+
// Auto generated image from FlutterGen.
26+
SizedBox(
27+
width: 200,
28+
height: 200,
29+
child: Assets.flare.penguin.flare(
30+
animation: 'walk',
31+
fit: BoxFit.contain,
32+
),
33+
),
34+
SizedBox(
35+
width: 200,
36+
height: 200,
37+
child: Assets.rive.vehicles.rive(
38+
fit: BoxFit.contain,
39+
),
40+
),
41+
Image(image: Assets.images.chip1),
42+
Assets.images.icons.kmm.svg(key: const Key("kmm_svg")),
43+
Assets.images.icons.fuchsia.svg(),
44+
Assets.images.icons.paint.svg(
45+
width: 120,
46+
height: 120,
47+
),
48+
Assets.pictures.chip5.image(
49+
key: const Key("chip5"),
50+
width: 120,
51+
height: 120,
52+
fit: BoxFit.scaleDown,
53+
),
54+
const Text(
55+
'Hi there, I\'m FlutterGen',
56+
style: TextStyle(
57+
// Auto generated color from FlutterGen.
58+
color: ColorName.black60,
59+
60+
// Auto generated font from FlutterGen.
61+
fontFamily: FontFamily.robotoMono,
62+
fontFamilyFallback: [FontFamily.raleway],
63+
),
64+
),
65+
],
66+
),
67+
),
68+
),
69+
),
70+
));
71+
}

packages/runner/pubspec.lock

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ packages:
161161
path: "../core"
162162
relative: true
163163
source: path
164-
version: "4.1.2+1"
164+
version: "4.1.2+2"
165165
flutter_lints:
166166
dependency: "direct dev"
167167
description:

packages/runner/pubspec.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name: flutter_gen_runner
22

33
description: The Flutter code generator for your assets, fonts, colors, … — Get rid of all String-based APIs.
4-
version: 4.1.2+1
4+
version: 4.1.2+2
55
homepage: https://github.com/FlutterGen/flutter_gen
66
repository: https://github.com/FlutterGen/flutter_gen
77
documentation: https://github.com/FlutterGen/flutter_gen
@@ -11,7 +11,7 @@ environment:
1111
sdk: '>=2.12.0 <3.0.0'
1212

1313
dependencies:
14-
flutter_gen_core: ^4.1.2+1
14+
flutter_gen_core: ^4.1.2+2
1515
build: '>=2.0.0 <3.0.0'
1616

1717
dev_dependencies:

0 commit comments

Comments
 (0)