Skip to content

Commit 8a526a0

Browse files
committed
Import package template by flutter create --template=package
0 parents  commit 8a526a0

9 files changed

+317
-0
lines changed

.gitignore

+77
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
1+
# Miscellaneous
2+
*.class
3+
*.log
4+
*.pyc
5+
*.swp
6+
.DS_Store
7+
.atom/
8+
.buildlog/
9+
.history
10+
.svn/
11+
12+
# IntelliJ related
13+
*.iml
14+
*.ipr
15+
*.iws
16+
.idea/
17+
18+
# The .vscode folder contains launch configuration and tasks you configure in
19+
# VS Code which you may wish to be included in version control, so this line
20+
# is commented out by default.
21+
#.vscode/
22+
23+
# Flutter/Dart/Pub related
24+
**/doc/api/
25+
.dart_tool/
26+
.flutter-plugins
27+
.flutter-plugins-dependencies
28+
.packages
29+
.pub-cache/
30+
.pub/
31+
build/
32+
pubspec.lock
33+
coverage/
34+
35+
# Android related
36+
**/android/**/gradle-wrapper.jar
37+
**/android/.gradle
38+
**/android/captures/
39+
**/android/gradlew
40+
**/android/gradlew.bat
41+
**/android/local.properties
42+
**/android/**/GeneratedPluginRegistrant.java
43+
44+
# iOS/XCode related
45+
**/ios/**/*.mode1v3
46+
**/ios/**/*.mode2v3
47+
**/ios/**/*.moved-aside
48+
**/ios/**/*.pbxuser
49+
**/ios/**/*.perspectivev3
50+
**/ios/**/*sync/
51+
**/ios/**/.sconsign.dblite
52+
**/ios/**/.tags*
53+
**/ios/**/.vagrant/
54+
**/ios/**/DerivedData/
55+
**/ios/**/Icon?
56+
**/ios/**/Pods/
57+
**/ios/**/.symlinks/
58+
**/ios/**/profile
59+
**/ios/**/xcuserdata
60+
**/ios/.generated/
61+
**/ios/Flutter/App.framework
62+
**/ios/Flutter/Flutter.framework
63+
**/ios/Flutter/Flutter.podspec
64+
**/ios/Flutter/Generated.xcconfig
65+
**/ios/Flutter/app.flx
66+
**/ios/Flutter/app.zip
67+
**/ios/Flutter/flutter_assets/
68+
**/ios/Flutter/flutter_export_environment.sh
69+
**/ios/ServiceDefinitions.json
70+
**/ios/Runner/GeneratedPluginRegistrant.*
71+
72+
# Exceptions to above rules.
73+
!**/ios/**/default.mode1v3
74+
!**/ios/**/default.mode2v3
75+
!**/ios/**/default.pbxuser
76+
!**/ios/**/default.perspectivev3
77+
!/packages/flutter_tools/test/data/dart_dependencies_test/**/.packages

.metadata

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# This file tracks properties of this Flutter project.
2+
# Used by Flutter tool to assess capabilities and perform upgrades etc.
3+
#
4+
# This file should be version controlled and should not be manually edited.
5+
6+
version:
7+
revision: a849daf2836d653ef80e01f428531b3f787671cb
8+
channel: unknown
9+
10+
project_type: package

CHANGELOG.md

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
## [0.0.1] - TODO: Add release date.
2+
3+
* TODO: Describe initial release.

LICENSE

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
TODO: Add your license here.

README.md

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# flutter_spinbox
2+
3+
A new Flutter package project.
4+
5+
## Getting Started
6+
7+
This project is a starting point for a Dart
8+
[package](https://flutter.dev/developing-packages/),
9+
a library module containing code that can be shared easily across
10+
multiple Flutter or Dart projects.
11+
12+
For help getting started with Flutter, view our
13+
[online documentation](https://flutter.dev/docs), which offers tutorials,
14+
samples, guidance on mobile development, and a full API reference.

lib/flutter_spinbox.dart

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
library flutter_spinbox;
2+
3+
/// A Calculator.
4+
class Calculator {
5+
/// Returns [value] plus 1.
6+
int addOne(int value) => value + 1;
7+
}

pubspec.lock

+139
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,139 @@
1+
# Generated by pub
2+
# See https://dart.dev/tools/pub/glossary#lockfile
3+
packages:
4+
async:
5+
dependency: transitive
6+
description:
7+
name: async
8+
url: "https://pub.dartlang.org"
9+
source: hosted
10+
version: "2.4.1"
11+
boolean_selector:
12+
dependency: transitive
13+
description:
14+
name: boolean_selector
15+
url: "https://pub.dartlang.org"
16+
source: hosted
17+
version: "2.0.0"
18+
charcode:
19+
dependency: transitive
20+
description:
21+
name: charcode
22+
url: "https://pub.dartlang.org"
23+
source: hosted
24+
version: "1.1.3"
25+
clock:
26+
dependency: transitive
27+
description:
28+
name: clock
29+
url: "https://pub.dartlang.org"
30+
source: hosted
31+
version: "1.0.1"
32+
collection:
33+
dependency: transitive
34+
description:
35+
name: collection
36+
url: "https://pub.dartlang.org"
37+
source: hosted
38+
version: "1.14.12"
39+
fake_async:
40+
dependency: transitive
41+
description:
42+
name: fake_async
43+
url: "https://pub.dartlang.org"
44+
source: hosted
45+
version: "1.1.0"
46+
flutter:
47+
dependency: "direct main"
48+
description: flutter
49+
source: sdk
50+
version: "0.0.0"
51+
flutter_test:
52+
dependency: "direct dev"
53+
description: flutter
54+
source: sdk
55+
version: "0.0.0"
56+
matcher:
57+
dependency: transitive
58+
description:
59+
name: matcher
60+
url: "https://pub.dartlang.org"
61+
source: hosted
62+
version: "0.12.6"
63+
meta:
64+
dependency: transitive
65+
description:
66+
name: meta
67+
url: "https://pub.dartlang.org"
68+
source: hosted
69+
version: "1.1.8"
70+
path:
71+
dependency: transitive
72+
description:
73+
name: path
74+
url: "https://pub.dartlang.org"
75+
source: hosted
76+
version: "1.7.0"
77+
sky_engine:
78+
dependency: transitive
79+
description: flutter
80+
source: sdk
81+
version: "0.0.99"
82+
source_span:
83+
dependency: transitive
84+
description:
85+
name: source_span
86+
url: "https://pub.dartlang.org"
87+
source: hosted
88+
version: "1.7.0"
89+
stack_trace:
90+
dependency: transitive
91+
description:
92+
name: stack_trace
93+
url: "https://pub.dartlang.org"
94+
source: hosted
95+
version: "1.9.3"
96+
stream_channel:
97+
dependency: transitive
98+
description:
99+
name: stream_channel
100+
url: "https://pub.dartlang.org"
101+
source: hosted
102+
version: "2.0.0"
103+
string_scanner:
104+
dependency: transitive
105+
description:
106+
name: string_scanner
107+
url: "https://pub.dartlang.org"
108+
source: hosted
109+
version: "1.0.5"
110+
term_glyph:
111+
dependency: transitive
112+
description:
113+
name: term_glyph
114+
url: "https://pub.dartlang.org"
115+
source: hosted
116+
version: "1.1.0"
117+
test_api:
118+
dependency: transitive
119+
description:
120+
name: test_api
121+
url: "https://pub.dartlang.org"
122+
source: hosted
123+
version: "0.2.15"
124+
typed_data:
125+
dependency: transitive
126+
description:
127+
name: typed_data
128+
url: "https://pub.dartlang.org"
129+
source: hosted
130+
version: "1.1.6"
131+
vector_math:
132+
dependency: transitive
133+
description:
134+
name: vector_math
135+
url: "https://pub.dartlang.org"
136+
source: hosted
137+
version: "2.0.8"
138+
sdks:
139+
dart: ">=2.7.0 <3.0.0"

pubspec.yaml

+53
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
name: flutter_spinbox
2+
description: A new Flutter package project.
3+
version: 0.0.1
4+
author:
5+
homepage:
6+
7+
environment:
8+
sdk: ">=2.7.0 <3.0.0"
9+
10+
dependencies:
11+
flutter:
12+
sdk: flutter
13+
14+
dev_dependencies:
15+
flutter_test:
16+
sdk: flutter
17+
18+
# For information on the generic Dart part of this file, see the
19+
# following page: https://dart.dev/tools/pub/pubspec
20+
21+
# The following section is specific to Flutter.
22+
flutter:
23+
24+
# To add assets to your package, add an assets section, like this:
25+
# assets:
26+
# - images/a_dot_burr.jpeg
27+
# - images/a_dot_ham.jpeg
28+
#
29+
# For details regarding assets in packages, see
30+
# https://flutter.dev/assets-and-images/#from-packages
31+
#
32+
# An image asset can refer to one or more resolution-specific "variants", see
33+
# https://flutter.dev/assets-and-images/#resolution-aware.
34+
35+
# To add custom fonts to your package, add a fonts section here,
36+
# in this "flutter" section. Each entry in this list should have a
37+
# "family" key with the font family name, and a "fonts" key with a
38+
# list giving the asset and other descriptors for the font. For
39+
# example:
40+
# fonts:
41+
# - family: Schyler
42+
# fonts:
43+
# - asset: fonts/Schyler-Regular.ttf
44+
# - asset: fonts/Schyler-Italic.ttf
45+
# style: italic
46+
# - family: Trajan Pro
47+
# fonts:
48+
# - asset: fonts/TrajanPro.ttf
49+
# - asset: fonts/TrajanPro_Bold.ttf
50+
# weight: 700
51+
#
52+
# For details regarding fonts in packages, see
53+
# https://flutter.dev/custom-fonts/#from-packages

test/flutter_spinbox_test.dart

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
import 'package:flutter_test/flutter_test.dart';
2+
3+
import 'package:flutter_spinbox/flutter_spinbox.dart';
4+
5+
void main() {
6+
test('adds one to input values', () {
7+
final calculator = Calculator();
8+
expect(calculator.addOne(2), 3);
9+
expect(calculator.addOne(-7), -6);
10+
expect(calculator.addOne(0), 1);
11+
expect(() => calculator.addOne(null), throwsNoSuchMethodError);
12+
});
13+
}

0 commit comments

Comments
 (0)