Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

- stricter linting rules.
- update ci-related scripts.

## [0.5.1] - 2023-02-05

### Changed
Expand Down
22 changes: 8 additions & 14 deletions analysis_options.yaml
Original file line number Diff line number Diff line change
@@ -1,23 +1,17 @@
include: package:lint/package.yaml

analyzer:
strong-mode:
# A value of false ensures that the type inference engine never implicitly casts
# from dynamic to a more specific type.
implicit-casts: false
# A value of false ensures that the type inference engine never chooses the
# dynamic type when it can’t determine a static type.
implicit-dynamic: false
exclude:
- '**.freezed.dart'
- '**.g.dart'
linter:
rules:
# Make constructors the first thing in every class
sort_unnamed_constructors_first: true
sort_constructors_first: true
avoid_catches_without_on_clauses: true
avoid_equals_and_hash_code_on_mutable_classes: true
cancel_subscriptions: true
# Good packages document everything
public_member_api_docs: true
unawaited_futures: true
# It's a good practice to expose the ability to provide a key when creating public widgets.
use_key_in_widget_constructors: true
always_declare_return_types: true
cancel_subscriptions: true
close_sinks: true
only_throw_errors: true
package_api_docs: true
18 changes: 15 additions & 3 deletions example/analysis_options.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,17 @@
include: package:lint/strict.yaml
include: package:lint/package.yaml

analyzer:
exclude:
- '**.freezed.dart'
- '**.g.dart'
linter:
rules:
# Always await, intentionally not await
unawaited_futures: true
# Make constructors the first thing in every class
sort_unnamed_constructors_first: true
sort_constructors_first: true
avoid_catches_without_on_clauses: true
avoid_equals_and_hash_code_on_mutable_classes: true
cancel_subscriptions: true
# Good packages document everything
public_member_api_docs: true
package_api_docs: true
13 changes: 8 additions & 5 deletions example/lib/main.dart
Original file line number Diff line number Diff line change
@@ -1,10 +1,14 @@
// ignore_for_file: public_member_api_docs

import 'package:eo_color/eo_color.dart';
import 'package:flutter/material.dart';
import 'package:flutter_brand_palettes/flutter_brand_palettes.dart';

void main() => runApp(MyApp());
void main() => runApp(const MyApp());

class MyApp extends StatelessWidget {
const MyApp({super.key});

@override
Widget build(BuildContext context) {
return const MaterialApp(
Expand All @@ -16,9 +20,8 @@ class MyApp extends StatelessWidget {
}

class InstagramPalettePage extends StatelessWidget {
const InstagramPalettePage({required String title, Key? key})
: _title = title,
super(key: key);
const InstagramPalettePage({required String title, super.key})
: _title = title;

final String _title;
static final _gradient = const InstagramGrad().colors;
Expand Down Expand Up @@ -54,7 +57,7 @@ class InstagramPalettePage extends StatelessWidget {
/// Gradient colored text.
class GradientTitle extends StatelessWidget {
/// Ctor.
const GradientTitle(this._title, this._colors);
const GradientTitle(this._title, this._colors, {super.key});
final String _title;
final List<Color> _colors;

Expand Down
6 changes: 3 additions & 3 deletions example/pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -102,10 +102,10 @@ packages:
dependency: "direct dev"
description:
name: lint
sha256: "3e9343b1cededcfb1e8b40d0dbd3592b7a1c6c0121545663a991433390c2bc97"
sha256: d758a5211fce7fd3f5e316f804daefecdc34c7e53559716125e6da7388ae8565
url: "https://pub.dev"
source: hosted
version: "2.0.1"
version: "2.3.0"
matcher:
dependency: transitive
description:
Expand Down Expand Up @@ -208,5 +208,5 @@ packages:
source: hosted
version: "14.2.4"
sdks:
dart: ">=3.3.0 <4.0.0"
dart: ">=3.5.0 <4.0.0"
flutter: ">=3.18.0-18.0.pre.54"
5 changes: 3 additions & 2 deletions example/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@ publish_to: 'none' # Remove this line if you wish to publish to pub.dev
version: 1.0.0

environment:
sdk: ">=2.12.0 <3.0.0"
sdk: ^3.5.0
flutter: ">=1.17.0"

dependencies:
eo_color: ^2.2.0
Expand All @@ -19,7 +20,7 @@ dependencies:
dev_dependencies:
flutter_test:
sdk: flutter
lint: ^2.0.1
lint: ^2.3.0

flutter:
uses-material-design: true
6 changes: 3 additions & 3 deletions pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -95,10 +95,10 @@ packages:
dependency: "direct dev"
description:
name: lint
sha256: "3e9343b1cededcfb1e8b40d0dbd3592b7a1c6c0121545663a991433390c2bc97"
sha256: d758a5211fce7fd3f5e316f804daefecdc34c7e53559716125e6da7388ae8565
url: "https://pub.dev"
source: hosted
version: "2.0.1"
version: "2.3.0"
matcher:
dependency: transitive
description:
Expand Down Expand Up @@ -201,5 +201,5 @@ packages:
source: hosted
version: "14.2.4"
sdks:
dart: ">=3.3.0 <4.0.0"
dart: ">=3.5.0 <4.0.0"
flutter: ">=3.18.0-18.0.pre.54"
4 changes: 2 additions & 2 deletions pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ homepage: https://dartoos.dev
repository: https://github.com/dartoos-dev/flutter_brand_palettes

environment:
sdk: ">=2.12.0 <3.0.0"
sdk: ^3.5.0
flutter: ">=1.17.0"

dependencies:
Expand All @@ -16,4 +16,4 @@ dependencies:
dev_dependencies:
flutter_test:
sdk: flutter
lint: ^2.0.1
lint: ^2.3.0