diff --git a/analysis_options.yaml b/analysis_options.yaml index 1c4405b8..0fbdfe66 100644 --- a/analysis_options.yaml +++ b/analysis_options.yaml @@ -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 @@ -41,6 +39,4 @@ linter: constant_identifier_names: false - sized_box_for_whitespace: false - prefer_typing_uninitialized_variables: false diff --git a/lib/ui/views/authentication/forgot_password_view.dart b/lib/ui/views/authentication/forgot_password_view.dart index 021d2369..f2d4e077 100644 --- a/lib/ui/views/authentication/forgot_password_view.dart +++ b/lib/ui/views/authentication/forgot_password_view.dart @@ -68,8 +68,8 @@ class _ForgotPasswordViewState extends State { text: TextSpan( text: 'New User? ', style: Theme.of(context).textTheme.bodyText1, - children: [ - const TextSpan( + children: const [ + TextSpan( text: 'Sign Up', style: TextStyle( color: CVTheme.primaryColorDark, diff --git a/lib/ui/views/contributors/components/contributors_donate_card.dart b/lib/ui/views/contributors/components/contributors_donate_card.dart index b295a3fc..694a64f2 100644 --- a/lib/ui/views/contributors/components/contributors_donate_card.dart +++ b/lib/ui/views/contributors/components/contributors_donate_card.dart @@ -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), diff --git a/lib/ui/views/contributors/contributors_view.dart b/lib/ui/views/contributors/contributors_view.dart index 8fb8462b..ba5aaf8e 100644 --- a/lib/ui/views/contributors/contributors_view.dart +++ b/lib/ui/views/contributors/contributors_view.dart @@ -18,33 +18,33 @@ class ContributorsView extends StatelessWidget { body: SingleChildScrollView( padding: const EdgeInsets.all(16), child: Column( - children: [ - const CVHeader( + children: const [ + 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: 'support@circuitverse.org', url: 'mailto:support@circuitverse.org', ), - 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: [ @@ -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: [ @@ -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: [ @@ -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', diff --git a/lib/ui/views/ib/builders/ib_interaction_builder.dart b/lib/ui/views/ib/builders/ib_interaction_builder.dart index 6ff53bcd..9953edbc 100644 --- a/lib/ui/views/ib/builders/ib_interaction_builder.dart +++ b/lib/ui/views/ib/builders/ib_interaction_builder.dart @@ -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: diff --git a/lib/ui/views/projects/project_details_view.dart b/lib/ui/views/projects/project_details_view.dart index 2f6ed0e4..2f9ec3db 100644 --- a/lib/ui/views/projects/project_details_view.dart +++ b/lib/ui/views/projects/project_details_view.dart @@ -413,9 +413,9 @@ class _ProjectDetailsViewState extends State { onTap: showAddCollaboratorsDialog, child: Row( mainAxisSize: MainAxisSize.min, - children: [ - const Icon(Icons.add), - const Text('Add A Collaborator'), + children: const [ + Icon(Icons.add), + Text('Add A Collaborator'), ], ), ); diff --git a/lib/ui/views/teachers/teachers_view.dart b/lib/ui/views/teachers/teachers_view.dart index b80e222e..8d29e8c2 100644 --- a/lib/ui/views/teachers/teachers_view.dart +++ b/lib/ui/views/teachers/teachers_view.dart @@ -16,32 +16,32 @@ class TeachersView extends StatelessWidget { body: SingleChildScrollView( padding: const EdgeInsets.all(16), child: Column( - children: [ - const CVHeader( + children: const [ + 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',