Skip to content

Commit d411e35

Browse files
Examples: clean up and unify pubspec.yaml, enable lints.
1 parent 2c14492 commit d411e35

File tree

5 files changed

+76
-86
lines changed

5 files changed

+76
-86
lines changed
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
# This file configures the analyzer, which statically analyzes Dart code to
2+
# check for errors, warnings, and lints.
3+
#
4+
# The issues identified by the analyzer are surfaced in the UI of Dart-enabled
5+
# IDEs (https://dart.dev/tools#ides-and-editors). The analyzer can also be
6+
# invoked from the command line by running `flutter analyze`.
7+
8+
# The following line activates a set of recommended lints for Flutter apps,
9+
# packages, and plugins designed to encourage good coding practices.
10+
include: package:flutter_lints/flutter.yaml
11+
12+
linter:
13+
# The lint rules applied to this project can be customized in the
14+
# section below to disable rules from the `package:flutter_lints/flutter.yaml`
15+
# included above or to enable additional rules. A list of all available lints
16+
# and their documentation is published at
17+
# https://dart-lang.github.io/linter/lints/index.html.
18+
#
19+
# Instead of disabling a lint rule for the entire project in the
20+
# section below, it can also be suppressed for a single line of code
21+
# or a specific dart file by using the `// ignore: name_of_lint` and
22+
# `// ignore_for_file: name_of_lint` syntax on the line or in the file
23+
# producing the lint.
24+
rules:
25+
# avoid_print: false # Uncomment to disable the `avoid_print` rule
26+
# prefer_single_quotes: true # Uncomment to enable the `prefer_single_quotes` rule
27+
28+
# Additional information about this file can be found at
29+
# https://dart.dev/guides/language/analysis-options

objectbox/example/flutter/objectbox_demo/pubspec.yaml

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,25 @@
11
name: objectbox_demo
2-
description: An example project for the objectbox-dart binding.
3-
version: 0.3.0+1
2+
description: Note taking example app using ObjectBox Flutter database.
3+
publish_to: 'none'
4+
version: 1.0.0+1
45

56
environment:
67
sdk: ">=2.13.0 <3.0.0"
78

89
dependencies:
910
flutter:
1011
sdk: flutter
11-
cupertino_icons: any
12-
intl: any
1312
objectbox: ^1.5.0
1413
objectbox_flutter_libs: any
14+
intl: any
1515

1616
dev_dependencies:
17-
objectbox_generator: any
18-
build_runner: any
1917
flutter_driver:
2018
sdk: flutter
2119
test: any
20+
flutter_lints: ^1.0.0
21+
build_runner: ^2.0.0
22+
objectbox_generator: any
2223

2324
flutter:
2425
uses-material-design: true

objectbox/example/flutter/objectbox_demo_relations/pubspec.yaml

Lines changed: 3 additions & 73 deletions
Original file line numberDiff line numberDiff line change
@@ -1,98 +1,28 @@
11
name: objectbox_demo_relations
2-
description: ObjectBox example Flutter app using relations.
3-
4-
# The following line prevents the package from being accidentally published to
5-
# pub.dev using `flutter pub publish`. This is preferred for private packages.
6-
publish_to: 'none' # Remove this line if you wish to publish to pub.dev
7-
8-
# The following defines the version and build number for your application.
9-
# A version number is three numbers separated by dots, like 1.2.43
10-
# followed by an optional build number separated by a +.
11-
# Both the version and the builder number may be overridden in flutter
12-
# build by specifying --build-name and --build-number, respectively.
13-
# In Android, build-name is used as versionName while build-number used as versionCode.
14-
# Read more about Android versioning at https://developer.android.com/studio/publish/versioning
15-
# In iOS, build-name is used as CFBundleShortVersionString while build-number used as CFBundleVersion.
16-
# Read more about iOS versioning at
17-
# https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html
2+
description: Note taking example app using ObjectBox Flutter database with relations.
3+
publish_to: 'none'
184
version: 1.0.0+1
195

206
environment:
217
sdk: ">=2.13.0 <3.0.0"
228

23-
# Dependencies specify other packages that your package needs in order to work.
24-
# To automatically upgrade your package dependencies to the latest versions
25-
# consider running `flutter pub upgrade --major-versions`. Alternatively,
26-
# dependencies can be manually updated by changing the version numbers below to
27-
# the latest version available on pub.dev. To see which dependencies have newer
28-
# versions available, run `flutter pub outdated`.
299
dependencies:
3010
flutter:
3111
sdk: flutter
3212
objectbox: ^1.5.0
3313
objectbox_flutter_libs: any
3414
intl: any
3515

36-
37-
# The following adds the Cupertino Icons font to your application.
38-
# Use with the CupertinoIcons class for iOS style icons.
39-
cupertino_icons: ^1.0.2
40-
4116
dev_dependencies:
4217
flutter_test:
4318
sdk: flutter
19+
flutter_lints: ^1.0.0
4420
build_runner: ^2.0.0
4521
objectbox_generator: any
4622

47-
# The "flutter_lints" package below contains a set of recommended lints to
48-
# encourage good coding practices. The lint set provided by the package is
49-
# activated in the `analysis_options.yaml` file located at the root of your
50-
# package. See that file for information about deactivating specific lint
51-
# rules and activating additional ones.
52-
flutter_lints: ^1.0.0
53-
54-
# For information on the generic Dart part of this file, see the
55-
# following page: https://dart.dev/tools/pub/pubspec
56-
57-
# The following section is specific to Flutter.
5823
flutter:
59-
60-
# The following line ensures that the Material Icons font is
61-
# included with your application, so that you can use the icons in
62-
# the material Icons class.
6324
uses-material-design: true
6425

65-
# To add assets to your application, add an assets section, like this:
66-
# assets:
67-
# - images/a_dot_burr.jpeg
68-
# - images/a_dot_ham.jpeg
69-
70-
# An image asset can refer to one or more resolution-specific "variants", see
71-
# https://flutter.dev/assets-and-images/#resolution-aware.
72-
73-
# For details regarding adding assets from package dependencies, see
74-
# https://flutter.dev/assets-and-images/#from-packages
75-
76-
# To add custom fonts to your application, add a fonts section here,
77-
# in this "flutter" section. Each entry in this list should have a
78-
# "family" key with the font family name, and a "fonts" key with a
79-
# list giving the asset and other descriptors for the font. For
80-
# example:
81-
# fonts:
82-
# - family: Schyler
83-
# fonts:
84-
# - asset: fonts/Schyler-Regular.ttf
85-
# - asset: fonts/Schyler-Italic.ttf
86-
# style: italic
87-
# - family: Trajan Pro
88-
# fonts:
89-
# - asset: fonts/TrajanPro.ttf
90-
# - asset: fonts/TrajanPro_Bold.ttf
91-
# weight: 700
92-
#
93-
# For details regarding fonts from package dependencies,
94-
# see https://flutter.dev/custom-fonts/#from-packages
95-
9626
# Note: these overrides are only for ObjectBox internal development, don't use them in your app.
9727
dependency_overrides:
9828
objectbox:
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
# This file configures the analyzer, which statically analyzes Dart code to
2+
# check for errors, warnings, and lints.
3+
#
4+
# The issues identified by the analyzer are surfaced in the UI of Dart-enabled
5+
# IDEs (https://dart.dev/tools#ides-and-editors). The analyzer can also be
6+
# invoked from the command line by running `flutter analyze`.
7+
8+
# The following line activates a set of recommended lints for Flutter apps,
9+
# packages, and plugins designed to encourage good coding practices.
10+
include: package:flutter_lints/flutter.yaml
11+
12+
linter:
13+
# The lint rules applied to this project can be customized in the
14+
# section below to disable rules from the `package:flutter_lints/flutter.yaml`
15+
# included above or to enable additional rules. A list of all available lints
16+
# and their documentation is published at
17+
# https://dart-lang.github.io/linter/lints/index.html.
18+
#
19+
# Instead of disabling a lint rule for the entire project in the
20+
# section below, it can also be suppressed for a single line of code
21+
# or a specific dart file by using the `// ignore: name_of_lint` and
22+
# `// ignore_for_file: name_of_lint` syntax on the line or in the file
23+
# producing the lint.
24+
rules:
25+
# avoid_print: false # Uncomment to disable the `avoid_print` rule
26+
# prefer_single_quotes: true # Uncomment to enable the `prefer_single_quotes` rule
27+
28+
# Additional information about this file can be found at
29+
# https://dart.dev/guides/language/analysis-options

objectbox/example/flutter/objectbox_demo_sync/pubspec.yaml

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,25 @@
11
name: objectbox_demo
2-
description: An example project for the objectbox-dart binding.
3-
version: 0.3.0+1
2+
description: Note taking example app using a Sync-enabled ObjectBox Flutter database.
3+
publish_to: 'none'
4+
version: 1.0.0+1
45

56
environment:
67
sdk: ">=2.13.0 <3.0.0"
78

89
dependencies:
910
flutter:
1011
sdk: flutter
11-
cupertino_icons: any
12-
intl: any
1312
objectbox: ^1.5.0
14-
objectbox_sync_flutter_libs: any
13+
objectbox_sync_flutter_libs: any # For Sync support use this instead of objectbox_flutter_libs.
14+
intl: any
1515

1616
dev_dependencies:
17-
objectbox_generator: any
18-
build_runner: any
1917
flutter_driver:
2018
sdk: flutter
2119
test: any
20+
flutter_lints: ^1.0.0
21+
build_runner: ^2.0.0
22+
objectbox_generator: any
2223

2324
flutter:
2425
uses-material-design: true

0 commit comments

Comments
 (0)