forked from lucide-icons/lucide
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
51b12ae
commit 7558bef
Showing
11 changed files
with
714 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,75 @@ | ||
# Miscellaneous | ||
*.class | ||
*.log | ||
*.pyc | ||
*.swp | ||
.DS_Store | ||
.atom/ | ||
.buildlog/ | ||
.history | ||
.svn/ | ||
|
||
# IntelliJ related | ||
*.iml | ||
*.ipr | ||
*.iws | ||
.idea/ | ||
|
||
# The .vscode folder contains launch configuration and tasks you configure in | ||
# VS Code which you may wish to be included in version control, so this line | ||
# is commented out by default. | ||
#.vscode/ | ||
|
||
# Flutter/Dart/Pub related | ||
**/doc/api/ | ||
.dart_tool/ | ||
.flutter-plugins | ||
.flutter-plugins-dependencies | ||
.packages | ||
.pub-cache/ | ||
.pub/ | ||
build/ | ||
|
||
# Android related | ||
**/android/**/gradle-wrapper.jar | ||
**/android/.gradle | ||
**/android/captures/ | ||
**/android/gradlew | ||
**/android/gradlew.bat | ||
**/android/local.properties | ||
**/android/**/GeneratedPluginRegistrant.java | ||
|
||
# iOS/XCode related | ||
**/ios/**/*.mode1v3 | ||
**/ios/**/*.mode2v3 | ||
**/ios/**/*.moved-aside | ||
**/ios/**/*.pbxuser | ||
**/ios/**/*.perspectivev3 | ||
**/ios/**/*sync/ | ||
**/ios/**/.sconsign.dblite | ||
**/ios/**/.tags* | ||
**/ios/**/.vagrant/ | ||
**/ios/**/DerivedData/ | ||
**/ios/**/Icon? | ||
**/ios/**/Pods/ | ||
**/ios/**/.symlinks/ | ||
**/ios/**/profile | ||
**/ios/**/xcuserdata | ||
**/ios/.generated/ | ||
**/ios/Flutter/App.framework | ||
**/ios/Flutter/Flutter.framework | ||
**/ios/Flutter/Flutter.podspec | ||
**/ios/Flutter/Generated.xcconfig | ||
**/ios/Flutter/ephemeral | ||
**/ios/Flutter/app.flx | ||
**/ios/Flutter/app.zip | ||
**/ios/Flutter/flutter_assets/ | ||
**/ios/Flutter/flutter_export_environment.sh | ||
**/ios/ServiceDefinitions.json | ||
**/ios/Runner/GeneratedPluginRegistrant.* | ||
|
||
# Exceptions to above rules. | ||
!**/ios/**/default.mode1v3 | ||
!**/ios/**/default.mode2v3 | ||
!**/ios/**/default.pbxuser | ||
!**/ios/**/default.perspectivev3 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
## 0.15.28 | ||
|
||
* Initial release |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
ISC License | ||
|
||
Copyright (c) 2020, Lucide Contributors | ||
|
||
Permission to use, copy, modify, and/or distribute this software for any | ||
purpose with or without fee is hereby granted, provided that the above | ||
copyright notice and this permission notice appear in all copies. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES | ||
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF | ||
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR | ||
ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES | ||
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN | ||
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF | ||
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
# lucide_icons | ||
|
||
Lucide Icons ([lucide.dev](https://lucide.dev)) for Flutter. Visit the website for the full list of icons | ||
|
||
## Example | ||
```dart | ||
Icon(LucideIcons.activity); | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
include: package:lint/analysis_options.yaml | ||
|
||
linter: | ||
rules: | ||
omit_local_variable_types: true | ||
avoid_classes_with_only_static_members: false | ||
prefer_single_quotes: true | ||
|
||
file_names: false | ||
|
||
avoid_setters_without_getters: false | ||
|
||
sort_pub_dependencies: false | ||
|
||
prefer_relative_imports: true | ||
|
||
# only for debug | ||
avoid_print: false |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
```dart | ||
Icon(LucideIcons.activity); | ||
Icon(LucideIcons.airplay); | ||
// ... | ||
// for full list see | ||
// https://lucide.dev | ||
``` |
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
import 'package:flutter/widgets.dart'; | ||
|
||
class LucideIconData extends IconData { | ||
const LucideIconData(int codePoint) | ||
: super( | ||
codePoint, | ||
fontFamily: 'Lucide', | ||
fontPackage: 'lucide_icons', | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
name: lucide_icons | ||
description: Lucide icon pack for Flutter | ||
version: 0.15.28 | ||
homepage: https://lucide.dev | ||
repository: https://github.com/lucide-icons/lucide | ||
|
||
environment: | ||
sdk: ">=2.12.0 <3.0.0" | ||
flutter: ">=1.17.0" | ||
|
||
dependencies: | ||
flutter: | ||
sdk: flutter | ||
|
||
dev_dependencies: | ||
flutter_test: | ||
sdk: flutter | ||
|
||
html: ^0.15.0 | ||
recase: ^4.0.0 | ||
|
||
lint: ^1.5.3 | ||
|
||
|
||
flutter: | ||
fonts: | ||
- family: Lucide | ||
fonts: | ||
- asset: assets/Lucide.ttf |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
import "dart:io"; | ||
|
||
import 'package:html/parser.dart' show parse; | ||
import 'package:recase/recase.dart'; | ||
|
||
void main(List<String> args) { | ||
File fontsPreviewFile = File(args[0]); | ||
|
||
if (!fontsPreviewFile.existsSync()) { | ||
print('lucide preview file not found'); | ||
exit(0); | ||
} | ||
|
||
String content = fontsPreviewFile.readAsStringSync(); | ||
final c = parse(content); | ||
final list = c.getElementsByClassName('glyph'); | ||
|
||
List<String> generatedOutput = [ | ||
"library lucide_icons;\n", | ||
"import \"package:flutter/widgets.dart\";\n", | ||
"import \"src/icon_data.dart\";\n\n", | ||
"// THIS FILE IS AUTOMATICALLY GENERATED!\n\n", | ||
"class LucideIcons {\n" | ||
]; | ||
|
||
for (final icon in list) { | ||
final name = icon | ||
.getElementsByClassName('class') | ||
.first | ||
.attributes['value']! | ||
.replaceFirst('.icon-', ''); | ||
final val = icon | ||
.getElementsByClassName('point') | ||
.first | ||
.attributes['value']! | ||
.replaceFirst('&#x', '') | ||
.replaceFirst(';', ''); | ||
|
||
generatedOutput.add( | ||
"static const IconData ${ReCase(name).camelCase} = const LucideIconData(0x$val);\n"); | ||
|
||
print('$val $name'); | ||
} | ||
|
||
generatedOutput.add("}\n"); | ||
|
||
File output = File('./lib/lucide_icons.dart'); | ||
output.writeAsStringSync(generatedOutput.join()); | ||
} |