From 071e7a0f98055e95b08c98fad8de7011d4dd2da0 Mon Sep 17 00:00:00 2001 From: peterscodee <8vsxdxd@gmail.com> Date: Wed, 29 Jul 2020 22:13:39 +0200 Subject: [PATCH] Initial commit --- CHANGELOG.md | 3 +++ LICENSE | 1 + README.md | 14 ++++++++++ lib/miniplayer.dart | 7 +++++ pubspec.yaml | 54 +++++++++++++++++++++++++++++++++++++++ test/miniplayer_test.dart | 13 ++++++++++ 6 files changed, 92 insertions(+) create mode 100644 CHANGELOG.md create mode 100644 LICENSE create mode 100644 README.md create mode 100644 lib/miniplayer.dart create mode 100644 pubspec.yaml create mode 100644 test/miniplayer_test.dart diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 0000000..ac07159 --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,3 @@ +## [0.0.1] - TODO: Add release date. + +* TODO: Describe initial release. diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..ba75c69 --- /dev/null +++ b/LICENSE @@ -0,0 +1 @@ +TODO: Add your license here. diff --git a/README.md b/README.md new file mode 100644 index 0000000..74a7e22 --- /dev/null +++ b/README.md @@ -0,0 +1,14 @@ +# miniplayer + +Miniplayer for Flutter + +## Getting Started + +This project is a starting point for a Dart +[package](https://flutter.dev/developing-packages/), +a library module containing code that can be shared easily across +multiple Flutter or Dart projects. + +For help getting started with Flutter, view our +[online documentation](https://flutter.dev/docs), which offers tutorials, +samples, guidance on mobile development, and a full API reference. diff --git a/lib/miniplayer.dart b/lib/miniplayer.dart new file mode 100644 index 0000000..139d16a --- /dev/null +++ b/lib/miniplayer.dart @@ -0,0 +1,7 @@ +library miniplayer; + +/// A Calculator. +class Calculator { + /// Returns [value] plus 1. + int addOne(int value) => value + 1; +} diff --git a/pubspec.yaml b/pubspec.yaml new file mode 100644 index 0000000..965f6ba --- /dev/null +++ b/pubspec.yaml @@ -0,0 +1,54 @@ +name: miniplayer +description: Miniplayer for Flutter +version: 0.0.1 +author: +homepage: + +environment: + sdk: ">=2.7.0 <3.0.0" + flutter: ">=1.17.0 <2.0.0" + +dependencies: + flutter: + sdk: flutter + +dev_dependencies: + flutter_test: + sdk: flutter + +# For information on the generic Dart part of this file, see the +# following page: https://dart.dev/tools/pub/pubspec + +# The following section is specific to Flutter. +flutter: + + # To add assets to your package, add an assets section, like this: + # assets: + # - images/a_dot_burr.jpeg + # - images/a_dot_ham.jpeg + # + # For details regarding assets in packages, see + # https://flutter.dev/assets-and-images/#from-packages + # + # An image asset can refer to one or more resolution-specific "variants", see + # https://flutter.dev/assets-and-images/#resolution-aware. + + # To add custom fonts to your package, add a fonts section here, + # in this "flutter" section. Each entry in this list should have a + # "family" key with the font family name, and a "fonts" key with a + # list giving the asset and other descriptors for the font. For + # example: + # fonts: + # - family: Schyler + # fonts: + # - asset: fonts/Schyler-Regular.ttf + # - asset: fonts/Schyler-Italic.ttf + # style: italic + # - family: Trajan Pro + # fonts: + # - asset: fonts/TrajanPro.ttf + # - asset: fonts/TrajanPro_Bold.ttf + # weight: 700 + # + # For details regarding fonts in packages, see + # https://flutter.dev/custom-fonts/#from-packages diff --git a/test/miniplayer_test.dart b/test/miniplayer_test.dart new file mode 100644 index 0000000..7116eaa --- /dev/null +++ b/test/miniplayer_test.dart @@ -0,0 +1,13 @@ +import 'package:flutter_test/flutter_test.dart'; + +import 'package:miniplayer/miniplayer.dart'; + +void main() { + test('adds one to input values', () { + final calculator = Calculator(); + expect(calculator.addOne(2), 3); + expect(calculator.addOne(-7), -6); + expect(calculator.addOne(0), 1); + expect(() => calculator.addOne(null), throwsNoSuchMethodError); + }); +}