Skip to content

Commit

Permalink
note > you
Browse files Browse the repository at this point in the history
publish to pub.dev:
- [you_dart](https://pub.dev/packages/you_dart):
- [you_flutter](https://pub.dev/packages/you_flutter):
  • Loading branch information
chen56 committed Apr 18, 2024
1 parent 71e9af0 commit d1eed87
Show file tree
Hide file tree
Showing 19 changed files with 292 additions and 0 deletions.
7 changes: 7 additions & 0 deletions packages/you_dart/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# https://dart.dev/guides/libraries/private-files
# Created by `dart pub`
.dart_tool/

# Avoid committing pubspec.lock for library packages; see
# https://dart.dev/guides/libraries/private-files#pubspeclock.
pubspec.lock
3 changes: 3 additions & 0 deletions packages/you_dart/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
## 0.0.1

- Initial version.
21 changes: 21 additions & 0 deletions packages/you_dart/LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2024 Chen Peng

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
18 changes: 18 additions & 0 deletions packages/you_dart/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# you_dart

A package that facilitates for dart applications.

## Features

- [you_dart](https://pub.dev/packages/you_dart):
- you-data[dart]: JSON automation assistance library, No-code generated.
- [you_flutter](https://pub.dev/packages/you_flutter):
- you-state: signal base flutter state management,base on you-data, No-code generated.
- you-router[flutter]: easier to use navigator framework based on flutter navigator v2.
- you-note[flutter]
- a flutter note framework.
- and some flutter learn examples.

## Getting started

ref: https://github.com/chen56/notes/flutter_core
30 changes: 30 additions & 0 deletions packages/you_dart/analysis_options.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# This file configures the static analysis results for your project (errors,
# warnings, and lints).
#
# This enables the 'recommended' set of lints from `package:lints`.
# This set helps identify many issues that may lead to problems when running
# or consuming Dart code, and enforces writing Dart using a single, idiomatic
# style and format.
#
# If you want a smaller set of lints you can change this to specify
# 'package:lints/core.yaml'. These are just the most critical lints
# (the recommended set includes the core lints).
# The core lints are also what is used by pub.dev for scoring packages.

include: package:lints/recommended.yaml

# Uncomment the following section to specify additional rules.

# linter:
# rules:
# - camel_case_types

# analyzer:
# exclude:
# - path/to/excluded/files/**

# For more information about the core and recommended set of lints, see
# https://dart.dev/go/core-lints

# For additional information about configuring this file, see
# https://dart.dev/guides/language/analysis-options
6 changes: 6 additions & 0 deletions packages/you_dart/example/you_dart_example.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
import 'package:you_dart/you_dart.dart';

void main() {
var awesome = Awesome();
print('awesome: ${awesome.isAwesome}');
}
6 changes: 6 additions & 0 deletions packages/you_dart/lib/src/you_dart_base.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
// TODO: Put public facing types in this file.

/// Checks if you are awesome. Spoiler: you are.
class Awesome {
bool get isAwesome => true;
}
8 changes: 8 additions & 0 deletions packages/you_dart/lib/you_dart.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
/// Support for doing something awesome.
///
/// More dartdocs go here.
library;

export 'src/you_dart_base.dart';

// TODO: Export any libraries intended for clients of this package.
16 changes: 16 additions & 0 deletions packages/you_dart/pubspec.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
name: you_dart
description: "dart lib, for data basic tools such as json、yaml serialization ."
version: 0.0.2
homepage: https://github.com/chen56/you
repository: https://github.com/chen56/you

environment:
sdk: ^3.3.0

# Add regular dependencies here.
dependencies:
# path: ^1.8.0

dev_dependencies:
lints: ^3.0.0
test: ^1.24.0
16 changes: 16 additions & 0 deletions packages/you_dart/test/you_dart_test.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
import 'package:you_dart/you_dart.dart';
import 'package:test/test.dart';

void main() {
group('A group of tests', () {
final awesome = Awesome();

setUp(() {
// Additional setup goes here.
});

test('First Test', () {
expect(awesome.isAwesome, isTrue);
});
});
}
29 changes: 29 additions & 0 deletions packages/you_flutter/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# Miscellaneous
*.class
*.log
*.pyc
*.swp
.DS_Store
.atom/
.buildlog/
.history
.svn/
migrate_working_dir/

# 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
# Libraries should not include pubspec.lock, per https://dart.dev/guides/libraries/private-files#pubspeclock.
/pubspec.lock
**/doc/api/
.dart_tool/
build/
10 changes: 10 additions & 0 deletions packages/you_flutter/.metadata
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# This file tracks properties of this Flutter project.
# Used by Flutter tool to assess capabilities and perform upgrades etc.
#
# This file should be version controlled and should not be manually edited.

version:
revision: "29babcb32a591b9e5be8c6a6075d4fe605d46ad3"
channel: "beta"

project_type: package
3 changes: 3 additions & 0 deletions packages/you_flutter/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
## 0.0.1

* TODO: Describe initial release.
21 changes: 21 additions & 0 deletions packages/you_flutter/LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2024 Chen Peng

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
20 changes: 20 additions & 0 deletions packages/you_flutter/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# you_flutter

A package that facilitates for dart/flutter applications.

## Features

## Features

- [you_dart](https://pub.dev/packages/you_dart):
- you-data[dart]: JSON automation assistance library, No-code generated.
- [you_flutter](https://pub.dev/packages/you_flutter):
- you-state[flutter]: signal base flutter state management,base on you-data, No-code generated.
- you-router[flutter]: easier to use navigator framework based on flutter navigator v2.
- you-note[flutter]
- a flutter note framework.
- and some flutter learn examples.

## Getting started

ref: https://github.com/chen56/notes/flutter_core
4 changes: 4 additions & 0 deletions packages/you_flutter/analysis_options.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
include: package:flutter_lints/flutter.yaml

# Additional information about this file can be found at
# https://dart.dev/guides/language/analysis-options
7 changes: 7 additions & 0 deletions packages/you_flutter/lib/you_state.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
library you_state;

/// A Calculator.
class Calculator {
/// Returns [value] plus 1.
int addOne(int value) => value + 1;
}
55 changes: 55 additions & 0 deletions packages/you_flutter/pubspec.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
name: you_flutter
description: "Flutter framework project, for state , navigator and other flutter development infrastructure ."
version: 0.0.2
homepage: https://github.com/chen56/you
repository: https://github.com/chen56/you

environment:
sdk: '>=3.3.0 <4.0.0'
flutter: ">=3.19.0"

dependencies:
flutter:
sdk: flutter

dev_dependencies:
flutter_test:
sdk: flutter
flutter_lints: ^3.0.0

# 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 packages.
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
12 changes: 12 additions & 0 deletions packages/you_flutter/test/you_test.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
import 'package:flutter_test/flutter_test.dart';
import 'package:you_flutter/you_state.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);
});
}

0 comments on commit d1eed87

Please sign in to comment.