Flutter has many built-in widgets that automatically scroll and also offers a variety of widgets that you can customize to create specific scrolling behavior. Basic scrolling Many Flutter widgets support scrolling out of the box and do most of the work for you. For example, SingleChildScrollView automatically scrolls its child when necessary. Other useful widgets… Continue reading Scrolling
Tag: dart
Widget state
The framework introduces two major classes of widget: stateful and stateless widgets. Widgets that have no mutable state (they have no class properties that change over time) subclass StatelessWidget. Many built-in widgets are stateless, such as Padding, Text, and Icon. When you create your own widgets, you’ll create Stateless widgets most of the time. On… Continue reading Widget state
Building widgets
To create a user interface in Flutter, you override the build method on widget objects. All widgets must have a build method, and it must return another widget. For example, if you want to add text to the screen with some padding, you could write it like this: class PaddedText extends StatelessWidget { const PaddedText({super.key}); @override Widget… Continue reading Building widgets
Flutter – Circular & Linear Progress Indicators
Progress Indicator in any application displays the time which is needed for some tasks to complete such as downloading, installation, uploading, file transfer, etc. This shows the progress of a task or the time to display the length of the processes. In Flutter, progress can be displayed in two ways: CircularProgressIndicator: A CircularProgressIndicator is a… Continue reading Flutter – Circular & Linear Progress Indicators
Icon Class in Flutter
Icon class in Flutter is used to show specific icons in our app. Instead of creating an image for our icon, we can simply use the Icon class for inserting an icon in our app. For using this class you must ensure that you have set uses-material-design: true in the pubsec.yml file of your object.… Continue reading Icon Class in Flutter
Concept of State
If you have ever worked with React-js, you might be familiar with the concept of a state. The states are nothing but data objects. Flutter also operates on similar turf. For the management of state in a Flutter application, Stateful-Widget is used. Similar to the concept of state in React-js, the re-rendering of widgets specific… Continue reading Concept of State
Layers
The Flutter framework is categorized based on its complexity and establishes a hierarchy based on the decreasing level of these complexities. These categories are often called Layers. These layers are built on top of one another. The topmost layer is a widget specific to the operating system of the device (ie, Android or iOS). The… Continue reading Layers
Dart:html -Manipulating elements
You can use properties to change the state of an element. Node and its subtype Element define the properties that all elements have. For example, all elements have classes, hidden, id, style, and title properties that you can use to set state. Subclasses of Element define additional properties, such as the href property of AnchorElement.… Continue reading Dart:html -Manipulating elements
Dart:html – Finding elements
To manipulate an element, you first need an object that represents it. You can get this object using a query. Find one or more elements using the top-level functions querySelector() and querySelectorAll(). You can query by ID, class, tag, name, or any combination of these. The CSS Selector Specification guide defines the formats of the… Continue reading Dart:html – Finding elements
Dart:html
Use the dart:html library to program the browser, manipulate objects and elements in the DOM, and access HTML5 APIs. DOM stands for Document Object Model, which describes the hierarchy of an HTML page. Other common uses of dart:html are manipulating styles (CSS), getting data using HTTP requests, and exchanging data using WebSockets. HTML5 (and dart:html)… Continue reading Dart:html