Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(lints): single quote and const constructor rules #150

Merged
merged 1 commit into from
Oct 6, 2021
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
4 changes: 1 addition & 3 deletions analysis_options.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,4 @@ linter:

prefer_typing_uninitialized_variables: false

prefer_const_constructors_in_immutables: false

prefer_single_quotes: false
prefer_const_constructors_in_immutables: true
2 changes: 1 addition & 1 deletion lib/ui/components/cv_flat_button.dart
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import 'package:flutter/material.dart';

class CVFlatButton extends StatefulWidget {
CVFlatButton({
const CVFlatButton({
@required Key key,
@required this.triggerFunction,
@required this.buttonText,
Expand Down
2 changes: 1 addition & 1 deletion lib/ui/components/cv_tab_bar.dart
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ class CVTabBar extends StatelessWidget implements PreferredSizeWidget {
final Color color;
final TabBar tabBar;

CVTabBar({this.color, this.tabBar});
const CVTabBar({this.color, this.tabBar});

@override
Size get preferredSize => tabBar.preferredSize;
Expand Down
2 changes: 1 addition & 1 deletion lib/ui/components/cv_typeahead_field.dart
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ class CVTypeAheadField extends StatelessWidget {
/// When a [TextInputType] is not specified, it defaults to [TextInputType.text]
///
/// When `maxLines` is not specified, it defaults to 1
CVTypeAheadField({
const CVTypeAheadField({
Key key,
@required this.label,
this.type = TextInputType.text,
Expand Down
2 changes: 1 addition & 1 deletion lib/ui/views/base_view.dart
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ class BaseView<T extends BaseModel> extends StatefulWidget {
final Function(T) onModelDestroy;
final T model;

BaseView({
const BaseView({
@required this.builder,
this.onModelReady,
this.onModelDestroy,
Expand Down
2 changes: 1 addition & 1 deletion lib/ui/views/ib/components/ib_pop_quiz.dart
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ class IbPopQuiz extends StatelessWidget {
final BuildContext context;
final List<IbPopQuizQuestion> questions;

IbPopQuiz({this.context, this.questions});
const IbPopQuiz({this.context, this.questions});

Widget _buildQuestion(int questionNumber, IbPopQuizQuestion question) {
var buttonsWidgets = <Widget>[];
Expand Down
2 changes: 1 addition & 1 deletion lib/ui/views/ib/components/ib_pop_quiz_button.dart
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ class IbPopQuizButton extends StatefulWidget {
final String content;
final bool isCorrect;

IbPopQuizButton({
const IbPopQuizButton({
@required this.content,
@required this.isCorrect,
});
Expand Down
2 changes: 1 addition & 1 deletion lib/ui/views/ib/ib_page_view.dart
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ class IbPageView extends StatefulWidget {
final SetPageCallback setPage;
final IbChapter chapter;

IbPageView({
const IbPageView({
@required Key key,
@required this.tocCallback,
@required this.chapter,
Expand Down