feat: include `public_member_api_docs` (#13)

* feat: included public_member_api_docs lint rule

* docs: included ignore comment

* docs: included Ball method comment
pull/31/head
Alejandro Santiago 2 years ago committed by GitHub
parent 24edc0118a
commit 61ba65ce61
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -1,4 +1 @@
include: package:very_good_analysis/analysis_options.2.4.0.yaml
linter:
rules:
public_member_api_docs: false

@ -5,6 +5,8 @@
// license that can be found in the LICENSE file or at
// https://opensource.org/licenses/MIT.
// ignore_for_file: public_member_api_docs
import 'package:flutter/material.dart';
import 'package:flutter_localizations/flutter_localizations.dart';
import 'package:pinball/l10n/l10n.dart';

@ -5,6 +5,8 @@
// license that can be found in the LICENSE file or at
// https://opensource.org/licenses/MIT.
// ignore_for_file: public_member_api_docs
import 'dart:async';
import 'dart:developer';

@ -1,3 +1,5 @@
// ignore_for_file: public_member_api_docs
import 'package:bloc/bloc.dart';
import 'package:equatable/equatable.dart';
import 'package:meta/meta.dart';

@ -1,3 +1,5 @@
// ignore_for_file: public_member_api_docs
part of 'game_bloc.dart';
@immutable
@ -5,16 +7,22 @@ abstract class GameEvent extends Equatable {
const GameEvent();
}
/// {@template ball_lost_game_event}
/// Event added when a user drops a ball off the screen.
/// {@endtemplate}
class BallLost extends GameEvent {
/// {@macro ball_lost_game_event}
const BallLost();
@override
List<Object?> get props => [];
}
/// {@template scored_game_event}
/// Event added when a user increases their score.
/// {@endtemplate}
class Scored extends GameEvent {
/// {@macro scored_game_event}
const Scored({
required this.points,
}) : assert(points > 0, 'Points must be greater than 0');

@ -1,3 +1,5 @@
// ignore_for_file: public_member_api_docs
part of 'game_bloc.dart';
/// {@template game_state}

@ -3,8 +3,13 @@ import 'package:flame_bloc/flame_bloc.dart';
import 'package:flame_forge2d/flame_forge2d.dart';
import 'package:pinball/game/game.dart';
/// {@template ball}
/// A solid, [BodyType.dynamic] sphere that rolls and bounces along the
/// [PinballGame].
/// {@endtemplate}
class Ball extends PositionBodyComponent<PinballGame, SpriteComponent>
with BlocComponent<GameBloc, GameState> {
/// {@macro ball}
Ball({
required Vector2 position,
}) : _position = position,

@ -1,3 +1,5 @@
// ignore_for_file: public_member_api_docs
import 'dart:async';
import 'package:flame/input.dart';
import 'package:flame_bloc/flame_bloc.dart';

@ -1,3 +1,5 @@
// ignore_for_file: public_member_api_docs
import 'package:flame/game.dart';
import 'package:flutter/material.dart';
import 'package:flutter_bloc/flutter_bloc.dart';

@ -5,6 +5,8 @@
// license that can be found in the LICENSE file or at
// https://opensource.org/licenses/MIT.
// ignore_for_file: public_member_api_docs
import 'package:flutter/widgets.dart';
import 'package:flutter_gen/gen_l10n/app_localizations.dart';

@ -1,3 +1,5 @@
// ignore_for_file: public_member_api_docs
import 'package:flutter/material.dart';
import 'package:pinball/game/game.dart';
import 'package:pinball/l10n/l10n.dart';

Loading…
Cancel
Save