Skip to content

Commit

Permalink
Merge pull request #6 from crunchloop/add_linter
Browse files Browse the repository at this point in the history
Add linter rules for default linter
  • Loading branch information
pmaite88 authored Mar 8, 2023
2 parents a1ba209 + e237c4e commit 96c38ea
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 22 deletions.
10 changes: 8 additions & 2 deletions analysis_options.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,14 @@ linter:
# `// ignore_for_file: name_of_lint` syntax on the line or in the file
# producing the lint.
rules:
# avoid_print: false # Uncomment to disable the `avoid_print` rule
# prefer_single_quotes: true # Uncomment to enable the `prefer_single_quotes` rule
- prefer_conditional_assignment
- prefer_single_quotes

analyzer:
exclude:
- lib/**.g.dart
- lib/**.freezed.dart
- lib/injection.config.dart

# Additional information about this file can be found at
# https://dart.dev/guides/language/analysis-options
1 change: 0 additions & 1 deletion lib/app_router.dart
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import 'package:auth/auth.dart';
import 'package:flutter/material.dart';
import 'package:auto_route/auto_route.dart';

Expand Down
8 changes: 2 additions & 6 deletions lib/components/app_drawer.dart
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,7 @@ class _AppDrawerState extends State<AppDrawer> {
padding: EdgeInsets.zero,
children: [
const DrawerHeader(
decoration: BoxDecoration(
color: Colors.green
),
decoration: BoxDecoration(color: Colors.green),
child: Text('Drawer Header'),
),
ListTile(
Expand All @@ -43,9 +41,7 @@ class _AppDrawerState extends State<AppDrawer> {
},
),
ListTile(
title: const Text('Sign Out'),
onTap: () => signOut(context)
),
title: const Text('Sign Out'), onTap: () => signOut(context)),
],
),
);
Expand Down
22 changes: 10 additions & 12 deletions lib/pages/home.dart
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,10 @@ class _HomePageState extends State<HomePage> {
content: Text(message),
actions: [
TextButton(
onPressed: () {
Navigator.of(context).pop();
},
child: Text('OK')
),
onPressed: () {
Navigator.of(context).pop();
},
child: Text('OK')),
],
);
},
Expand All @@ -38,13 +37,12 @@ class _HomePageState extends State<HomePage> {
),
drawer: const AppDrawer(),
body: Center(
child: ElevatedButton(
onPressed: () {
showAlert('You are in the home screen!');
},
child: const Text('Hello!'),
)
),
child: ElevatedButton(
onPressed: () {
showAlert('You are in the home screen!');
},
child: const Text('Hello!'),
)),
);
}
}
2 changes: 1 addition & 1 deletion lib/pages/profile.dart
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ class _ProfilePageState extends State<ProfilePage> {
title: const Text('Profile'),
),
drawer: const AppDrawer(),
body: const Center(
body: const Center(
child: Text('Your profile!'),
),
);
Expand Down

0 comments on commit 96c38ea

Please sign in to comment.