Issue I have a few similar functions in my project that works the same but have different return types. Is it possible for me to factorise them into 1 function to reduce code reducndancy? Below is my code sample: class
Continue readingTag: refactoring
Flutter Extract Method vs. Extract Widget vs. Extract Flutter Widget in androidStudio
Issue Hi I’m new to Flutter and I have several questions regarding Extract Method and Extract Widget in Android Studio. When it comes to making code clean and reusable, what is the difference between Extract Method and Extract Widget? When
Continue readingHow can I refactor complicated method with views in Activity or Fragment?
Issue I am learning Clean Code and Refactoring. And my project has many long method with view access, something like this. private fun updateStatusFragmentUI(statusData: StatusListData.StatusData) = with(binding.detail) { with(statusData) { tvCodeDoc.text = getString(R.string.reception_code).format(receptionKey) tvTime.text = createdAt.toFullTimeString() tvName.text = name tvContact.text
Continue readingFlutter: Many bloc providers cluttering widget tree
Issue Im making a type of chat app, and has a need for multiple blocs/repositories/etc. This has lead to my widget tree looking like this: And also has lead to a nasty looking build method in my main.dart: @override Widget
Continue readingFind and replace Android studio
Issue Is there a way to find and replace all occurrences of a word in an entire project( not just a single class using refactor -> rename) and also maintain case, either in android studio or using a command line
Continue readingFind and replace Android studio
Issue Is there a way to find and replace all occurrences of a word in an entire project( not just a single class using refactor -> rename) and also maintain case, either in android studio or using a command line
Continue readingProgram type already present: android.support.v4.os.ResultReceiver$MyResultReceiver
Issue I’m refactoring an app to use androidx. I have struggled to get rid of all the libraries that do not support it. I thought I had removed all the libraries that use the support libraries but it looks like
Continue readingcant refactor color with shade in Flutter
Issue I am trying to refactor my code. This is my Code ,I am getting Problem import ‘package:flutter/material.dart’; class AppBarButton extends StatelessWidget { const AppBarButton( {Key? key, required this.buttnoAction, this.buttonColor = Colors.grey[300], // the error getting is " The default
Continue readingHow to Refactor a Function in Flutter
Issue import ‘package:flutter/material.dart’; Widget justButton({ String btText = ”, Color bgColor = Colors.blue, Color? txtColor = Colors.white, Color borderColor = Colors.black, void Function() onpressedAction,//here iam getting problem }) { return OutlinedButton( //i wanted to refactor this onpressed onPressed: () {
Continue reading