From 9fc54f20dd37d5ed1146f3f233422b5f558ad264 Mon Sep 17 00:00:00 2001 From: Soham Sawant Date: Sat, 22 Jan 2022 20:39:38 +0530 Subject: [PATCH] made fields to final as sugested by the linter --- lib/view/dashboard_screen.dart | 1 - lib/view/tabs/base64_encoding_decoding_screen.dart | 4 ++-- lib/view/tabs/json_format_validate_screen.dart | 4 ++-- lib/view/tabs/json_to_yaml_screen.dart | 4 ++-- lib/view/tabs/jwt_debugger_screen.dart | 2 -- lib/view/tabs/qr_code_to_text_screen.dart | 4 ++-- lib/view/tabs/text_to_qr_code_screen.dart | 4 ++-- lib/view/tabs/url_encoding_decoding_screen.dart | 4 ++-- lib/view/tabs/yaml_to_json_screen.dart | 4 ++-- lib/view/widgets/custom_radio_button.dart | 9 +++------ 10 files changed, 17 insertions(+), 23 deletions(-) diff --git a/lib/view/dashboard_screen.dart b/lib/view/dashboard_screen.dart index 85b2f57..ca067ae 100644 --- a/lib/view/dashboard_screen.dart +++ b/lib/view/dashboard_screen.dart @@ -7,7 +7,6 @@ import 'package:devtools/view/tabs/word_count.dart'; import 'package:devtools/view/tabs/yaml_to_json_screen.dart'; import 'package:devtools/view/tabs/qr_code_to_text_screen.dart'; import 'package:devtools/view/tabs/text_to_qr_code_screen.dart'; -import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; import 'package:macos_ui/macos_ui.dart'; import 'package:url_launcher/url_launcher.dart'; diff --git a/lib/view/tabs/base64_encoding_decoding_screen.dart b/lib/view/tabs/base64_encoding_decoding_screen.dart index eaff7ad..4691cb1 100644 --- a/lib/view/tabs/base64_encoding_decoding_screen.dart +++ b/lib/view/tabs/base64_encoding_decoding_screen.dart @@ -17,8 +17,8 @@ class Base64EncodingDecodingScreen extends StatefulWidget { class _Base64EncodingDecodingScreenState extends State { int _groupValue = 0; - TextEditingController _inputTextController = TextEditingController(); - TextEditingController _outputTextController = TextEditingController(); + final TextEditingController _inputTextController = TextEditingController(); + final TextEditingController _outputTextController = TextEditingController(); @override Widget build(BuildContext context) { diff --git a/lib/view/tabs/json_format_validate_screen.dart b/lib/view/tabs/json_format_validate_screen.dart index c52324a..8705f7e 100644 --- a/lib/view/tabs/json_format_validate_screen.dart +++ b/lib/view/tabs/json_format_validate_screen.dart @@ -15,8 +15,8 @@ class JsonFormatValidateScreen extends StatefulWidget { } class _JsonFormatValidateScreenState extends State { - TextEditingController _inputTextController = TextEditingController(); - TextEditingController _outputTextController = TextEditingController(); + final TextEditingController _inputTextController = TextEditingController(); + final TextEditingController _outputTextController = TextEditingController(); @override Widget build(BuildContext context) { diff --git a/lib/view/tabs/json_to_yaml_screen.dart b/lib/view/tabs/json_to_yaml_screen.dart index b4aaa24..f6b5be9 100644 --- a/lib/view/tabs/json_to_yaml_screen.dart +++ b/lib/view/tabs/json_to_yaml_screen.dart @@ -14,8 +14,8 @@ class JsonToYamlScreen extends StatefulWidget { } class _JsonToYamlScreenState extends State { - TextEditingController _inputTextController = TextEditingController(); - TextEditingController _outputTextController = TextEditingController(); + final TextEditingController _inputTextController = TextEditingController(); + final TextEditingController _outputTextController = TextEditingController(); @override Widget build(BuildContext context) { diff --git a/lib/view/tabs/jwt_debugger_screen.dart b/lib/view/tabs/jwt_debugger_screen.dart index 3be297b..9884e4a 100644 --- a/lib/view/tabs/jwt_debugger_screen.dart +++ b/lib/view/tabs/jwt_debugger_screen.dart @@ -1,7 +1,5 @@ import 'dart:convert'; - import 'package:clipboard/clipboard.dart'; -import 'package:devtools/view/widgets/custom_radio_button.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; import 'package:macos_ui/macos_ui.dart'; diff --git a/lib/view/tabs/qr_code_to_text_screen.dart b/lib/view/tabs/qr_code_to_text_screen.dart index 1828f7d..e9e6a92 100644 --- a/lib/view/tabs/qr_code_to_text_screen.dart +++ b/lib/view/tabs/qr_code_to_text_screen.dart @@ -14,8 +14,8 @@ class QrCodeToTextScreen extends StatefulWidget { } class _QrCodeToTextScreenState extends State { - TextEditingController _inputTextController = TextEditingController(); - TextEditingController _outputTextController = TextEditingController(); + final TextEditingController _inputTextController = TextEditingController(); + final TextEditingController _outputTextController = TextEditingController(); @override Widget build(BuildContext context) { diff --git a/lib/view/tabs/text_to_qr_code_screen.dart b/lib/view/tabs/text_to_qr_code_screen.dart index ef49196..34331a5 100644 --- a/lib/view/tabs/text_to_qr_code_screen.dart +++ b/lib/view/tabs/text_to_qr_code_screen.dart @@ -14,8 +14,8 @@ class TextToQrCodeScreen extends StatefulWidget { } class _TextToQrCodeScreenState extends State { - TextEditingController _inputTextController = TextEditingController(); - TextEditingController _outputTextController = TextEditingController(); + final TextEditingController _inputTextController = TextEditingController(); + final TextEditingController _outputTextController = TextEditingController(); @override Widget build(BuildContext context) { diff --git a/lib/view/tabs/url_encoding_decoding_screen.dart b/lib/view/tabs/url_encoding_decoding_screen.dart index dcec05d..e435820 100644 --- a/lib/view/tabs/url_encoding_decoding_screen.dart +++ b/lib/view/tabs/url_encoding_decoding_screen.dart @@ -15,8 +15,8 @@ class UrlEncodingDecodingScreen extends StatefulWidget { class _UrlEncodingDecodingScreenState extends State { int _groupValue = 0; - TextEditingController _inputTextController = TextEditingController(); - TextEditingController _outputTextController = TextEditingController(); + final TextEditingController _inputTextController = TextEditingController(); + final TextEditingController _outputTextController = TextEditingController(); @override Widget build(BuildContext context) { diff --git a/lib/view/tabs/yaml_to_json_screen.dart b/lib/view/tabs/yaml_to_json_screen.dart index 9a5414d..802f1c7 100644 --- a/lib/view/tabs/yaml_to_json_screen.dart +++ b/lib/view/tabs/yaml_to_json_screen.dart @@ -14,8 +14,8 @@ class YamlToJsonScreen extends StatefulWidget { } class _YamlToJsonScreenState extends State { - TextEditingController _inputTextController = TextEditingController(); - TextEditingController _outputTextController = TextEditingController(); + final TextEditingController _inputTextController = TextEditingController(); + final TextEditingController _outputTextController = TextEditingController(); @override Widget build(BuildContext context) { diff --git a/lib/view/widgets/custom_radio_button.dart b/lib/view/widgets/custom_radio_button.dart index 782ccb2..a7df034 100644 --- a/lib/view/widgets/custom_radio_button.dart +++ b/lib/view/widgets/custom_radio_button.dart @@ -6,12 +6,9 @@ class CustomRadioListTile extends StatelessWidget { final String title; final ValueChanged onChanged; - const CustomRadioListTile({ - required this.value, - required this.groupValue, - required this.onChanged, - required this.title, - }); + const CustomRadioListTile({Key? key, required this.value, required this.groupValue, required this.title, required this.onChanged}) : super(key: key); + + @override Widget build(BuildContext context) {