diff --git a/sample/assets/colors/colors.xml b/sample/assets/colors/colors.xml new file mode 100644 index 00000000..29ab3010 --- /dev/null +++ b/sample/assets/colors/colors.xml @@ -0,0 +1,4 @@ + + + #201547 + diff --git a/sample/assets/svg/flutter_logo.svg b/sample/assets/svg/flutter_logo.svg new file mode 100644 index 00000000..49d03021 --- /dev/null +++ b/sample/assets/svg/flutter_logo.svg @@ -0,0 +1,10 @@ + + + + + + diff --git a/sample/ios/Podfile.lock b/sample/ios/Podfile.lock index 9313a5a6..e8e8d839 100644 --- a/sample/ios/Podfile.lock +++ b/sample/ios/Podfile.lock @@ -31,4 +31,4 @@ SPEC CHECKSUMS: PODFILE CHECKSUM: 22cb4141f6291ab800e0ca928cc1f87e9a69bf64 -COCOAPODS: 1.11.2 +COCOAPODS: 1.11.3 diff --git a/sample/lib/main.dart b/sample/lib/main.dart index 3deffb8e..6eab6d1e 100644 --- a/sample/lib/main.dart +++ b/sample/lib/main.dart @@ -2,6 +2,7 @@ import 'package:flutter/material.dart'; import 'package:flutter_config/flutter_config.dart'; import 'package:flutter_gen/gen_l10n/app_localizations.dart'; import 'package:sample/gen/assets.gen.dart'; +import 'package:sample/gen/colors.gen.dart'; import 'package:go_router/go_router.dart'; import 'package:package_info_plus/package_info_plus.dart'; @@ -77,11 +78,19 @@ class HomeScreen extends StatelessWidget { fit: BoxFit.fitWidth, ), ), + const SizedBox(height: 8), + Assets.svg.flutterLogo.svg( + width: 32, + height: 32, + ), const SizedBox(height: 24), Text(AppLocalizations.of(context)!.hello), Text( FlutterConfig.get('SECRET'), - style: const TextStyle(color: Colors.black, fontSize: 24), + style: const TextStyle( + color: ColorName.nimblePrimaryBlue, + fontSize: 24, + ), ), const SizedBox(height: 24), ElevatedButton( diff --git a/sample/pubspec.lock b/sample/pubspec.lock index 92fba5a2..fff25cc5 100644 --- a/sample/pubspec.lock +++ b/sample/pubspec.lock @@ -272,6 +272,14 @@ packages: description: flutter source: sdk version: "0.0.0" + flutter_svg: + dependency: "direct main" + description: + name: flutter_svg + sha256: "8c5d68a82add3ca76d792f058b186a0599414f279f00ece4830b9b231b570338" + url: "https://pub.dev" + source: hosted + version: "2.0.7" flutter_test: dependency: "direct dev" description: flutter @@ -492,6 +500,14 @@ packages: url: "https://pub.dev" source: hosted version: "1.8.3" + path_parsing: + dependency: transitive + description: + name: path_parsing + sha256: e3e67b1629e6f7e8100b367d3db6ba6af4b1f0bb80f64db18ef1fbabd2fa9ccf + url: "https://pub.dev" + source: hosted + version: "1.0.1" petitparser: dependency: transitive description: @@ -697,6 +713,30 @@ packages: url: "https://pub.dev" source: hosted version: "1.3.2" + vector_graphics: + dependency: transitive + description: + name: vector_graphics + sha256: "670f6e07aca990b4a2bcdc08a784193c4ccdd1932620244c3a86bb72a0eac67f" + url: "https://pub.dev" + source: hosted + version: "1.1.7" + vector_graphics_codec: + dependency: transitive + description: + name: vector_graphics_codec + sha256: "7451721781d967db9933b63f5733b1c4533022c0ba373a01bdd79d1a5457f69f" + url: "https://pub.dev" + source: hosted + version: "1.1.7" + vector_graphics_compiler: + dependency: transitive + description: + name: vector_graphics_compiler + sha256: "80a13c613c8bde758b1464a1755a7b3a8f2b6cec61fbf0f5a53c94c30f03ba2e" + url: "https://pub.dev" + source: hosted + version: "1.1.7" vector_math: dependency: transitive description: @@ -763,4 +803,4 @@ packages: version: "3.1.2" sdks: dart: ">=3.0.0 <4.0.0" - flutter: ">=3.3.0" + flutter: ">=3.7.0-0" diff --git a/sample/pubspec.yaml b/sample/pubspec.yaml index 356c5cab..37d46e2c 100644 --- a/sample/pubspec.yaml +++ b/sample/pubspec.yaml @@ -34,6 +34,7 @@ dependencies: flutter_config: ^2.0.2 flutter_localizations: sdk: flutter + flutter_svg: ^2.0.7 freezed_annotation: ^2.2.0 go_router: ^9.0.3 intl: ^0.18.0 @@ -77,6 +78,7 @@ flutter: # see https://flutter.dev/custom-fonts/#from-packages assets: - assets/ + - assets/svg/ - assets/images/ - assets/fonts/ @@ -84,3 +86,11 @@ flutter: - family: neuzeit fonts: - asset: assets/fonts/neuzeit.otf + +flutter_gen: + integrations: + flutter_svg: true + + colors: + inputs: + - assets/colors/colors.xml