diff --git a/analysis_options.yaml b/analysis_options.yaml new file mode 100644 index 00000000..a1cc2bb0 --- /dev/null +++ b/analysis_options.yaml @@ -0,0 +1,7 @@ +analyzer: + exclude: [build/**, test/**] +linter: + rules: + prefer_const_constructors: true + prefer_const_literals_to_create_immutables: true + unnecessary_const: true diff --git a/lib/main.dart b/lib/main.dart index 9534255c..32de67a3 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -39,7 +39,7 @@ void main() { runApp( EasyLocalization( - supportedLocales: [const Locale('en'), const Locale('ko')], + supportedLocales: const [Locale('en'), Locale('ko')], path: 'assets/translations', fallbackLocale: const Locale('en'), child: MultiProvider( diff --git a/lib/pages/user_page.dart b/lib/pages/user_page.dart index 0df8e918..0185a0e2 100644 --- a/lib/pages/user_page.dart +++ b/lib/pages/user_page.dart @@ -129,10 +129,10 @@ class UserPage extends StatelessWidget { }, } }, - {'Spacer': {}}, - { + const {'Spacer': {}}, + const { 'Padding': { - 'padding': const EdgeInsets.fromLTRB(16, 6, 0, 6), + 'padding': EdgeInsets.fromLTRB(16, 6, 0, 6), 'child': { 'Icon': { 'arg': Icons.navigate_next, diff --git a/lib/utils/export_file.dart b/lib/utils/export_file.dart index 2d3f2c66..70869a98 100644 --- a/lib/utils/export_file.dart +++ b/lib/utils/export_file.dart @@ -8,7 +8,7 @@ import 'package:path_provider/path_provider.dart'; import 'package:permission_handler/permission_handler.dart'; import 'package:open_app_file/open_app_file.dart'; -const MethodChannel _channel = const MethodChannel("org.sparcs.otlplus"); +const MethodChannel _channel = MethodChannel("org.sparcs.otlplus"); Future exportImage(RenderRepaintBoundary boundary) async { final image = await boundary.toImage(pixelRatio: 3.0);