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): sized_box_for_whitespace and prefer_const_literals_to_create_immutables rules #158

Merged
merged 1 commit into from
Oct 11, 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: 0 additions & 4 deletions analysis_options.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,6 @@ linter:

join_return_with_assignment: false

prefer_const_literals_to_create_immutables: false

prefer_function_declarations_over_variables: false

unnecessary_string_escapes: false
Expand All @@ -41,6 +39,4 @@ linter:

constant_identifier_names: false

sized_box_for_whitespace: false

prefer_typing_uninitialized_variables: false
4 changes: 2 additions & 2 deletions lib/ui/views/authentication/forgot_password_view.dart
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,8 @@ class _ForgotPasswordViewState extends State<ForgotPasswordView> {
text: TextSpan(
text: 'New User? ',
style: Theme.of(context).textTheme.bodyText1,
children: <TextSpan>[
const TextSpan(
children: const <TextSpan>[
TextSpan(
text: 'Sign Up',
style: TextStyle(
color: CVTheme.primaryColorDark,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@ class ContributeDonateCard extends StatelessWidget {
Radius.circular(8),
),
color: Colors.white,
boxShadow: [
const BoxShadow(
boxShadow: const [
BoxShadow(
color: Colors.grey,
blurRadius: 2.0,
offset: Offset(2.0, 2.0),
Expand Down
28 changes: 14 additions & 14 deletions lib/ui/views/contributors/contributors_view.dart
Original file line number Diff line number Diff line change
Expand Up @@ -18,33 +18,33 @@ class ContributorsView extends StatelessWidget {
body: SingleChildScrollView(
padding: const EdgeInsets.all(16),
child: Column(
children: <Widget>[
const CVHeader(
children: const <Widget>[
CVHeader(
title: 'CONTRIBUTE',
description:
"CircuitVerse aims to be free forever and we promise that we won't run any ads! The project is open source and to ensure its continued development and maintenance we need your support.",
),
const CircuitVerseSocialCard(
CircuitVerseSocialCard(
imagePath: 'assets/images/contribute/email.png',
title: 'Email us at',
description: '[email protected]',
url: 'mailto:[email protected]',
),
const CircuitVerseSocialCard(
CircuitVerseSocialCard(
imagePath: 'assets/images/contribute/slack.png',
title: 'Join and chat with us at',
description: 'Slack channel',
url: 'https://circuitverse.org/slack',
),
const CircuitVerseSocialCard(
CircuitVerseSocialCard(
imagePath: 'assets/images/contribute/github.png',
title: 'Contribute to open source',
description: 'Github',
url: 'https://github.com/CircuitVerse',
),
const SizedBox(height: 32),
const CVSubheader(title: 'How to Support ?'),
const ContributeSupportCard(
SizedBox(height: 32),
CVSubheader(title: 'How to Support ?'),
ContributeSupportCard(
imagePath: 'assets/images/contribute/person.png',
title: 'I am a Student',
cardDescriptionList: [
Expand All @@ -53,7 +53,7 @@ class ContributorsView extends StatelessWidget {
'Introduce the platform to your buddie'
],
),
const ContributeSupportCard(
ContributeSupportCard(
imagePath: 'assets/images/contribute/professor.png',
title: 'I am a Teacher',
cardDescriptionList: [
Expand All @@ -62,7 +62,7 @@ class ContributorsView extends StatelessWidget {
'Create exciting educational content using CircuitVerse'
],
),
const ContributeSupportCard(
ContributeSupportCard(
imagePath: 'assets/images/contribute/person.png',
title: 'I am a Developer',
cardDescriptionList: [
Expand All @@ -71,14 +71,14 @@ class ContributorsView extends StatelessWidget {
'Find and fix bugs in the CircuitVerse projects'
],
),
const SizedBox(height: 16),
const ContributeDonateCard(
SizedBox(height: 16),
ContributeDonateCard(
imagePath: 'assets/images/contribute/patreon-logo.png',
title: 'Become a Patreon',
url: 'https://www.patreon.com/CircuitVerse',
),
const SizedBox(height: 16),
const ContributeDonateCard(
SizedBox(height: 16),
ContributeDonateCard(
imagePath: 'assets/images/contribute/paypal-logo.jpg',
title: 'Donate through PayPal',
url: 'https://www.paypal.me/satviksr',
Expand Down
2 changes: 1 addition & 1 deletion lib/ui/views/ib/builders/ib_interaction_builder.dart
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ class IbInteractionBuilder extends MarkdownElementBuilder {
initialData: 100,
stream: _streamController.stream,
builder: (context, snapshot) {
return Container(
return SizedBox(
height: snapshot.data,
child: WebView(
initialUrl:
Expand Down
6 changes: 3 additions & 3 deletions lib/ui/views/projects/project_details_view.dart
Original file line number Diff line number Diff line change
Expand Up @@ -413,9 +413,9 @@ class _ProjectDetailsViewState extends State<ProjectDetailsView> {
onTap: showAddCollaboratorsDialog,
child: Row(
mainAxisSize: MainAxisSize.min,
children: <Widget>[
const Icon(Icons.add),
const Text('Add A Collaborator'),
children: const <Widget>[
Icon(Icons.add),
Text('Add A Collaborator'),
],
),
);
Expand Down
14 changes: 7 additions & 7 deletions lib/ui/views/teachers/teachers_view.dart
Original file line number Diff line number Diff line change
Expand Up @@ -16,32 +16,32 @@ class TeachersView extends StatelessWidget {
body: SingleChildScrollView(
padding: const EdgeInsets.all(16),
child: Column(
children: <Widget>[
const CVHeader(
children: const <Widget>[
CVHeader(
title: 'TEACHERS',
description:
'CircuitVerse has been designed to be very easy to use in class. The platform has features to assist teachers in class and assignments.',
),
const CVSubheader(title: 'Benefits'),
const TeachersCard(
CVSubheader(title: 'Benefits'),
TeachersCard(
assetPath: 'assets/images/teachers/groups.png',
cardHeading: 'Create Groups and add your students',
cardDescription:
'You can create groups and add your students to them! If students are already registered with CircuitVerse they will be added automatically. If they are not registered with CircuitVerse yet, an invitation will be sent to register. Once they register, they will be added automatically.',
),
const TeachersCard(
TeachersCard(
assetPath: 'assets/images/teachers/assignment.png',
cardHeading: 'Post Assignments',
cardDescription:
'To create an assignment, simply click an add new assignment button. Give the details of the assignment and the deadline. The assignment will automatically close at deadline. Students cannot continue their assignment unless the teacher reopens the assignment again.',
),
const TeachersCard(
TeachersCard(
assetPath: 'assets/images/teachers/grading.png',
cardHeading: 'Grading assignments',
cardDescription:
'Grade assignments very easily with the in build preview. Simply select the student, to his/her assignment work.',
),
const TeachersCard(
TeachersCard(
assetPath: 'assets/images/teachers/embed.png',
cardHeading:
'Use Interactive Circuits in your Blogs, Study Materials or PowerPoint presentations',
Expand Down