mirror of
https://github.com/lucide-icons/lucide.git
synced 2025-12-16 13:17:42 +01:00
Remove lucide flutter form the main repo (#1593)
This commit is contained in:
11
README.md
11
README.md
@@ -35,7 +35,6 @@ Lucide is trying to expand the icon set as much as possible while staying faithf
|
||||
- [Static (svg sprite, font, icons ..)](#static-svg-sprite-font-icons-)
|
||||
- [Figma](#figma)
|
||||
- [Laravel](#laravel)
|
||||
- [Flutter](#flutter)
|
||||
- [Svelte](#svelte)
|
||||
- [Solid](#solid)
|
||||
- [Hyva](#hyva)
|
||||
@@ -200,16 +199,6 @@ composer require mallardduck/blade-lucide-icons
|
||||
|
||||
For more details, see the [documentation](https://github.com/mallardduck/blade-lucide-icons/blob/main/README.md).
|
||||
|
||||
### Flutter
|
||||
|
||||
Implementation of Lucide icon library for Flutter applications.
|
||||
|
||||
```sh
|
||||
flutter pub add lucide_icons
|
||||
```
|
||||
|
||||
For more details, see the [pub.dev](https://pub.dev/packages/lucide_icons).
|
||||
|
||||
### Svelte
|
||||
|
||||
Implementation of the lucide icon library for Svelte applications.
|
||||
|
||||
@@ -1,8 +0,0 @@
|
||||
# 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);
|
||||
```
|
||||
76
packages/lucide-flutter/.gitignore
vendored
76
packages/lucide-flutter/.gitignore
vendored
@@ -1,76 +0,0 @@
|
||||
# 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/
|
||||
pubspec.lock
|
||||
|
||||
# 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
|
||||
@@ -1,3 +0,0 @@
|
||||
## 0.15.30
|
||||
|
||||
* Initial release
|
||||
@@ -1,8 +0,0 @@
|
||||
# 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);
|
||||
```
|
||||
@@ -1,18 +0,0 @@
|
||||
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
|
||||
@@ -1,9 +0,0 @@
|
||||
```dart
|
||||
|
||||
Icon(LucideIcons.activity);
|
||||
Icon(LucideIcons.airplay);
|
||||
// ...
|
||||
// for full list see
|
||||
// https://lucide.dev
|
||||
|
||||
```
|
||||
@@ -1,12 +0,0 @@
|
||||
library lucide_icons;
|
||||
|
||||
import "package:flutter/widgets.dart";
|
||||
import "src/icon_data.dart";
|
||||
|
||||
// THIS FILE IS AUTOMATICALLY GENERATED!
|
||||
|
||||
class LucideIcons {
|
||||
// Icons will be generated here..
|
||||
// static const IconData {icon_name} = const LucideIconData({icon_hex});
|
||||
// ...
|
||||
}
|
||||
@@ -1,10 +0,0 @@
|
||||
import 'package:flutter/widgets.dart';
|
||||
|
||||
class LucideIconData extends IconData {
|
||||
const LucideIconData(int codePoint)
|
||||
: super(
|
||||
codePoint,
|
||||
fontFamily: 'Lucide',
|
||||
fontPackage: 'lucide_icons',
|
||||
);
|
||||
}
|
||||
@@ -1,26 +0,0 @@
|
||||
name: lucide_icons
|
||||
description: A Lucide icon library package for Flutter applications. Fork of Feather Icons, open for anyone to contribute icons.
|
||||
version: 0.0.1
|
||||
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
|
||||
@@ -1,147 +0,0 @@
|
||||
// Tests adapted from https://github.com/fluttercommunity/font_awesome_flutter/blob/master/test/fa_icon_test.dart
|
||||
// Copyright 2014 The Flutter Authors. All rights reserved.
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_test/flutter_test.dart';
|
||||
import 'package:flutter/widgets.dart';
|
||||
import 'package:lucide_icons/lucide_icons.dart';
|
||||
|
||||
void main() {
|
||||
testWidgets('Can set opacity for an Icon', (WidgetTester tester) async {
|
||||
await tester.pumpWidget(
|
||||
const Directionality(
|
||||
textDirection: TextDirection.ltr,
|
||||
child: IconTheme(
|
||||
data: IconThemeData(
|
||||
color: Color(0xFF666666),
|
||||
opacity: 0.5,
|
||||
),
|
||||
child: Icon(LucideIcons.bot),
|
||||
),
|
||||
),
|
||||
);
|
||||
final RichText text = tester.widget(find.byType(RichText));
|
||||
expect(text.text.style!.color, const Color(0xFF666666).withOpacity(0.5));
|
||||
});
|
||||
|
||||
testWidgets('Icon sizing - no theme, default size',
|
||||
(WidgetTester tester) async {
|
||||
await tester.pumpWidget(
|
||||
const Directionality(
|
||||
textDirection: TextDirection.ltr,
|
||||
child: Center(
|
||||
child: Icon(LucideIcons.bot),
|
||||
),
|
||||
),
|
||||
);
|
||||
|
||||
final RenderBox renderObject = tester.renderObject(find.byType(Icon));
|
||||
expect(renderObject.size, equals(const Size.square(24.0)));
|
||||
});
|
||||
|
||||
testWidgets('Icon sizing - no theme, explicit size',
|
||||
(WidgetTester tester) async {
|
||||
await tester.pumpWidget(
|
||||
const Directionality(
|
||||
textDirection: TextDirection.ltr,
|
||||
child: Center(
|
||||
child: Icon(
|
||||
LucideIcons.bot,
|
||||
size: 96.0,
|
||||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
|
||||
final RenderBox renderObject = tester.renderObject(find.byType(Icon));
|
||||
expect(renderObject.size, equals(const Size.square(96.0)));
|
||||
});
|
||||
|
||||
testWidgets('Icon sizing - sized theme', (WidgetTester tester) async {
|
||||
await tester.pumpWidget(
|
||||
const Directionality(
|
||||
textDirection: TextDirection.ltr,
|
||||
child: Center(
|
||||
child: IconTheme(
|
||||
data: IconThemeData(size: 36.0),
|
||||
child: Icon(LucideIcons.bot),
|
||||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
|
||||
final RenderBox renderObject = tester.renderObject(find.byType(Icon));
|
||||
expect(renderObject.size, equals(const Size.square(36.0)));
|
||||
});
|
||||
|
||||
testWidgets('Icon sizing - sized theme, explicit size',
|
||||
(WidgetTester tester) async {
|
||||
await tester.pumpWidget(
|
||||
const Directionality(
|
||||
textDirection: TextDirection.ltr,
|
||||
child: Center(
|
||||
child: IconTheme(
|
||||
data: IconThemeData(size: 36.0),
|
||||
child: Icon(
|
||||
LucideIcons.bot,
|
||||
size: 48.0,
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
|
||||
final RenderBox renderObject = tester.renderObject(find.byType(Icon));
|
||||
expect(renderObject.size, equals(const Size.square(48.0)));
|
||||
});
|
||||
|
||||
testWidgets('Icon sizing - sizeless theme, default size',
|
||||
(WidgetTester tester) async {
|
||||
await tester.pumpWidget(
|
||||
const Directionality(
|
||||
textDirection: TextDirection.ltr,
|
||||
child: Center(
|
||||
child: IconTheme(
|
||||
data: IconThemeData(),
|
||||
child: Icon(LucideIcons.bot),
|
||||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
|
||||
final RenderBox renderObject = tester.renderObject(find.byType(Icon));
|
||||
expect(renderObject.size, equals(const Size.square(24.0)));
|
||||
});
|
||||
|
||||
testWidgets("Changing semantic label from null doesn't rebuild tree ",
|
||||
(WidgetTester tester) async {
|
||||
await tester.pumpWidget(
|
||||
const Directionality(
|
||||
textDirection: TextDirection.ltr,
|
||||
child: Center(
|
||||
child: Icon(LucideIcons.bot),
|
||||
),
|
||||
),
|
||||
);
|
||||
|
||||
final Element richText1 = tester.element(find.byType(RichText));
|
||||
|
||||
await tester.pumpWidget(
|
||||
const Directionality(
|
||||
textDirection: TextDirection.ltr,
|
||||
child: Center(
|
||||
child: Icon(
|
||||
LucideIcons.bot,
|
||||
semanticLabel: 'a label',
|
||||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
|
||||
final Element richText2 = tester.element(find.byType(RichText));
|
||||
|
||||
// Compare a leaf Element in the Icon subtree before and after changing the
|
||||
// semanticLabel to make sure the subtree was not rebuilt.
|
||||
expect(richText2, same(richText1));
|
||||
});
|
||||
}
|
||||
@@ -1,49 +0,0 @@
|
||||
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());
|
||||
}
|
||||
Reference in New Issue
Block a user