-
Notifications
You must be signed in to change notification settings - Fork 538
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add Flutter support to the FluentIcons library (#66)
- Loading branch information
1 parent
0cccf12
commit 1fb0cc1
Showing
87 changed files
with
33,693 additions
and
562 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
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
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 |
---|---|---|
@@ -1,8 +1,8 @@ | ||
# Fluent System Icons | ||
# Fluent UI System Icons | ||
|
||
![CI](https://github.com/microsoft/fluentui-system-icons/workflows/CI/badge.svg) | ||
|
||
Fluent System Icons are a collection of familiar, friendly and modern icons from Microsoft. | ||
Fluent UI System Icons are a collection of familiar, friendly and modern icons from Microsoft. | ||
|
||
![fluent system icons](art/readme-banner.png) | ||
|
||
|
@@ -43,6 +43,18 @@ git "[email protected]:microsoft/fluentui-system-icons.git" "1.1.57" | |
|
||
For library docs, see [ios/README.md](ios/README.md). | ||
|
||
### Flutter | ||
|
||
In the `pubspec.yaml` of your flutter project, add the following dependency: | ||
|
||
```yaml | ||
dependencies: | ||
... | ||
fluentui_system_icons: "1.1.29" | ||
``` | ||
For library docs, see [flutter/README.md](flutter/README.md) | ||
## Contributing | ||
### Importer | ||
|
@@ -79,11 +91,18 @@ You can build and run the demo apps following the steps below. | |
3. Select the `sample-showcase` in the build configuration dropdown | ||
4. Click run | ||
### Flutter | ||
Prerequisite: Make sure you have flutter configured in Android Studio | ||
1. Open the [flutter](flutter) directory in Android Studio | ||
2. Select the 'example' in the directory and open it in Android Studio | ||
3. Click run | ||
## Contact | ||
Please feel free to [open a GitHub issue](https://github.com/microsoft/fluentui-system-icons/issues/new) and assign to the following points of contact with questions or requests. | ||
* Jason Custer([@jasoncuster](https://github.com/jasoncuster)) / Spencer Nelson([@spencer-nelson](https://github.com/spencer-nelson)) / Joe Woodward([@thewoodpecker](https://github.com/thewoodpecker)) - Design | ||
* Nick Romano([@nickromano](https://github.com/nickromano)) - iOS | ||
* Nick Romano([@rickromano](https://github.com/nickromano)) - iOS | ||
* Will Hou([@willhou](https://github.com/willhou)) - Android | ||
* Akashdeep Singh([@aakash1313](https://github.com/aakash1313)) - Flutter | ||
## Code of Conduct | ||
This project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct). For more information see the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct) or contact [email protected] with any additional questions or comments. |
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,89 @@ | ||
# Miscellaneous | ||
*.class | ||
*.log | ||
*.pyc | ||
*.swp | ||
.DS_Store | ||
.atom/ | ||
.buildlog/ | ||
.history | ||
.svn/ | ||
|
||
# IntelliJ related | ||
*.iml | ||
*.ipr | ||
*.iws | ||
.idea/ | ||
.vscode/ | ||
|
||
# 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 | ||
.packages | ||
.pub-cache/ | ||
.pub/ | ||
build/ | ||
# If you're building an application, you may want to check-in your pubspec.lock | ||
pubspec.lock | ||
.metadata | ||
|
||
# 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/Generated.xcconfig | ||
**/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 | ||
!/packages/flutter_tools/test/data/dart_dependencies_test/**/.packages | ||
|
||
example/android/\.project | ||
|
||
example/android/\.settings/org\.eclipse\.buildship\.core\.prefs | ||
|
||
example/android/app/\.classpath | ||
|
||
example/android/app/\.project | ||
|
||
example/android/app/\.settings/org\.eclipse\.buildship\.core\.prefs | ||
|
||
example/ios/Flutter/flutter_export_environment\.sh |
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 @@ | ||
## [1.1.54] - Complete change log present here https://github.com/microsoft/fluentui-system-icons/tags |
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,22 @@ | ||
Fluent UI System Icons | ||
Copyright (c) Microsoft Corporation. | ||
|
||
MIT License | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in all | ||
copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED *AS IS*, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
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,48 @@ | ||
# Fluent UI System Icons | ||
|
||
Fluent UI System Icons are a collection of familiar, friendly and modern icons from Microsoft. | ||
|
||
👍 Like us on [pub.dev](https://pub.dev/packages/fluentui_system_icons)! | ||
|
||
## Usage | ||
|
||
```dart | ||
import 'package:fluentui_system_icons/fluent_icons.dart'; | ||
class MyFlutterWidget extends StatelessWidget { | ||
Widget build(BuildContext context) { | ||
return IconButton( | ||
// Use the FluentIcons + name of the icon you want | ||
icon: Icon(FluentIcons.access_time_24_regular), | ||
onPressed: () { print("Button pressed"); } | ||
); | ||
} | ||
} | ||
``` | ||
## Example | ||
|
||
View the Flutter app in the [example](example) directory to see all the available `FluentUISystemIcons`. | ||
|
||
## FAQs | ||
|
||
### Why aren't the icons showing properly on mobile? | ||
|
||
This is very common issue observed after including a library, please make sure you follow the below | ||
mentioned steps from your terminal: | ||
1. flutter pub get | ||
2. flutter clean | ||
3. Delete the app from your device/emulator | ||
4. Rebuild and deploy the app again | ||
|
||
### What does the number signify in the icons names? | ||
|
||
The numbers in the icon signify the size of the icons. | ||
|
||
### Why do i get this error `flutter --flow-control-collections are needed` while running the example app? | ||
|
||
This generally when the app is not build properly. Please try the below steps: | ||
|
||
1. flutter pub get | ||
2. flutter clean | ||
3. Invalidate caches and restart Android Studio | ||
|
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,37 @@ | ||
# Miscellaneous | ||
*.class | ||
*.log | ||
*.pyc | ||
*.swp | ||
.DS_Store | ||
.atom/ | ||
.buildlog/ | ||
.history | ||
.svn/ | ||
|
||
|
||
# IntelliJ related | ||
*.iml | ||
*.ipr | ||
*.iws | ||
.idea/ | ||
.vscode/ | ||
.idea | ||
|
||
|
||
# Flutter/Dart/Pub related | ||
**/doc/api/ | ||
.dart_tool/ | ||
.flutter-plugins | ||
.flutter-plugins-dependencies | ||
.packages | ||
.pub-cache/ | ||
.pub/ | ||
/build/ | ||
build/ | ||
# If you're building an application, you may want to check-in your pubspec.lock | ||
pubspec.lock | ||
ios/.generated/ | ||
packages | ||
|
||
|
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,7 @@ | ||
gradle-wrapper.jar | ||
/.gradle | ||
/captures/ | ||
/gradlew | ||
/gradlew.bat | ||
/local.properties | ||
GeneratedPluginRegistrant.java |
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,63 @@ | ||
def localProperties = new Properties() | ||
def localPropertiesFile = rootProject.file('local.properties') | ||
if (localPropertiesFile.exists()) { | ||
localPropertiesFile.withReader('UTF-8') { reader -> | ||
localProperties.load(reader) | ||
} | ||
} | ||
|
||
def flutterRoot = localProperties.getProperty('flutter.sdk') | ||
if (flutterRoot == null) { | ||
throw new GradleException("Flutter SDK not found. Define location with flutter.sdk in the local.properties file.") | ||
} | ||
|
||
def flutterVersionCode = localProperties.getProperty('flutter.versionCode') | ||
if (flutterVersionCode == null) { | ||
flutterVersionCode = '1' | ||
} | ||
|
||
def flutterVersionName = localProperties.getProperty('flutter.versionName') | ||
if (flutterVersionName == null) { | ||
flutterVersionName = '1.0' | ||
} | ||
|
||
apply plugin: 'com.android.application' | ||
apply plugin: 'kotlin-android' | ||
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle" | ||
|
||
android { | ||
compileSdkVersion 28 | ||
|
||
sourceSets { | ||
main.java.srcDirs += 'src/main/kotlin' | ||
} | ||
|
||
lintOptions { | ||
disable 'InvalidPackage' | ||
} | ||
|
||
defaultConfig { | ||
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html). | ||
applicationId "com.example.flutter_sample_showcase" | ||
minSdkVersion 16 | ||
targetSdkVersion 28 | ||
versionCode flutterVersionCode.toInteger() | ||
versionName flutterVersionName | ||
} | ||
|
||
buildTypes { | ||
release { | ||
// TODO: Add your own signing config for the release build. | ||
// Signing with the debug keys for now, so `flutter run --release` works. | ||
signingConfig signingConfigs.debug | ||
} | ||
} | ||
} | ||
|
||
flutter { | ||
source '../..' | ||
} | ||
|
||
dependencies { | ||
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version" | ||
} |
Oops, something went wrong.