How to use RadioButtonGroup in Android?

By | August 20, 2011

Hello everyone , In today’s tutorial I will show you how to how to use RadioButton group in Android. Lets go directly to the code. Let’s see the layout for the RadioGroup first. The file is named main.xml This will create a layout file with a radioGroup with 5 radioButtons and a button to clear… Read More »

How to listen to the softkeyboard done button in android?

By | July 13, 2011

Instead of using a button on the view we can use the softkeyboard done button to trigger an action. The action can include calling another activity or retrieving the data from the EditText etc. The main.xml contains an Edittext For listening to the keyboard event we need onKeyListener

Customizing your button or TextView or another view in ANDROID.

By | April 30, 2011

Beautifying our applications is one of the main features of your application’s success. In ANDROID there are many possible ways to do this. For eg. We need to have different colors for our buttons, However we can give backgrounds for buttons and all. But we can do many by using our custom xml files, like… Read More »

Creating a Button using Objective C

By | March 26, 2011

Hi, Sometimes you may need to create some buttons to the View using Objective C code rather than using Interface Builder. Here is how you can do that easily and efficiently. //You can create button with type. Here I am creating a Custom Button UIButton *myButton = [UIButton buttonWithType:UIButtonTypeCustom]; //Then what? Give action to be… Read More »

Using ButtonBar in Adobe AIR/FLEX, A simple Example

By | March 1, 2011

Hello………. A button Bar is a convenient way to place your buttons in an application. It saves a lots of space in your application interface. Take a look at the following example which shows how to use the ButtonBar. An itemClickEvent is attached to each button in the ButtonBar. You can place as many buttons… Read More »

What is XCTest framework in iOS?

By | February 5, 2024

The XCTest framework is the testing framework provided by Apple for writing and running unit tests in iOS and macOS applications. It is part of the broader XCTest framework available in the Apple ecosystem. XCTest is commonly used with Swift and Objective-C to test various aspects of your code, ensuring its correctness, reliability, and maintainability.… Read More »

How to do navigation and data pass in swiftUI?

By | January 14, 2024

In SwiftUI, navigation is typically handled using the NavigationView and related components. Here’s a basic guide on how to perform navigation in SwiftUI: Basic Navigation with NavigationLink: 2. Creating NavigationLinks: 3. Creating the Destination View: 4. Putting it All Together: Passing Data with NavigationLink: 2. Receiving Data in Destination View:In the destination view, define a… Read More »

Riverpod in Flutter – Simplest Example Ever

By | June 22, 2023

In this example, we create a simple Flutter application that displays a counter and increments the count when a FloatingActionButton is pressed. The state management is handled by Riverpod. Here’s a breakdown of the code: When you run this code, you will see a simple app with an app bar, a counter in the center… Read More »

Custom Theme using Theme Extensions

By | December 16, 2022

Theme extensions were introduced in Flutter 3. But what are Theme Extensions? As the name says, it helps to extend the inbuilt themes with our own extensions. Let’s jump into an example So when you create a flutter app, your basic root widget will look like this return MaterialApp( title: ‘Flutter Theme Extensions’, theme: ThemeData(… Read More »

Flutter Best Practices — Part 2

By | October 17, 2022

1. Avoid Functional Widgets We usually have a situation where we need to separate out UI code from the widget, But we avoid creating a separate widget and use function which returns Widget. This practice have some benefits, like you don’t need to pass all parameters in your new widget, You have less code and less files.… Read More »

Flutter Best Practices — Part 1

By | October 13, 2022

1. Placeholder Widgets Use SizedBox instead of Container as Placeholder widgets. Take a look at the below use-case return _loaded ? Container() : YourWidget(); The SizedBox is a const constructor and creates a fixed-size box. The width and height parameters can be null to indicate that the size of the box should not be constrained in the corresponding dimension.… Read More »

MVVM in Android – ViewModels, ViewModelScope, Retrofit all with a Simple Example.

By | June 6, 2021

Let’s learn how to implement MVVM in Android. It’s actually really simple. ViewModel is just another class that that implements the main Business Logic. ViewModel is a middle man between your view and your Data class(Repo/any Data Provider). It can be represented simply like this. Here the View just displays the data. ViewModel doesn’t know… Read More »

Creating Dynamic Forms & Get Data from Dynamic Forms in Flutter

By | April 4, 2021

Questions How can we create dynamic forms in Flutter? How can we access data from dynamic Forms? Watch Video Tutorial So let’s create a simple dynamic layout We are gonna create a dynamic layout with one TexField when we tap on a plus button in the AppBar. So this is how our AppBar is going… Read More »

Create an awesome background running Music Player like Amazon Music in Flutter

By | June 24, 2020

We all at sometime have played audio in our apps, correct? But we may not have created a complete music player that will run even if the application is not running in the foreground, yes? Watch Video Tutorial So in this article we will see how we can easily create such a music player. Our… Read More »

Easy StateManagement in Flutter using Providers, MultiProviders, ChangeNotifiers and Consumers

By | March 15, 2020

With Providers and MultiProviders we can do easy StateManagement in Flutter. State Management in Flutter Watch Video Tutorial Add Dependencies First Go to your pubspec.yaml file add the below dependency, I would recommend to add the latest dependency version, at this moment it is 4.0.4 provider: ^4.0.4 The Providers will have  Change Notifiers Consumers The Basic… Read More »

Custom BottomSheet, Custom Snackbar in Flutter using FlushBox

By | December 4, 2019

In this article we will see how to use a nice plugin called FlushBox in Flutter. Watch Video Tutorial First thing to do is to add dependencies. Add Dependencies Go to your pubspec.yaml file and add the below dependency. Once done that run ‘flutter packages get’ in the terminal to download the packages to be… Read More »

Google’s Flutter Tutorial – Save Image as String in SQLite Database

By | October 17, 2019

In this tutorial we will see how to save an image as a string in preferences. Watch more flutter videos on my youtube channel here. Watch Video Tutorial Add Dependencies First thing we have to do is to add the plugins. Open pubspec.yaml file and add the below Dependencies. So Let’s start… First we will… Read More »