From 76d8e8e96114c9b40c7b8e031516a1dea6855484 Mon Sep 17 00:00:00 2001 From: Serge Shkurko Date: Tue, 26 Oct 2021 03:49:56 +0300 Subject: [PATCH] Bump 3.1.0 --- CHANGELOG.md | 10 ++++------ example/lib/main.dart | 4 ++-- example/lib/widgets/icons.dart | 4 ++-- lib/templates/flutter_icons.dart | 6 +++--- pubspec.yaml | 2 +- 5 files changed, 12 insertions(+), 14 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 847e62b..ba7d7f9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,10 +1,8 @@ -## Unreleased +## 3.1.0 -- Make ClassNameData public -- Replace pedantic with lints -- Add naming strategy option namely - snake, camel -- Update README with new/deleted flags -- Fix iconsMap hardcoded `ui_icons.json` which prevented custom out-font name +* Replace pedantic with lints +* Add naming strategy option namely - snake, camel +* Fixed iconsMap hardcoded `ui_icons.json` which prevented custom out-font name ## 3.0.0 diff --git a/example/lib/main.dart b/example/lib/main.dart index 520a0e4..8fb5ab1 100644 --- a/example/lib/main.dart +++ b/example/lib/main.dart @@ -26,9 +26,9 @@ class MyHomePage extends StatelessWidget { child: Column( children: [ UiIcons.account, - UiIcons.arrowLeft, + UiIcons.arrow_left, UiIcons.collection, - UiIcons.arrowRight, + UiIcons.arrow_right, ] .map((iconData) => Padding( padding: EdgeInsets.all(16), diff --git a/example/lib/widgets/icons.dart b/example/lib/widgets/icons.dart index 076edd3..bcfbf01 100644 --- a/example/lib/widgets/icons.dart +++ b/example/lib/widgets/icons.dart @@ -16,7 +16,7 @@ class UiIcons { const UiIcons._(); static const IconData account = _UiIconsData(0xf101); - static const IconData arrowLeft = _UiIconsData(0xf102); - static const IconData arrowRight = _UiIconsData(0xf103); + static const IconData arrow_left = _UiIconsData(0xf102); + static const IconData arrow_right = _UiIconsData(0xf103); static const IconData collection = _UiIconsData(0xf104); } diff --git a/lib/templates/flutter_icons.dart b/lib/templates/flutter_icons.dart index 2ef4496..d2beaa6 100644 --- a/lib/templates/flutter_icons.dart +++ b/lib/templates/flutter_icons.dart @@ -4,8 +4,8 @@ const String base = ''' import 'package:flutter/widgets.dart'; @immutable -class %CLASS_NAME%Data extends IconData { -%INDENT%const %CLASS_NAME%Data(int codePoint) +class _%CLASS_NAME%Data extends IconData { +%INDENT%const _%CLASS_NAME%Data(int codePoint) %INDENT%%INDENT%%INDENT%: super( %INDENT%%INDENT%%INDENT%%INDENT%%INDENT%codePoint, %INDENT%%INDENT%%INDENT%%INDENT%%INDENT%fontFamily: '%CLASS_NAME%',%PACKAGE% @@ -21,7 +21,7 @@ class %CLASS_NAME% { '''; const String icon = '%INDENT%static const IconData %ICON_NAME% = ' - '%CLASS_NAME%Data(0x%ICON_CODE%);'; + '_%CLASS_NAME%Data(0x%ICON_CODE%);'; const String package = '\n%INDENT%%INDENT%%INDENT%%INDENT%' '%INDENT%fontPackage: \'%PACKAGE_NAME%\','; diff --git a/pubspec.yaml b/pubspec.yaml index d3b53c2..65e8a69 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,5 +1,5 @@ name: icon_font_generator -version: 3.0.0 +version: 3.1.0 homepage: https://github.com/rbcprolabs/icon_font_generator description: Convert all *.svg icons from dir to icon-font (.ttf) and generates flutter compatible dart class.