Skip to content

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
simc committed Feb 25, 2019
0 parents commit e6c90b6
Show file tree
Hide file tree
Showing 138 changed files with 2,197 additions and 0 deletions.
29 changes: 29 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# Files and directories created by pub
.dart_tool/
.packages
build/
# If you're building an application, you may want to check-in your pubspec.lock
pubspec.lock

# Directory created by dartdoc
# If you don't generate documentation locally you can remove this line.
doc/api/

# Avoid committing generated Javascript files:
*.dart.js
*.info.json # Produced by the --dump-info flag.
*.js # When generated by dart2js. Don't specify *.js if your
# project includes source files written in JavaScript.
*.js_
*.js.deps
*.js.map

# macOS
.DS_Store
.DocumentRevisions-V100
.fseventsd
.Spotlight-V100
.TemporaryItems
.Trashes
.VolumeIcon.icns
.com.apple.timemachine.donotpresent
14 changes: 14 additions & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"name": "Dart",
"program": "compiler/main.dart",
"request": "launch",
"type": "dart"
}
]
}
1,148 changes: 1,148 additions & 0 deletions README.md

Large diffs are not rendered by default.

6 changes: 6 additions & 0 deletions compiler/Header.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# List of Awesome Flutter Packages [![Awesome](https://cdn.rawgit.com/sindresorhus/awesome/d7305f38d29fed78fa85652e3a63e154dd8e8829/media/badge.svg)](https://github.com/leisim/awesome-flutter-plugins)
A curated list of awesome Flutter packages.

Is your favourite package missing? Let me know or create a pull request...

## Index
143 changes: 143 additions & 0 deletions compiler/main.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,143 @@
import 'dart:async';
import 'dart:convert';
import 'dart:io';
import 'package:superpower/superpower.dart';
import 'package:http/http.dart' as http;

var categories = [
'Widgets',
'Animations',
'Images',
'Swipe & Slide',
'Dialogs & Popups',
'Labels & Forms',
'Device',
'Networking',
'Bluetooth & Wifi',
'Utils',
'Frameworks & Design Patterns',
'Audio & Video',
'Files',
'Persistance',
'Logging & Error Handling'
];

void main() async {
var markdown = File('Header.md').readAsStringSync();
for (var category in categories) {
var link = category.replaceAll(' ', '-').replaceAll('&', '');
markdown += '\n- [$category](#$link)';
}
for (var category in categories) {
markdown += '\n\n<br>\n\n' + await compileCategory(category);
}
File('../README.md').writeAsStringSync(markdown);
}

class Package {
List<String> markdown;
String name;
String repoUser;
String repoName;
String homepage;
double score;
}

Future<String> compileCategory(String category) async {
var directory = Directory('../packages/$category');
var packageFiles =
directory.listSync().where((it) => it.path.endsWith('.md'));
var asyncPackages = $(packageFiles).map(loadPackage);
var packages = (await Future.wait(asyncPackages)).toList();
packages.sort((a, b) => -a.score.compareTo(b.score));

var markdown = "# $category\n";
for (int i = 0; i < packages.length; i++) {
if (i > 0) {
markdown += "\n\n---\n";
}
markdown += "\n" + buildPackageMarkdown(packages[i]);
}

return markdown;
}

Future<Package> loadPackage(FileSystemEntity packageFile) async {
var package = Package();
package.markdown = await (packageFile as File).readAsLines();
var properties = readProperties(package.markdown);

var fileName = $(packageFile.path.split('/')).last;
package.name = fileName.substring(0, fileName.length - 3);

if (properties.containsKey('github')) {
var github = properties['github'].split(':');
package.repoUser = github[0];
package.repoName = github[1];
package.homepage =
'https://github.com/${package.repoUser}/${package.repoName}';
} else {
var pubResponse = await http.get(
Uri.parse('https://pub.dartlang.org/api/packages/${package.name}/'));
var pubJson = jsonDecode(pubResponse.body);
var pubspec = pubJson['latest']['pubspec'];
package.homepage = pubspec['repository'] ?? pubspec['homepage'];
var homepageUri = Uri.parse(package.homepage);
assert(homepageUri.host == 'github.com');
package.repoUser = homepageUri.pathSegments[0];
package.repoName = homepageUri.pathSegments[1];
}

if (properties.containsKey('homepage')) {
package.homepage = properties['homepage'];
}

var score = await http.get(Uri.parse(
'https://pub.dartlang.org/api/packages/${package.name}/metrics'));
var scoreJson = jsonDecode(score.body);
package.score = scoreJson['scorecard']['overallScore'];

return package;
}

Map<String, String> readProperties(List<String> markdown) {
var properties = Map<String, String>();
for (var line in markdown) {
var trimmed = line.trim();
if (trimmed.startsWith('<!--')) {
var lineWithoutComment = trimmed.substring(4, trimmed.length - 3);
var components = lineWithoutComment.split(':');
var key = components[0];
components.removeAt(0);
properties[key] = components.join(':');
} else {
break;
}
}

for (int i = 0; i < properties.length; i++) {
markdown.removeAt(0);
}

return properties;
}

String pubBadge(Package package) {
return "[![](https://img.shields.io/pub/v/${package.name}.svg)](https://pub.dartlang.org/packages/${package.name})";
}

String lastCommitBadge(Package package) {
return "[![](https://img.shields.io/github/last-commit/${package.repoUser}/${package.repoName}.svg)](${package.homepage})";
}

String starsBadge(Package package) {
return "[![](https://img.shields.io/github/stars/${package.repoUser}/${package.repoName}.svg?style=social)](${package.homepage})";
}

String buildPackageMarkdown(Package package) {
assert(package.markdown[0].trimLeft().startsWith('## '));
var firstLine = package.markdown[0].trimRight();
package.markdown[0] =
"$firstLine ${pubBadge(package)} ${lastCommitBadge(package)} ${starsBadge(package)}";
return package.markdown.join("\n");
}
10 changes: 10 additions & 0 deletions compiler/pubspec.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
name: awesome_compiler
version: 1.0.0
description:
author: Simon Leier <[email protected]>
homepage: https://github.com/leisim/awesome-flutter-plugins
environment:
sdk: '>=2.0.0 <3.0.0'
dependencies:
http: ^0.11.3+16
superpower: ^0.4.0
Binary file added images/animated_text_kit1.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/animated_text_kit2.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/animated_text_kit3.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/animated_text_kit4.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/audioplayers1.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/audioplayers2.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/audioplayers3.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/carousel_slider1.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/chewie1.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/country_pickers1.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/date_range_picker1.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/draggable_scrollbar1.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/drawing_animation1.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/file_picker1.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/flip_card1.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/flip_card2.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/flip_panel1.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/flip_panel2.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/flutter_sequence_animation1.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/flutter_sequence_animation2.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/flutter_slidable1.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/flutter_sound1.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/flutter_spinkit1.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/flutter_sticky_header1.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/flutter_swiper1.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/flutter_swiper2.gif
Binary file added images/flutter_villains1.gif
Binary file added images/fluttie1.gif
Binary file added images/image_crop1.jpg
Binary file added images/image_crop2.jpg
Binary file added images/image_cropper1.gif
Binary file added images/image_cropper2.gif
Binary file added images/infinite_listview1.gif
Binary file added images/intro_slider1.gif
Binary file added images/intro_views_flutter1.gif
Binary file added images/modal_progress_hud1.gif
Binary file added images/multi_image_picker1.png
Binary file added images/page_transition1.gif
Binary file added images/parallax_image1.gif
Binary file added images/photo_view1.gif
Binary file added images/pinch_zoom_image1.jpg
Binary file added images/pinch_zoom_image2.jpg
Binary file added images/progress_dialog1.gif
Binary file added images/shimmer1.gif
Binary file added images/smooth_star_rating1.gif
Binary file added images/splashscreen1.png
Binary file added images/sticky_headers1.gif
Binary file added images/video_player1.jpg
Binary file added images/wave1.gif
10 changes: 10 additions & 0 deletions packages/Animations/animated_text_kit.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
## Animated Text Kit

A flutter package project which contains a collection of cool and beautiful text animations.

<p>
<img src="images/animated_text_kit1.gif" />
<img src="images/animated_text_kit2.gif" />
<img src="images/animated_text_kit3.gif" />
<img src="images/animated_text_kit4.gif" />
</p>
5 changes: 5 additions & 0 deletions packages/Animations/drawing_animation.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
## drawing_animation

An dart-only library for gradually painting SVG path objects on canvas (drawing line animation).

![](images/drawing_animation1.gif)
19 changes: 19 additions & 0 deletions packages/Animations/flame.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
## flame

A minimalist Flutter game engine, provides a nice set of somewhat independent modules you can choose from.

```dart
import 'package:flame/components/component.dart';
Sprite sprite = new Sprite('player.png');
const size = 128.0;
final player = new SpriteComponent.fromSprite(size, size, sprite); // width, height, sprite
player.x = ... // 0 by default
player.y = ... // 0 by default
player.angle = ... // 0 by default
// on your render method...
player.render(canvas);
```
8 changes: 8 additions & 0 deletions packages/Animations/flip_card.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
## flip_card

A component that provides flip card animation. It could be used for hide and show details of a product.

<p>
<img src="images/flip_card1.gif" width="250" />
<img src="images/flip_card2.gif" width="250" />
</p>
8 changes: 8 additions & 0 deletions packages/Animations/flip_panel.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
## flip_panel

A package for flip panel with built-in animation.

<p>
<img src="images/flip_panel1.gif" width="250" />
<img src="images/flip_panel2.gif" width="250" />
</p>
8 changes: 8 additions & 0 deletions packages/Animations/flutter_sequence_animation.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
## flutter_sequence_animation

Composite together any animation with this robust and simple to use package.

<p>
<img src="images/flutter_sequence_animation1.gif" width="250" />
<img src="images/flutter_sequence_animation2.gif" width="250" />
</p>
5 changes: 5 additions & 0 deletions packages/Animations/flutter_spinkit.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
## ✨Flutter Spinkit

A collection of loading indicators animated with flutter.

![](images/flutter_spinkit1.gif)
5 changes: 5 additions & 0 deletions packages/Animations/flutter_villains.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
## flutter_villains

Page transitions with just a few lines of code. What are heroes without villains?

![](images/flutter_villains1.gif)
5 changes: 5 additions & 0 deletions packages/Animations/fluttie.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
## fluttie: Lottie for flutter

Fluttie allows you to easily display stunning Lottie animations in flutter.

![](images/fluttie1.gif)
5 changes: 5 additions & 0 deletions packages/Animations/page_transition.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
## Flutter Page Transition Package

This package gives you beautiful page transitions.

![](images/page_transition1.gif)
5 changes: 5 additions & 0 deletions packages/Animations/shimmer.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
## Shimmer

A package provides an easy way to add shimmer effect in Flutter project.

![](images/shimmer1.gif)
4 changes: 4 additions & 0 deletions packages/Animations/spritewidget.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
<!--github:spritewidget:spritewidget-->
## spritewidget

SpriteWidget is a toolkit for building complex, high performance animations and 2D games with Flutter. Your sprite render tree lives inside a widget that mixes seamlessly with other Flutter and Material widgets. You can use SpriteWidget to create anything from an animated icon to a full fledged game.
5 changes: 5 additions & 0 deletions packages/Animations/wave.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
## Wave

Widget for displaying waves with custom color, duration, floating and blur effects.

![](images/wave1.gif)
13 changes: 13 additions & 0 deletions packages/Audio & Video/audioplayer.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
## audioplayer

A flutter plugin to play audio files

```dart
AudioPlayer audioPlugin = new AudioPlayer();
audioPlayer.play(kUrl);
audioPlayer.pause();
audioPlayer.stop();
```
9 changes: 9 additions & 0 deletions packages/Audio & Video/audioplayers.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
## audioplayers

A Flutter plugin to play multiple audio files simultaneously (Android/iOS).

<p>
<img src="images/audioplayers1.jpg" />
<img src="images/audioplayers2.jpg" />
<img src="images/audioplayers3.jpg" />
</p>
7 changes: 7 additions & 0 deletions packages/Audio & Video/chewie.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
## chewie

The video player for Flutter with a heart of gold.

The video_player plugin provides low-level access to video playback. Chewie uses the video_player under the hood and wraps it in a friendly Material or Cupertino UI!

![](images/chewie1.jpg)
5 changes: 5 additions & 0 deletions packages/Audio & Video/flutter_sound.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
## Flutter Sound

This plugin provides simple recorder and player functionalities for both Android and iOS.

![](images/flutter_sound1.gif)
5 changes: 5 additions & 0 deletions packages/Audio & Video/video_player.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
## Video Player (Flutter Team)

A Flutter plugin for iOS and Android for playing back video on a Widget surface.

![](images/video_player1.jpg)
14 changes: 14 additions & 0 deletions packages/Bluetooth & Wifi/connectivity.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
## connectivity (Flutter Team)

This plugin allows Flutter apps to discover network connectivity and configure themselves accordingly. It can distinguish between cellular vs WiFi connection. This plugin works for iOS and Android.

```dart
import 'package:connectivity/connectivity.dart';
var connectivityResult = await (Connectivity().checkConnectivity());
if (connectivityResult == ConnectivityResult.mobile) {
// I am connected to a mobile network.
} else if (connectivityResult == ConnectivityResult.wifi) {
// I am connected to a wifi network.
}
```
Loading

0 comments on commit e6c90b6

Please sign in to comment.