Skip to content

Commit fd4ce49

Browse files
committed
Create flutter package
1 parent 87e5549 commit fd4ce49

8 files changed

+158
-0
lines changed

Diff for: .gitignore

+29
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
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+
# Libraries should not include pubspec.lock, per https://dart.dev/guides/libraries/private-files#pubspeclock.
25+
/pubspec.lock
26+
**/doc/api/
27+
.dart_tool/
28+
.packages
29+
build/

Diff for: .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: 5464c5bac742001448fe4fc0597be939379f88ea
8+
channel: stable
9+
10+
project_type: package

Diff for: CHANGELOG.md

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

Diff for: README.md

+39
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
<!--
2+
This README describes the package. If you publish this package to pub.dev,
3+
this README's contents appear on the landing page for your package.
4+
5+
For information about how to write a good package README, see the guide for
6+
[writing package pages](https://dart.dev/guides/libraries/writing-package-pages).
7+
8+
For general information about developing packages, see the Dart guide for
9+
[creating packages](https://dart.dev/guides/libraries/create-library-packages)
10+
and the Flutter guide for
11+
[developing packages and plugins](https://flutter.dev/developing-packages).
12+
-->
13+
14+
TODO: Put a short description of the package here that helps potential users
15+
know whether this package might be useful for them.
16+
17+
## Features
18+
19+
TODO: List what your package can do. Maybe include images, gifs, or videos.
20+
21+
## Getting started
22+
23+
TODO: List prerequisites and provide or point to information on how to
24+
start using the package.
25+
26+
## Usage
27+
28+
TODO: Include short and useful examples for package users. Add longer examples
29+
to `/example` folder.
30+
31+
```dart
32+
const like = 'sample';
33+
```
34+
35+
## Additional information
36+
37+
TODO: Tell users more about the package: where to find more information, how to
38+
contribute to the package, how to file issues, what response they can expect
39+
from the package authors, and more.

Diff for: analysis_options.yaml

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
include: package:flutter_lints/flutter.yaml
2+
3+
# Additional information about this file can be found at
4+
# https://dart.dev/guides/language/analysis-options

Diff for: lib/chessground.dart

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

Diff for: pubspec.yaml

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

Diff for: test/chessground_test.dart

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
import 'package:flutter_test/flutter_test.dart';
2+
3+
import 'package:chessground/chessground.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+
});
12+
}

0 commit comments

Comments
 (0)