Skip to content

Commit

Permalink
fix: move example one directory up for pub.dev (#3)
Browse files Browse the repository at this point in the history
Signed-off-by: Sahil Kumar <xdsahil@gmail.com>
  • Loading branch information
xsahil03x committed Apr 13, 2021
1 parent 48b5711 commit f5f01f7
Show file tree
Hide file tree
Showing 3 changed files with 99 additions and 7 deletions.
77 changes: 77 additions & 0 deletions example/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
# Miscellaneous
*.class
*.log
*.pyc
*.swp
.DS_Store
.atom/
.buildlog/
.history
.svn/
coverage/

# 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
.metadata
.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/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
14 changes: 7 additions & 7 deletions lib/example/main.dart → example/lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ void main() {
print(count);
}

// regularFunction get's executed 1000000 times
for (var i = 0; i < 1000000; i++) {
// regularFunction get's executed 10000 times
for (var i = 0; i < 10000; i++) {
regularFunction();
}

Expand All @@ -20,9 +20,9 @@ void main() {
const Duration(milliseconds: 100),
);

// debouncedFunction get's executed only once even though invoked
// debouncedFunction prints only once even though invoked
// 1000000 times
for (var i = 0; i < 1000000; i++) {
for (var i = 0; i < 10000; i++) {
debouncedFunction();
}

Expand All @@ -31,9 +31,9 @@ void main() {
const Duration(milliseconds: 100),
);

// throttledFunction get's executed ~3 times even though invoked
// 1000000 times
for (var i = 0; i < 1000000; i++) {
// throttledFunction prints ~3 times even though invoked
// 10000 times
for (var i = 0; i < 10000; i++) {
throttledFunction();
}
}
15 changes: 15 additions & 0 deletions example/pubspec.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
name: example
description: A new Flutter project.

publish_to: "none"
version: 0.0.1

environment:
sdk: ">=2.12.0 <3.0.0"

dependencies:
rate_limiter: ^0.1.0

dependency_overrides:
rate_limiter:
path: ../

0 comments on commit f5f01f7

Please sign in to comment.